NeuroJS is a JavaScript framework for deep learning that runs entirely in the browser, with a particular focus on reinforcement learning. It implements a full neural-network stack plus the algorithms and demos needed to see agents learn in real time.
The library implements deep Q-networks and actor-critic models (via deep deterministic policy gradients), along with uniform and prioritised replay buffers and advantage learning to widen the action gap. Networks can be exported and imported in a binary format, so trained weights can be saved and shared. Its best-known demo is a 2D self-driving car that learns to navigate a track in the browser, alongside an advanced XOR example and a port of Andrej Karpathy’s Waterworld. NeuroJS has collected over 4,300 stars on GitHub and is released under the MIT license. The author notes the repository is no longer actively maintained, with the last updates in 2023, and suggests TensorFlow.js for new production work, but NeuroJS remains a compact, readable way to learn how reinforcement learning fits together.
NeuroJS is free and open source under the MIT license. There is no paid version, hosted service, or usage fee of any kind.
JavaScript developers and students who want to experiment with neural networks and reinforcement learning directly in the browser, and anyone looking for approachable source code to learn from.