GithubHelp home page GithubHelp logo

yingted / tron Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.13 MB

tron server/client/api for linux and windows in turing and python

Python 90.83% C++ 0.40% Shell 0.03% C 8.38% Objective-C 0.02% GAP 0.26% Turing 0.07% Perl 0.01%

tron's Introduction

tron

Tron game server, client, and library for Python and Turing.

Rules

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.

Server requirements

You need twisted, python, and a web server with autoindex, such as Apache, nginx or even python -mSimpleHTTPServer.

Usage

Run ./tron.py and navigate to ./viewer.html

Packaging for Windows or Turing

Run make tron-win32.zip to package twisted and zope for Windows users.

Bots

Included

Turing

tron_sample.t uses the module in tron.tu and implements a greedy algorithm.

Python

tron_sample.py uses the module in tron.py and implements the same greedy algorithm as tron_sample.t.

User-controlled

tron_tester.py accepts keyboard input for the bot.

Strong bots

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

Custom

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.

tron's People

Contributors

yingted avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.