← all repositories
MagicCube/tensorflow-rex-run

Teaching Chrome's dinosaur to think, badly

A TensorFlow.js playground where neural networks learn to jump over cactuses—or don't.

673 stars JavaScript AgentsML Frameworks
tensorflow-rex-run
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

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:8080 after npm 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-run vs tensorflow-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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.