Teaching Chrome's dinosaur to think, badly
A TensorFlow.js playground where neural networks learn to jump over cactuses—or don't.

What it does
This is a browser-based training ground for the Chrome offline T-Rex game. It wraps the familiar dino-jumper in a modern ES6/ES7 codebase, then hands the controls to TensorFlow.js models. You can watch a neural network attempt the one skill every human already mastered by accident: pressing spacebar at the right time.
The interesting bit
The “multiplayer mode” is the real hook—it means you can run genetic algorithms, pitting populations of dim-witted dinos against each other until the fittest survive. The README also teases event hooks (onReset, onRunning, onCrushed) that suggest this was built as a platform for experimenting, not just a one-off demo.
Key highlights
- Rewritten in ES6/ES7 with Webpack and LESS—no archaeological jQuery layers
- Genetic algorithm support via multiplayer mode
- Event-driven architecture for hooking into game lifecycle
- Pre-built example models included so you don’t start from zero
- Runs locally at
localhost:8080afternpm install && npm start
Caveats
- The README is sparse on actual model architecture or training details; the Chinese Zhihu article likely holds the real explanation
- The project name is misspelled (
t-trex-runvstensorflow-rex-run) in its own documentation - No visible performance metrics, convergence times, or success rates—unclear how well the AI actually plays
Verdict
Worth a spin if you’re teaching yourself TensorFlow.js or genetic algorithms and need a visual, low-stakes sandbox. Skip it if you want production-ready RL code or documentation that explains what the neural net actually learned.