🦖 Train Google's dinosaur using neural network in browser
MIT License
Train Google's dinosaur using neural network in browser.
Why ? I wish the little dino to get smarter one day.
Will the little dino grow up as a dinasour ? The answer is NO. It finally learns when to duck, jump and walk only.
How can I train my dino ? Follow the installation guide, play the game as usual.
node app.js
.We are using simple neural network to train the dino, to reduce the latency of the game, three workers are used to build the neural system of dino. They are respectively motor, visual and brain. You can find the scripts under the folder /public/javascripts/systems
.
Motor is responsible for receiving signals from the brain in order to take reactions (e.g. duck, jump and walk) and sending the vision signals to the visual system.
Visual is responsible for translating vision signals from the motor system into brain-known signals and sending to the brain.
Brain is responsible for receiving signals from visual system in order to do behaviour training, sending feedback signals to the motor system.
Currently, the dino has 200 * 91 pixels visual range and the sampling width is 50 pixels. The visual signal is fetched every half second which is the reaction time of dino. It is an 1-D vector which is composed of 40 values. Each value is computed by the norm of a 1x91 vector which contains the color of pixels. The color of each component in the game is #535353 (except the cloud and high score banner), therefore we can easily retrieve a vector with 0 and 1, then its norm is computed.
The structure of neural network is as follow:
They are the first team to implement this idea. See IAMDinosaur.