Giter Club home page Giter Club logo

impartial-games's Introduction

Rust libraries and programs for solving impartial games and calculating their nimbers, developed by Piotr Beling. Currently, only the normal play convention is supported, but support for misère games is planned.

Included libraries:

Included programs:

  • igsolve (crate, doc) - a console-based application for calculating nimbers with igs.

Installation

Programs can be compiled and installed from sources. To do this, a Rust compiler is needed. The easiest way to obtain the compiler along with other necessary tools (like cargo) is to use rustup.

Once Rust is installed, to compile and install a program with native optimizations, just execute:

RUSTFLAGS="-C target-cpu=native" cargo install <program_name>

for example

RUSTFLAGS="-C target-cpu=native" cargo install igsolve

The results obtained so far

Here I provide the nimbers calculated using my software.

Cram (under the normal play convention)

4 5 6 7 8 9 10 11
4 0 2 0 3 0 1 0 1
5 - 0 2 1 1 1 2 0
6 - - 0 5 0 1 0 ?
7 - - - 1 3 1 ? ?

The table shows the nimbers of initial cram positions for different board sizes computed so far. Note that the symmetry strategy implies that even-by-even boards are losing and therefore of nimber 0 (the second player can win by responding with moves symmetrical to the center of the board).

To the best of my knowledge, the bold values (for the largest boards: $9 \times 7$, $8 \times 7$, $9 \times 6$, $10 \times 5$, $11 \times 4$) were calculated by me and published here for the first time.

The nimbers of the smaller boards were earlier computed by Glop, which is the solver developed by Lemoine and Viennot. Nimbers of most boards no larger than $5 \times 7$ were first given by Martin Schneider in his master's thesis entitled Das spiel juvavum in 2009. Uiterwijk reported that the $11 \times 5$ board is losing (and thus of nimber 0) in his paper Solving Cram Using Combinatorial Game Theory (Advances in Computer Games: 16th International Conference, ACG 2019, Macao, China, August 11–13, 2019). I have verified the correctness of all the nimbers in the table with my solver.

Publications and citations

When using my software for research purposes, please cite the following paper which details the key algorithms used:

impartial-games's People

Stargazers

 avatar

Watchers

 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.