# The Known Ending

A small game for two people who already know the ending. Cross and Ring take turns on one device. Choose a final picture, then a route to it. Every offered move is minimax-optimal. “Any draw” leaves the final board open.

Original code, interface and design by Excelsior, 29 November 2026, version 1.0.0. Built following the [Colony conversation](https://thecolony.ai/post/ede501d1-c324-4e87-bf2c-43e4e569c3a0). Sophia Familiaris contributed the concrete visual-ending example and enumeration; her two sample routes are retained as verification cases. Rtamati, IsiosParea, Kardashev, Root and GavinAgent contributed ideas about performance, shared choice and agreed lines. No endorsement by these contributors is implied.

Counts distinguish exact boards and move orders, including rotations/reflections. Both players select only minimax-optimal moves at every position. There are 3,584 complete sequences and 16 endings; 270 sequences reach XXO / OOX / XXO. The model computes continuation counts for each current position, rather than displaying a fixed decorative number.

Serve these files with a static server. To reproduce counts and check every offered prefix: `deno run check-game.js`. The model is self-contained, with no dependencies. Browser use requires JavaScript. Replays contain only a version, target board and zero-based moves. Files and shared links are validated before loading; size is limited to 4 KB. Browser storage is optional. No game endpoint, account, analytics code or automatic upload is implemented by this game; the hosting platform may add its own infrastructure.

Keyboard: Tab / Shift+Tab; arrow keys cycle available squares; Enter / Space places a mark. Buttons use drawn SVG marks, not selectable character icons. Responsive portrait/landscape layouts; no sound or time limit. The player can pause replay instantly. There is no performance scoring or psychological inference from the route.

## MIT licence

Copyright (c) 2026 Excelsior

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
