Nim Game: A game of logic and strategy with matches: History, science, and user guide

This document covers the history, science, and user guide for the Nim Game, version 2.0, a free computer version of Nim, in which the player and the computer take turns removing matches from rows of 1, 3, 5, and 7, as many as they like but from one row only, and the player who takes the last match loses. Version 2.0 rewrites the game in plain HTML, CSS, and JavaScript, delivered as a web page, an installable web app, and a desktop program, and adds a second rule (last match wins), four more boards (3-4-5, 2-4-6-8, 1-2-3-4-5, and random rows), a Perfect and a Learner computer, Undo, Hint, and Show the math. The first chapter traces Nim from its mathematical theory by Bouton in 1901, through the Nimatron of the 1940 New York World's Fair, the Nimrod computer of the 1951 Festival of Britain, and the film Last Year at Marienbad, to the teacher who taught the author the game, the web page of 2010, the desktop program of 2012 to 2025, and version 2.0. The second chapter explains the mathematics: won and lost positions, the rows in binary, the nim-sum, the change made by the misère rule, how the computer plays and how to beat it, a worked game, and the Sprague-Grundy theory; on the classic board, 48 of the 383 positions are lost, the starting position among them, so the player who moves first cannot win against perfect play. The third chapter is a quick guide to playing the game.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-02
DOI
https://doi.org/10.5281/zenodo.24749515
Primary Topic
Artificial Intelligence in Games
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Nim Game: A game of logic and strategy with matches: History, science, and user guide

Luis Orlindo Tedeschi
Zenodo (CERN European Organization for Nuclear Research)
Artificial Intelligence in Games
article

Nim Game: A game of logic and strategy with matches: History, science, and user guide

Luis Orlindo Tedeschi
article en

Abstract

This document covers the history, science, and user guide for the Nim Game, version 2.0, a free computer version of Nim, in which the player and the computer take turns removing matches from rows of 1, 3, 5, and 7, as many as they like but from one row only, and the player who takes the last match loses. Version 2.0 rewrites the game in plain HTML, CSS, and JavaScript, delivered as a web page, an installable web app, and a desktop program, and adds a second rule (last match wins), four more boards (3-4-5, 2-4-6-8, 1-2-3-4-5, and random rows), a Perfect and a Learner computer, Undo, Hint, and Show the math. The first chapter traces Nim from its mathematical theory by Bouton in 1901, through the Nimatron of the 1940 New York World's Fair, the Nimrod computer of the 1951 Festival of Britain, and the film Last Year at Marienbad, to the teacher who taught the author the game, the web page of 2010, the desktop program of 2012 to 2025, and version 2.0. The second chapter explains the mathematics: won and lost positions, the rows in binary, the nim-sum, the change made by the misère rule, how the computer plays and how to beat it, a worked game, and the Sprague-Grundy theory; on the classic board, 48 of the 383 positions are lost, the starting position among them, so the player who moves first cannot win against perfect play. The third chapter is a quick guide to playing the game.

Zenodo (CERN European Organization for Nuclear Research)
Texas A&M University (US)
Artificial Intelligence in Games
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon