Much of the software in the dip directory was evolved from the base software for developing Diplomacy bots found on the DAIDE (Diplomacy AI Development Environment) website. That software was refactored, decoupled from Windows (to run as a console application), and evolved to introduce C++11 capabilities.
The extras directory should give you an idea of the current state of
this software. To build a bot that plays the game, derive from BaseBot
and follow the instructions in BotType.h. If you simply build the
software as is, it produces an observer bot that can join a game and report on its progress.
Several files in the extras directory illustrate the output from this observer. All the
games in that directory were played by instances of the impressive Albert bot:
- A win by Turkey in a standard game.
- A draw between England, France, and Austria in a fleet_rome game.
- The first season of a classical game.
The last game is included because it is accompanied by a trace
of the game's startup and initial season. This should give you an idea of the debugging
capabilities available in RSC. The last thing in the extras directory is a Win32 debug
executable of the observer bot (obsbot.exe). If you launch it with the -L3
option, it will
capture the level of information shown in that trace. The trace is saved to a file using
the >save
command. CLI commands are documented here, but only
those available in the NodeBase
and NetworkBase
namespaces are available to a bot. If
you start it with -L2
, the function trace is omitted. Launching with -L1
also omits
socket events, leaving only the messages. Finally, launching with -L0
will capture no
debug information.
To build the observer bot, or even subclass it to create a bot that plays the game, start
with the instructions on the main page. However, the observer bot is not
enabled in a default RSC build. But it is easy to target the build for a bot by modifying
main
as follows:
- In the list of
#include
directives, comment out all...Module.h
entries and uncomment the one forDipModule.h
. - In the list of
using
directives, comment out all of them and uncomment the one fornamespace Diplomacy
. - In the list of
Singleton
invocations, comment out all of them and uncomment the one forDipModule
. - DAIDE Server 0.38, which can be downloaded from the DAIDE
site, only supports IPv4, so change
SysIpL2Addr::SupportsIPv6
toreturn false
.
If you've already developed a bot, rebasing it onto RSC will require a bit of work because some of the interfaces have changed. However, it shouldn't prove too difficult. Note that only the software exercised by the observer bot has been tested; Adjudicator.cpp probably contains a few surprises at this stage.