top of page

Machine Learning Dinosaur Game

I have wanted to start learning how to program machine learning for a while. I did research online about the different types of algorithms there are for machine learning. I figured that the NEAT algorithm would be the easiest for beginners. I thought the Dinosaur game would be simple to create, but it would be able to show the full capabilities of the NEAT algorithm. I started by learning how to code the dinosaur game in python. After that, I watched many different tutorials on how to implement the NEAT algorithm into the Dinosaur game. The NEAT algorithm is generation based. It will spawn in a certain amount of players, and the players of that generation will get scored. I made it so the farther a player gets, the more points it earns. The highest scores from that generation will heavily influence the next generation because we want to keep the traits that made those dinosaurs do well. In order for this neural network to build, I have to give it basic inputs from the game like distance from each dinosaur to the nearest obstacle, what type of obstacle is closest, the game speed, etc. Since the AI doesn't know what to do for the first generation because it hasn't made any connections, the neural networks for the dinosaurs will be randomized. After learning the basics of machine learning and its implementation, I plan on expanding on this knowledge. In the future, I want to start learning different types of machine learning algorithms as there are many out there.

bottom of page