Enhancement One: software design and engineering
Pirate treasure-hunt agent
From Current and Emerging Trends in Computer Science
A deep Q-learning pirate that learns to reach the treasure from every cell of a maze. I rebuilt a single course notebook into a tested, configurable and secured Python package with its own command-line tool.
- Faster training: 179.9 s down to 18.0 s on the same laptop
- 10x
- Faster training: 179.9 s down to 18.0 s on the same laptop
- Automated tests on every push
- 140
- Automated tests on every push
- Known security advisories
- 19 to 0
- Known security advisories
- Eight modules with no global state, in place of one notebook that shared a global model.
- Mazes load from files, a generator builds only solvable ones, and every setting is validated before use.
- Early stopping that actually runs, and a saved model whose SHA-256 is checked before every load.
- Pinned dependencies took 19 known security advisories down to 0.
- Python
- Keras
- TensorFlow
- pytest
- GitHub Actions
The real agent learning, game by game
Win rate over the last 32 games for the reference run. It wins from every cell at game 286, then spends 10 more games polishing routes.
From the run log in the project's repository. Try a small version of the agent at the top of this page.
