vindinium-c

Vindinium-C repository contains a bot for vindinium.org [1] programming game. The bot is fairly good. As of 2017, it is consistently the highest-ranking active bot (running as "Mini-Me"), and has been this way for years.

How to get it

Normally you can get the source for this bot via Mercurial like so:

hg clone http://hg.tx97.net/vindinium-c

... or directly at [2].

How to build it

This bot was developed and is known to work under FreeBSD/amd64. You may also have luck building it on other Unixoid systems too. For this you'll need a C compiler and these three libraries:

The whole thing should be buildable by running make. This will produce two binaries: bot and mini-bot; the former is the same as the latter, but is set to search deeper, consume more memory and take more time. Don't let that fool you though, mini-bot is reasonably strong, and generally good enough for most purposes.

If make doesn't work for some reason, just compile bot.c with your C compiler and link the result with those three libraries.

Note that some of the code relies on unaligned memory access, so whether or not it works anywhere other than amd64, you'll have to see for yourself.

How to run it

Register an AI vindinium.org -- you'll be given a key string. Run the bot like this to run it in a training game:

./mini-bot training <key>

... or like this to run it in the arena:

./mini-bot arena <key>

If you'd like to run this bot 24*7, there's a script for this, run-arena-loop.sh. Once you've entered your bot name/key/uid into it, you can just leave it running. The script will archive bot output somewhere into /tmp.

The bot binary also knows a number commands other than training and arena; those are mainly used to debug bad bot behaviour by analyzing replays. Look into bot.c to see what's what.

How it looks like

Like so:

[ qqkg7wxw ]
{##########$0########$-##########} Dangler
{######  ##  ########  ##  ######} @0  99hp  567g  5m
{######      ########  @3  ######} Dangler
{##$0        ##    ##        $2##} @1  19hp 1051g  8m
{####      ##        ##      ####} F:Mini-Me
{##$1    []    ####    []    $2##} @2  96hp 1510g  2m
{##$1##      ########      ##$1##} Calrissian
{##            ####      @2    ##} @3  51hp   62g  0m
{##            ####    @1      ##} turn 938/1200
{##$1##      ########      ##$1##}
{##$1    []    ####    []@0  $0##}
{####      ##        ##      ####}
{##$1        ##    ##        $0##}
{######      ########      ######}
{######  ##  ########  ##  ######}
{##########$1########$0##########}
Action/1: DecY(<<), Depth: 4
Nodes: 55881
HT: MAX 16887/49110 34.4%, MIN 891/6771 13.2%
CUTS: alpha 1619, beta 3580
TBL: 34304/1048576 3.3% 24MB
AI time: 33.656ms

If you like this sort of ASCII graphics display, then you might want to look at vindinium-tv [6] too.

How it works

This bot uses a fairly straightforward Best-Reply Search [7], with alpha–beta pruning, iterative deepening, transposition table, and a simple heuristic at the end.

You can read the excellent Chess Programming Wiki [8] to learn more about how these sort of search routines are implemented.

References

  1. http://vindinium.org/
  2. http://hg.tx97.net/vindinium-c/
  3. https://curl.haxx.se/libcurl/
  4. https://lloyd.github.io/yajl/
  5. https://libarchive.org/
  6. http://tx97.net/vindinium-tv/
  7. https://dke.maastrichtuniversity.nl/m.winands/documents/BestReplySearch.pdf
  8. https://chessprogramming.wikispaces.com/