Diplomacy

BlabBot

John Newbury       19 October 2008

Home > Diplomacy > BlabBot

AI in the Game of Diplomacy: the BlabBot Bot


Outline

BlabBot is a bot that I am developing, as an extension to David Norman's DAIDE AiClient Framework, initially just to deal with all types of press message (hence its name), but now much more besides. BlabBot, the bot and its phase within my overall Diplomacy project, are commonly abbreviated to BB. It is founded on the BlabBot Base (BBB).

The C++ source, tested under Microsoft Visual Studio version 6.0 in Windows XP Home Edition, will be released, free for non-profit purposes, when more fully debugged and documented.

Released Versions

BlabBot 2.1

You may download the binary version of BlabBot 2.1. See Acknowledgements and Conditions of Use.

BlabBot 2.0

It is identical to Version 1.0, except that it corrects various bugs. As of release, it beats all bots except KissMyBot 3.01 (in a suitable tournament; for example, Tournament #9).

This is now withdrawn, as Version 2.1 fully replaces it and more. Performance in Tournament #9 would have been identical..

BlabBot 1.0

This is now withdrawn, as a critical bug in its heuristic code left it insignificantly better than DumbBot 4.

Future Versions

See Roadmap for likely features.

Description

Arguments

The following optional command-line arguments may be used in addition to those of DumbBot:

Heuristics

The heuristics of version 2.1 are as follows (later versions being very similar, as will be explained on release):

BlabBot is basically David Norman's DumbBot, but with very simple press enabled, as follows, where x is our own power:

  1. Send PRP(PCE(x y)) separately to every power y.

  2. If we receive YES(PRP(PCE(x y))) from power y, then consider y to be our "friend".

  3. If we receive PRP(PCE(x y)) from power y, then send YES(PRP(PCE(x y))) to y.

  4. If we receive confirmation to our YES from the server, before we receive a cancellation from y to the PRP from y, then consider y to be our "friend".

  5. If all remaining powers are our friends, action depends on Policy:

    1. Joe: issue DRW (no arguments) each turn.

    2. Mac: use normal DumbBot strategy; that is, ignore friendship.

    3. <default>: undefined.

  6. If at least one remaining power is not a friend, then make the DumbBot strategy use "friendly" weighting factors for friendly powers. Basically, friends are treated more like we treat our own power. We assign low weights to attack their supply centres and low weights to defend against attacks from them. Friends are ignored when considering strength of the worst potential attack, and for strength of our own attack or defence. (See source, when released, for details.)

  7. Wait one second in the first turn before submitting orders, to allow time for peace to be negotiated, without delaying the game too much.

  8. If a peace agreement is reached after we have submitted our orders, send revised orders.

Notes:

  1. No press is sent of accepted if BlabBot is restricted to Level < 10.

  2. Friendship may be noted in [2] and/or [4]. If both sides use the same strategy, both events occur.

  3. The complexity of waiting until [4] before noting friendship, rather than doing so in [3], is in anticipation of a CANCEL statement being defined.

  4. If we are friends with everyone [5], we ignore friendship to help get a game resolution (otherwise no one tends to attack anyone).

  5. In [5] there is code to send a DRW (no arguments); that is, agree to draw between all remaining players. This saves time in the final stages, especially when only BlabBots are left, as the net result would be the same no matter which bot soloed or was eliminated. Interestingly, if only BlabBots are entered in a game, they immediately agree not to compete. However, this feature is temporarily withdrawn, as the DTDT (tournament director) cannot cope with the game summary message from server (as it does not include year of termination). (If David does not add the year here, an Observer will be needed to report it to DTDT.)

  6. I do not claim that my heuristic in [6] is optimum (or even that I fully understand the DumbBot method).

  7. GOF is (left) set, so without the small delay in [7], the turn might finish before all possible peace had been negotiated – wasting some potential cooperation in the first turn. However, slow players; for example, humans, still get a chance to be treated as friends (as long as they do not all submit their orders too quickly after sending their agreement – impossibly quick for humans).

  8. Peace agreements in the above form are accepted in any turn; once made they are never rescinded. (Strictly speaking, this would need to be changed if PRPs are redefined to be cancelled at the end of a turn, but this would not alter the effectiveness for communication between existing bots.)

  9. The order of powers x and y is immaterial, except that we retain the order when sending replies. (We tolerate either order on replies received.)

  10. A BWX reply is sent for any other recognised and valid press that requires a reply (even including a proposal for NOT(PCE(x y)), PCE that specifies other powers, or use of INS instead of PRP).

  11. A HUH reply is sent for press; that is, too high a level, followed by a TRY if not previously sent to that power.

  12. The same should apply if received press appears to be syntactically or semantically invalid (though the former ought to be eliminated by the server). However, this currently often (perhaps always) crashes the bot.

  13. A similar approach could probably be applied to most other bots, so BlabBot's high rating and ranking (in suitable tournaments) is likely to be temporary. Furthermore, the strategy is extremely fragile: it relies on total trust between bots with a peace agreement. It would presumably fare much worse than DumbBot against any bot that negotiated peace but did not honour it. Against such a liar, BlabBot would leave itself defenceless, never attempt to exploit the apparent friend, nor even attempt to detect the lie.

  14. Like any other press strategy, its effect will be neutral if too few other bots can understand it, and will be ineffective if too many use the same strategy. Its effect will only be significant in certain types of tournament, where there tend to be many clones in any game.

Symbolism

The name BlabBot (BB) not only indicates an ability and propensity to talk (use press) – albeit it does so much more than when originally conceived – but also indicates that it gives away full details many parts of my bot code that I could well have chosen to keep secret. Note the colours representing land and sea, and conflict between the two bloody red Bs (belligerent b*st*rds) that confront one another in the BlabBot icon.

Acknowledgements

BlabBot is based on DumbBot, produced by David Norman, and which incorporates components produced by Andrew Rose. It also uses a random number generator by Takuji Nishimura and Makoto Matsumoto.

Conditions of Use

BlabBot and its documentation, may be freely used for non-commercial purposes. All rights reserved. No warranty or liability is expressed or implied. Please contact me if you may wish to use it for commercial purposes. See BlabBot Conditions of Use.doc in the corresponding blabbot zip file for details.


Tracking, including use of cookies, is used by this website: see Logging.
Comments about this page are welcome: please post to DipAi or email to me.