Skip to content

Falling Balls + DQN, Matter.js + TensorFlow.js

Notifications You must be signed in to change notification settings

hpssjellis/dodge_tfjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Falling Balls + DQN

gif

A demo of a DQN agent that learns to dodge falling balls, inspired by an old iPhone game.

The game utilizes Matter.js while the neural network is built with TensorFlow.js.

Every frame, the agent senses the environment through raycasting. Actions are LEFT, STAY, and RIGHT. It receives a reward of +1 for living and -1 for dying.

On the webpage, hyperparameters can be edited at the bottom.

Note: Currently, resetting and restarting the agent seems to cause a small memory leak. Refreshing the page is recommended if this causes any problems.

Note: Currently, training will pause if the browser tab loses focus (depends on setTimeout).

Webpage

About

Falling Balls + DQN, Matter.js + TensorFlow.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.1%
  • HTML 12.8%
  • CSS 1.1%