Code Monkey home page Code Monkey logo

racetrack's Introduction

Racetrack

Racetrack is a cli to play a match between two Tak engines, to see how they play and measure their relative strength.

Racetrack uses the text-based TEI (Tak Engine Interface) to communicate with the engine binaries, very similar to UCI for Chess. The engines communicate with Racetrack by simply sending string commands through stdin/stdout, see the TEI section for more.

TEI

Tak Engine Interface is a protocol based on Universal Chess Interface, intended to be as similar as possible. The key difference are:

  • The protocol uses tei everywhere uci would be used, like teiok and teinewgame
  • Additionally, teinewgame requires the GUI to send a size parameter. So teinewgame 5 for size 5.
  • Move and position notations are obviously different. Portable Tak Notation and Tak Position System are used, respectively.

Engines with TEI support:

Build

Building the project from source requires the Rust compiler and Cargo (Rust's package manager) installed, both included in the Rust downloads.

The minimum required Rust version is 1.51, released March 25th 2021.

To build and run:

cargo build --release
cargo run --release

This command will automatically fetch and build dependencies. The resulting binaries are written to racetrack/target/release.

Usage

Run racetrack --help to see a full list of options.

To play two games between Tiltak and Taktician, with 60 seconds each for each game:

racetrack --engine path=tiltak --engine path=taktician arg=tei --games 2 --all-engines tc=60

To play two games between Tiltak and Topaz NNUE, with 3 minutes initial time, 3 second increment, and 2 komi:

racetrack --engine path=tiltak --engine path=topaz option.NN=topaz.txt --games 2 --komi 2 --all-engines tc=180+3

Notes for engine developers

  • Use the --log argument to print a full log of TEI communications for debugging.
  • Racetrack uses two non-standard rules: Games are adjudicated as drawn if the exact same position is reached three times (Identical to the rule in chess), and if a game's length exceeds 100 moves.
  • If an engine plays an illegal move or crashes, the game is ruled as a loss, but the tournament continues.
  • Engines are not ordinarily re-started between games, except for after crashes.
  • stderr output from the engines is captured, and echoed to Racetrack's stderr. If you're getting weird output, that's probably why.

racetrack's People

Contributors

mortenlohne avatar cdbfoster avatar jakur 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.