Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VOLTA

A two-player abstract strategy game of polarity and reversal. Complete your circuit across a hexagonal board before your opponent turns your own walls against you. No dice, no cards, no hidden information — and, by construction, no draws.

Rose links top ↔ bottom. Teal links left ↔ right. First unbroken chain wins. Placing a disc can flip flanked enemy discs to your colour, so no lead is ever safe until the circuit closes.


Play it now

The game is a single self-contained file with zero dependencies.

  • Easiest: open index.html in any modern browser (double-click it).
  • Or run a local server:
    npm start        # serves at http://localhost:8080

Includes a 2-player hotseat mode and a vs Computer mode (Easy / Medium / Hard), an optional handicap, a flips toggle, and the pie rule for balanced openings.

How to play

See RULES.md for the full rulebook. In one breath: take turns placing one disc on any empty cell; a straight run of enemy discs capped by your own disc flips to your colour; connect your two edges to win.

Develop

npm test         # run the engine + self-play test suite (node --test)
npm run build    # regenerate index.html from src/ after editing the source
npm start        # serve locally

Source of truth lives in src/ as ES modules; npm run build inlines them into the shippable index.html.

Project structure

volta/
├── index.html              self-contained, playable build (generated)
├── src/
│   ├── engine.js           rules, flips, win detection, connection heuristic
│   ├── ai.js               heuristic computer opponent
│   ├── ui.js               board rendering, input, modes
│   └── index.template.html HTML shell + styles
├── test/
│   ├── engine.test.js      unit tests
│   └── selfplay.test.js    AI-vs-AI integration tests + balance stats
├── build.mjs               inlines src/ -> index.html
├── server.mjs              zero-dependency static server
├── package.json
├── RULES.md
├── CHANGELOG.md
└── LICENSE

Why this design

VOLTA is engineered around a short list of properties:

  • No draws, ever. A fully coloured hex board always has exactly one connecting side (the Hex theorem, equivalent to the 2-D Brouwer fixed-point theorem). Every turn fills one cell and flips never empty a cell, so the board fills monotonically and the game must end with one winner. The test suite confirms this on thousands of random boards.
  • No luck. Perfect information, fully deterministic — pure skill, with an optional handicap for mismatched players.
  • Balanced openings. The first player has a theoretical edge (self-play here shows ~73–80% with flips on); the pie rule neutralises it by letting the second player swap into a strong opening.
  • No elimination, no runaway leader. Both sides act every turn; the win is binary so no score can snowball, and flips give a built-in comeback.
  • Simple rules, deep play. The rules fit on a card; the state space is astronomical (up to 3^(n²) ≈ 10⁵⁷ at 11×11).

License

Proprietary — All Rights Reserved. See LICENSE. For permissions or commercial licensing, contact the author.

Author

Ideatrino · [email protected] · © 2026

About

A two-player abstract strategy game of polarity and reversal — complete your circuit across a hex board. No luck, no draws.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages