{"id":21285062,"url":"https://github.com/beling/impartial-games","last_synced_at":"2025-07-11T11:32:12.073Z","repository":{"id":171044066,"uuid":"647373347","full_name":"beling/impartial-games","owner":"beling","description":"Rust software for solving impartial games.","archived":false,"fork":false,"pushed_at":"2024-09-12T21:20:19.000Z","size":197,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-13T11:02:12.684Z","etag":null,"topics":["cgt","chomp","chomp-game","combinatorial-game","combinatorial-game-theory","cram","game-tree","game-tree-search","grundy","impartial-games","mex","solver","solvers","sprague","transposition-table"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T16:31:27.000Z","updated_at":"2024-09-12T21:20:22.000Z","dependencies_parsed_at":"2023-11-29T16:29:19.517Z","dependency_job_id":"b6ec95b2-9d92-480b-b1f4-b35b9b3f25fb","html_url":"https://github.com/beling/impartial-games","commit_stats":null,"previous_names":["beling/impartial-games"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beling%2Fimpartial-games","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beling%2Fimpartial-games/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beling%2Fimpartial-games/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beling%2Fimpartial-games/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beling","download_url":"https://codeload.github.com/beling/impartial-games/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225715972,"owners_count":17512937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgt","chomp","chomp-game","combinatorial-game","combinatorial-game-theory","cram","game-tree","game-tree-search","grundy","impartial-games","mex","solver","solvers","sprague","transposition-table"],"created_at":"2024-11-21T11:18:05.874Z","updated_at":"2024-11-21T11:18:06.691Z","avatar_url":"https://github.com/beling.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rust libraries and programs for solving [impartial games](https://en.wikipedia.org/wiki/Impartial_game) and calculating their [nimbers](https://en.wikipedia.org/wiki/Nimber), developed by [Piotr Beling](http://pbeling.w8.pl/).\nCurrently, only the [normal play convention](https://en.wikipedia.org/wiki/Normal_play_convention) is supported, but support for [misère games](https://en.wikipedia.org/wiki/Mis%C3%A8re#Mis%C3%A8re_game) is planned.\n\nIncluded libraries:\n- `igs` ([crate](https://crates.io/crates/igs), [doc](https://docs.rs/igs)) - solves [impartial games](https://en.wikipedia.org/wiki/Impartial_game) under the [normal play convention](https://en.wikipedia.org/wiki/Normal_play_convention);\n- `ogs` ([crate](https://crates.io/crates/ogs), [doc](https://docs.rs/ogs)) - solves [octal games](https://en.wikipedia.org/wiki/Octal_game).\n\nIncluded programs:\n- `igsolve` ([crate](https://crates.io/crates/igsolve), [doc](https://docs.rs/igsolve)) - a console-based application for calculating nimbers with `igs`;\n- `ogsolve` ([crate](https://crates.io/crates/ogsolve), [doc](https://docs.rs/ogsolve)) - a console-based application for calculating nimbers with `ogs`.\n\n# Installation\nPrograms can be compiled and installed from sources. To do this, a Rust compiler is needed.\nThe easiest way to obtain the compiler along with other necessary tools (like `cargo`) is\nto use [rustup](https://www.rust-lang.org/tools/install).\n\nOnce Rust is installed, to compile and install a program with native optimizations, just execute:\n\n```RUSTFLAGS=\"-C target-cpu=native\" cargo install \u003cprogram_name\u003e```\n\nfor example\n\n```RUSTFLAGS=\"-C target-cpu=native\" cargo install igsolve```\n\n# The results obtained so far\nHere I provide the nimbers calculated using my software.\n\n## Cram (under the normal play convention)\n\n|       | 4 | 5 | 6 | 7 |   8   |   9   |   10  |   11  |\n|------:|:-:|:-:|:-:|:-:|:-----:|:-----:|:-----:|:-----:|\n| **4** | 0 | 2 | 0 | 3 |   0   |   1   |   0   | **1** |\n| **5** | - | 0 | 2 | 1 |   1   |   1   | **2** |   0   |\n| **6** | - | - | 0 | 5 |   0   | **1** |   0   |   ?   |\n| **7** | - | - | - | 1 | **3** | **1** |   ?   |   ?   |\n\nThe table shows the nimbers of initial [cram](\u003chttps://en.wikipedia.org/wiki/Cram_(game)\u003e) positions for different board sizes computed so far.\nNote 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).\n\nTo 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.\n\nThe nimbers of the smaller boards were earlier computed by [Glop](http://sprouts.tuxfamily.org/wiki/doku.php?id=records), which is the solver developed by Lemoine and Viennot.\nNimbers 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.\nUiterwijk 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)](https://dl.acm.org/doi/10.1007/978-3-030-65883-0_8).\nI have verified the correctness of all the nimbers in the table with my solver.\n\n# Publications and citations\nWhen using my software for research purposes, please cite the following paper which details the key algorithms used:\n* Piotr Beling, Marek Rogalski, *On pruning search trees of impartial games*, Artificial Intelligence, Volume 283, 2020, 103262, ISSN 0004-3702,\nhttps://doi.org/10.1016/j.artint.2020.103262","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeling%2Fimpartial-games","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeling%2Fimpartial-games","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeling%2Fimpartial-games/lists"}