Contents
- Bot Input
- Bot Output
- Gameover Conditions
- Rankings
- Map File Format
- Map Generator(s)
- Match File Format
Bot Input
Parameter Information
At the beginning of a match, each bot is passed parameters about the match, starting with
loadtime #number of milliseconds that your bot has to setup turntime #number of milliseconds your bot has each turn no_rows #number of rows for the map no_cols #number of columns for the map no_players #number of players bot_id #your bot id map #followed by no_rows lines of no_cols chars giving the map
After the parameters will be
Your bot will be given a parameter
Turn Information
The start of each turn will begin with the server sending
Gameover Information
The server will indicate to your bot that the match if over for you by sending
Sample Input
turn 0 loadtime 3000 turntime 1000 no_rows 20 no_cols 30 no_players 3 bot_id 0 map ready turn 1 p a 5 5 p b 10 15 p c 15 25 go turn 2 p a 6 5 p b 10 14 p c 14 25 go end
Bot Output
From when the server sends
Gameover Conditions
Any of the following conditions will be gameover for a bot:
- timing out during the set up of the match (ie. failing to send
go to the server withinloadtime of the server sendingready to the bot); - crashing in to a wall (including locations that have already been visited by one of the bots);
- sending an invalid command to the server;
- timing out during a turn of the match (ie. failing to send a valid move to the server within
turntime of the server sendinggo to the bot during one of the turns).
The server will indicate to your bot that the match if over for you by sending
Rankings
For information on how ELO ratings are calculated for two player games, see the Wikipedia page for the ELO rating system along with this blog post. The ELO ratings forFor a given match let:
- $\text{ELO}_p^{\text{old}}$ be the old ELO rating of player $p$, ie. before the match;
- $\text{ELO}_p^{\text{new}}$ be the new ELO rating of player $p$, ie. after the match;
- $E_{p,q}$ be the expected score of player $p$ against player $q \neq p$; and
- $A_{p,q}$ be the actual score of player $p$ against player $q \neq p$.
For each distinct players $p, q \in P$, the expected score of player $p$ is calculated as \[E_{p,q} = \frac{1}{1+10^{(\text{ELO}_q^{\text{old}} - \text{ELO}_p^{\text{old}})/400}},\] and the actual score for player $p$ is $A_{p,q} = \begin{cases}1 & p \text{ wins;}\\0.5 & \text{draw; and}\\0 & q \text{ wins.}\end{cases}$
The ELO rating of player $p$ after the match is calculated as: \[\text{ELO}_p^{\text{new}} = \text{ELO}_p^{\text{old}} + K{\large\Sigma}_{q \neq p}(A_{p,q} - E_{p,q})\]
New players start with an ELO rating of $2000$ and a $K$ factor of $24$ is being used.
Map File Format
At the beginning of a map file is parameters about the map, with the format
no_rows #number of rows for the map no_cols #number of columns for the map no_players #number of players
After the parameters will be
no_rows 20 no_cols 30 no_players 3 map .............................. .............................. ...a.......................... .........%%%%%%%%%%........... .............................. .............................. .............................. .............................. .............b................ ...................%%%%%%%%%%. .............................. .............................. .............................. .............................. .............................. .......................c...... %%%%%%%%%....................% .............................. .............................. ..............................
Map Generator(s)
Details to come.
Match File Format
The server generates a match file at the end of each match which is used to update the ranks and loaded by the match-viewer on the site.
At the beginning of a match file is parameters about the match, with the format
no_rows #number of rows for the map no_cols #number of columns for the map no_players #number of players usernames #list of usernames
After the parameters will be
After the map will be
An example match file is as follows:
no_rows 10 no_cols 17 no_players 9 usernames antimatroid testbot duckbot pwnworthy betty kate p1 p2 p3 map ................. .b....d.......... ........%....c... ...%....%%%...... ........%.%...... ........%.%...... ................. e..a......f...... .....ghi......... ................. no_moves 6 10 8 4 4 1 1 1 1 moves nnwsww wwwwwwwwss nneeennw nent nnni f t t t