Skip to content

Basic genetic algorithm designed to learn to beat a basic AI opponent.

Notifications You must be signed in to change notification settings

TNychka/GeneticSoldiers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeneticSoldiers

An experiment in basic genetic algorithims.

This project will run two AI units against each other in a basic game. The game consists of 3 moves: Move towards enemy, Shoot, and Melee. The first AI is created with a basic if/else decision making process. If can attack: then attack; else move closer. Second, an generation of AI based on a genome is created with random mutations introduced. All of these bred AIs are run against the basic one and the 2 with the highest score are bred to create the next generation's base genome. As the program progresses, the bred AI will approach a 100% victory rate against the basic AI.

Building

run

 g++ -std=c++11 *.cpp -o main

execute

./main

About

Basic genetic algorithm designed to learn to beat a basic AI opponent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages