The classic Cart Pole game implemented in JavaScript, and powered by TensorFlow.js.
The Cart Pole game is the classic 'Hello World' for Reinforcement Learning. A pole is attached by an un-actuated joint to a cart, which moves along the ground. The system is controlled by applying a force vector of [+1, 0] or [-1, 0] to the cart. A slight but random pendulum starts immediately after the game begins, and the goal is to prevent the pole from falling down.
npm install
npm start
Visit http://localhost:8088