building a Diplomacy AI

Anything about the Diplomacy game in general.

Re: building a Diplomacy AI

Postby Strategus » 04 Jan 2019, 22:54

An AI should decide on the best possible outcome, and assume that the relevant diplomacy will make it happen. The diplomacy has to make it happen.
The Devil makes work for idle forces

Better to have fought and lost, than never to have fought at all
Actual Platinum Classicist
I did WDC 2017

Just say "NO!" To carebears and kittens
User avatar
Strategus
 
Posts: 1755
Joined: 30 May 2015, 14:30
Location: England
Class: Star Ambassador
Standard rating: 1624
All-game rating: 1775
Timezone: GMT

Re: building a Diplomacy AI

Postby jay65536 » 04 Jan 2019, 23:55

So you're claiming that a Diplomacy AI should simply never accept any draw?
jay65536
 
Posts: 386
Joined: 10 Sep 2016, 18:13
Class: Ambassador
Standard rating: (1124)
All-game rating: (1130)
Timezone: GMT-5

Re: building a Diplomacy AI

Postby Strategus » 05 Jan 2019, 00:09

I don't remember saying that...?
The Devil makes work for idle forces

Better to have fought and lost, than never to have fought at all
Actual Platinum Classicist
I did WDC 2017

Just say "NO!" To carebears and kittens
User avatar
Strategus
 
Posts: 1755
Joined: 30 May 2015, 14:30
Location: England
Class: Star Ambassador
Standard rating: 1624
All-game rating: 1775
Timezone: GMT

Re: building a Diplomacy AI

Postby Jack007 » 05 Jan 2019, 14:22

The dilomacy part of an AI would preferably be realized by a multiple choice dialogue I guess.

Another task is to find an algorithm on how to assess the strength of a position, be it with or without strategical considerations.

I had this Atari programm which had a quite good gunboat engine, but I don't know how they calculated a good position.
Jack007 (xxxx.) unbanned for dubious reasons
Member of the Honorables
There is no greater solitude than the samurai's,
unless it be that of the tiger in the jungle… perhaps…
-bushido
User avatar
Jack007
Premium Member
 
Posts: 967
Joined: 08 Mar 2014, 17:34
Location: Tuscany (Pisa)
Class: Ambassador
Standard rating: 1249
All-game rating: 1558
Timezone: GMT+1

Re: building a Diplomacy AI

Postby espero » 09 Jan 2019, 23:30

Thanks all.

On the "best moves", my simple understanding is that the new generation of AIs (e.g. AlphaGo, AlphaZero) is less prescriptive than earlier generations: rather than trying to teach the system how experts evaluate various situations, it lets them play and try moves for themselves.

@Jay65536: your observation about signalling via support orders is a good one - thank you.

Finally, I'm not sure that deciding when to offer draws will be a big deal: it's certainly something that featured in, for example, AlphaGo's 2016 tournament with Lee Sedol.
espero
 
Posts: 5
Joined: 02 Jan 2019, 23:06

Re: building a Diplomacy AI

Postby super_dipsy » 03 Feb 2019, 08:04

I very rarely visit this part of the forum, but I happened to do so and saw this topic. Without wishing to resurrect a thread unnecessarily, if anyone has listened to the latest edition of Amby and Kane's Diplomacy podcast ([url]diplomacygames.com[/url]) they will know that this is something I am messing about on. I guess my approach is rather different to the proposer. It is rather insular in its view, based very much in my Playdip world experience, using the framework of Playdip rather than any generally available framework, with possibly one exception. So one example of this approach is leveraging as much as possible our huge history of 100,000 Diplomacy games complete with orders. Knowing actions taken and end results at least provides a statistical source of information for what it's worth. For example, it can help significantly when deciding on early moves. A simple case: commonly F and E agree a DMZ in the channel. How have E and F fared in our historical database when they did / did not agree a DMZ? And in the case where one or the other then breaks the DMZ, how did the country fare? Yes you can argue that a million things can have happened that would impact the end result, but at a very coarse level it does provide some level of information.

The current approach I am taking on negotiations is very basic at this point. Rather than get involved with natural language support, which is a minefield and quite possibly something that should be addressed using some open source initiative, at this stage it is ugly but simple. The prime base in design is yes/no style offers. So for example

DMZ Eng, do you agree? (tick box for yes)
A Swe S A Edi - Nwy if F Nth S F Bal to Den, do you agree? (tick box for yes).

By using this messy and unnatractive approach, the essence of Diplomacy at least at a basic level can be achieved reasonably simply. Of course getting an agreement to a 'deal' does not guarantee the AI will hold to the deal, just as it does not in the human case ;). The reason for adopting this primitive approach though is it seems to me that evolution is the right approach to this design, and if a basic AI can be created that works at least at one level, then attention can turn to shining it up and making it pretty later, possibly as a more opern source type effort. On this front, the one exception to leveraging more commonly available frameworks I have in my dreams at the moment is I am thiking of utilizing the IBM Watson Assistant stuff, which deals with NLP and also provides a load of data mining stuff that can operate on our database of Diplomacy games. But frankly, that is just a glint in the eye at the moment :)

The general thrust is quite similar to what has already been discussed though. Gunboat provides a much simpler challenge, because the communications are limited to something that does not actually require conversation (ie specific moves that are submitted just to signal alliance potential). The rest of it is just programming. A key point in what I am messing about with at the moment is that frequently there will be a number of options in terms of moves (well actually, there is a finite set of moves possible anyway, but what I mean is there will be a number of more attractive options than others!), but at that point the AI will decide based on a weighted random number approach. In other words, suppose the AI thinks that most sensible would be to keep Eng Chan a DMZ but that there is an immediate gain from breaking it, the weighted decision might be 9 times out of 10 it keeps the DMZ but 1 time out of 10 it doesn't. The reason for this is otherwise the AI just becomes too easily predictable and exploitable. This weighted approach is similar to that first used in the site Stuff Happens option, and more recently in the cheater hunting AI we deployed late last year.

I guess I should say that another key point of the design thinking currently is that the main purpose I envisage for this initially is as a replacement for a country in CD. If someone surrenders, the AI would take over until someone joins the game to take control of the country. This may help to reduce the effect of surrenders by ensuring that in the case of a surrender the game does not become unbalanced so fast, and may be particularly useful for a country with few units tht is highly unlikely to be picked up by anyone. This design point means that having a pretty ropy AI may well still be better than nothing! Realistically, trying to build a full conversational AI that can play the game well is a million miles from where my mind is at the moment; but building one that can do a reasonable if unspectacular job of controlling a CD country for a few turns is a much more achievable objective.

Finally, in case anyone gets the wrong idea in terms of expectations, as I said in the Amby interview referenced above, this may never see the light of day. Frankly it is something I am messing with as the mood takes me. It is very much a back burner project, and whenever something else comes up it goes back in the cupboard. But if anything does come of it, rest assured it will not just be thrown onto the site. For instance, even if it seems a good choice for replacing surrendered countries, it would at least start out as a game creation option so people are not unknowingly exposed to it :D
User avatar
super_dipsy
Premium Member
 
Posts: 11959
Joined: 04 Nov 2009, 17:43
Class: Ambassador
Standard rating: (1000)
All-game rating: (941)
Timezone: GMT

Re: building a Diplomacy AI

Postby espero » 06 Feb 2019, 21:28

Thanks super_dipsy.

If you've not looked at the BANDANA framework, it may be worth looking at. Its negotiation language should be able to handle proposals like the E & F DMZ example that you cite.
espero
 
Posts: 5
Joined: 02 Jan 2019, 23:06

Re: building a Diplomacy AI

Postby super_dipsy » 07 Feb 2019, 07:45

Will do
User avatar
super_dipsy
Premium Member
 
Posts: 11959
Joined: 04 Nov 2009, 17:43
Class: Ambassador
Standard rating: (1000)
All-game rating: (941)
Timezone: GMT

Re: building a Diplomacy AI

Postby David E. Cohen » 07 Feb 2019, 14:56

You are exactly right. The "best" moves, tactically speaking, can often be a strategic or diplomatic disaster.
Play every game of Diplomacy as if it will be the last game of Diplomacy you will ever play.
User avatar
David E. Cohen
 
Posts: 434
Joined: 28 Jan 2008, 11:30
Location: Treading the Path to Diplo-Shambhala
Class: Diplomat
All-game rating: (1000)
Timezone: GMT-5

Previous

Return to Diplomacy Lore

Who is online

Users browsing this forum: No registered users and 2 guests