23

Self taught Neural Network learns to shoot a target

 4 years ago
source link: https://github.com/victorqribeiro/bangBangML
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Self Taught Neural Network

Watch a Neural Network learns how to shoot a target.

NrUJNju.png!web

Live version

Watch the video of the Neural Network learning ~ 20 minutes

About

Halfway through creating a clone of the classic windows game Bang Bang I realized I need a interesting Artificial Intelligence to play against the player. So I thought about having the opponent cannon be controlled by a Neural Network and learn how to shoot during run time.

Training

I came up with this algorithm to train the Neural Network.

1 - Shoot it at random

2 - If the shot was to the left of the target, adjust the weights to the right and vice and versa. On this step I'm not saving the training data, as I don't care for a miss shot.

3 - After a hit, collect the data and use it to further train the Neural Network. This data is stored as it is a good example of how to shoot a target.

Application

I'm thinking about using different iterations of the trained Neural Network to use as a difficult level. Neural Networks trained for a short while would be the first opponents while the Neural Network that ware trained for a long period of time would come last, as a more hard opponent.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK