Dupont
In DevelopmentA natural-language adapter that answers questions about a saved chess game from Stockfish, not a guessed board.
- Python
- Stockfish
- Ollama
- pytest
- MkDocs
Problem & Motivation
Pasting a PGN into a general chatbot and asking about the game produces invented positions. The model misremembers where the pieces are, makes up moves, and states evaluations the engine never calculated. Dupont is a local prototype that keeps those two jobs apart. It is in development: a v1 single-machine build, with no packaged distribution and no hosted product.
System Architecture
The program reads a saved game, either pasted, piped, or passed as a PGN path. Stockfish returns the best move, the score, and the refutation for the position. A local language model, reached through Ollama, is allowed only to explain those facts. If the model is not present, the coach prints the engine output directly. The session commands step through the game and ask for an explanation at different depths. Sixty-eight tests run under pytest and Hypothesis. The working notes publish to GitHub Pages through MkDocs.
flowchart LR
pgn["PGN"] --> cli["Dupont CLI"]
cli --> engine["Stockfish"]
engine --> coach["Ollama coach"]
coach --> reader["Plain-English answer"]
Key Engineering Trade-offs
- Stockfish owns the calculation. The language model is instructed to explain the engine result and not to invent moves or evaluations. That removes hallucinated board states. It also means the written answer is only as useful as the engine line it was given.
- The coach runs on one machine, with Stockfish installed locally and an optional Ollama model. Skipping the model still returns engine facts. There is no hosted service to operate, and there is also no shared deployment.
- The docs site is published on every push to
main. The application itself is not. A change to the coach is a local run and a test suite, not a release.