Communications model


This document describes the communications model used by the Diplomacy AI Development Environment (DAIDE) so that several separate computer Diplomacy players may compete against each other.


The basic model is a client-server model. Each Diplomacy AI and any observers (all "clients") connect to a single server over the internet or other IP network (e.g. LAN).

Client-Server Model

The server acts as the arbitrator (GM), allowing clients to join the game, accepting orders, keeping time, adjudicating orders, sending results and sending communications ("press") between AIs. The clients connect to the server, submit press and orders and receive results. Clients never communicate with each other directly. All press goes through the server.


Clients communicate with the server by sending it messages which conform to the Language Syntax [RTF] [External] and are encoded and transmitted as described by the Communications Protocol [External].


People writing AIs are likely to be located all over the world. We wish to have an environment where all the AIs can play together so the common internet protocol TCP/IP is used for all communications.

In Diplomacy, the various players have an inherent lack of trust of each other. Messages are passed in secret between them, orders are kept secret until all are submitted and lies and deception are commonplace. Therefore, it is necessary to have an independent adjudicator to keep the orders and announce the definitive results for each season.

To make the task of writing an AI tractable for the newcomer, the language for communication between AIs has been split up into levels (starting with no-press and working up to complex negotiations). It is the server's responsibility to enforce the language level limit for any particular game. Therefore, the AIs are prevented from being aware of the identity (e.g. IP address) of other AIs in the game. This also requires a central server.

This all leads naturally to the model described above.