Skip to content

A game made in Processing based on the 2D version of "Tron" and featuring AI neural network enemies.

Notifications You must be signed in to change notification settings

Zenith08/TronMachineLearning

Repository files navigation

Tron 2D Light Cycles

Featuring Neuroevolution

Banner After hearing about the possabilities of machine learning and seeing examples of the applications of this technology, I was looking for a way to use the techology myself. The solution was to make a simple 2D game, based on the Tron movies, where a player moves around an arena leaving a lethal trail behind them. Then, using a slightly modified form of the Evoneat Library, I was able to connect the games AI controller to the neural networks.

Training

Training The NEAT algorithm attempts to simulate evolution, so a system was created where two AIs would play each other at random. They would be scored on how long they lasted, complexity of maneuvers, and whether or not the AI won. In principal, this made sense. In practice however, because each AI only played one other, AIs would lose points if their random opponent lost too early into the game. After 1500 generations of evoltion, some collision avoidance began to develop, but only in some directions.

Survival Mode

Survival In an attempt to resolve the issues of two AIs impacting each other's scores, a survival mode was created where each AI only had to last as long as it could without leaving the bounds of the screan, or crossing their own path. This had better results but ultimatly, this problem is not easily modeled with a neural network and they still struggled.

About

A game made in Processing based on the 2D version of "Tron" and featuring AI neural network enemies.

Topics

Resources

Stars

Watchers

Forks