Object oriented robot simulation using arrays, inheritance, polymorphism, and encapsulation. The program runs 20 generations of 200 robots traversing a grid to collect batteries and increase their lifespan. The robots utilize directional movemnent based upon input of what is directly around them on the grid. The directional behaviors from these inputs are randomly generated for the first generations and these behaviors are the robots genes. The best 100 robots from the generation will have half their genes passed down to the next generation while the other half is randomly generated to represent inheritance of the best survival traits. The genes of the new generation also are subject to be randomly changed to represent mutation in a population. After the simulation, the robots had average a 65-70% increase in life expectancy from the first generation to the last.
-
Notifications
You must be signed in to change notification settings - Fork 0
saf1ali/genAlgRobotSim
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Object oriented robot simulation using arrays, inheritance, polymorphism, and encapsulation.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published