Genetic Smart Rockets
Genetic Smart Rockets
This project was completed by Myself, Erie Adams, and Nicholas Robinson, as the final project for our Artificial Intelligence Practicum.
The goal was to create a game-like program where users could edit the attributes of the rockets in attempt to see how different factors effect Genetic Algorithms. Users can alter: mutation rate, speed, number of agents, and turn frequency.
The rockets then must complete different mazes, forcing the user to improve their parameters - thus enforcing their understanding of the algorithm. The fitness function was the most difficult aspect of this project. We settled on using a distance and time based function - rewarding rockets that got close to the goal quickly. We also used many different mating strategies, settling on each rocket getting 1/2 of its 'genes' from either parent (randomly chosen from most fit agents). The 'genes' are acceleration vectors which the rocket follows post spawn, and are chosen: odds from parent 1 and evens from parent 2. Rockets were limited to 50 genes - thus extremely long courses are not viable.
Fitness Functions
We tried many fitness functions to determine the 'success' of each rocket. For example, minimum distance to target, shortest time to target, least 'genes' used, etc.
We found that a combination of minimum distance and minimum time worked best. We added a large multiplier to those rockets that did reach the target. This ensures that the rockets converge on a successful set of 'genes' very quickly once a few succeed.
Mutation Rate
Mutations were a tricky aspect of the project. Many different mutation rates seemed to work well. This goes against the common notion that faster/more mutations would cause the rockets to succeed faster/more frequently. However, this did not seem to be the case (at least on the limited amount of maps we tested on).
Thus, we chose to let the user alter this as well, and simply start it at a successful default value, which we determined during testing.