Tron game server, client, and library for Python and Turing.
Each iteration lasts at most 0.1 s (by default) and the initial position is a 50x49 board with the two light cycles pointed at each other. Because of the timeout, it makes sense to disable drawing the game unless you're debugging.
You need twisted
, python
, and a web server with autoindex, such as Apache, nginx
or even python -mSimpleHTTPServer
.
Run ./tron.py
and navigate to ./viewer.html
Run make tron-win32.zip
to package twisted
and zope
for Windows users.
tron_sample.t
uses the module in tron.tu
and implements a greedy algorithm.
tron_sample.py
uses the module in tron.py
and implements the same greedy algorithm as tron_sample.t
.
tron_tester.py
accepts keyboard input for the bot.
voronoi.py
and negamax.py
are examples of stronger bots. Compiled and optimized binaries are included.
They're based off of: http://www.a1k0n.net/2010/03/04/google-ai-postmortem.html
You can import tron.tu
or tron.py
and make your own bot. You need a bot name and unique key (for tracking wins and losses). Encryption is not supported. See tron_sample.*
for examples.