But luckily this year I'm taking AP Computer Science and we're using a case study called GridWorld, which is a perfect way to test things.
Without further ado, here's my write up of my experiment.
---
Time to start work on the first experiment of my first genetic algorithm experiments.
Here's my setup:
Gridworld critters
Four genomes:
G1: Atk 1, Def 1, Con 1
G2: Atk 2, Def 1, Con 1
G3: Atk 1, Def 2, Con 1
G4: Atk 1, Def 1, Con 2
Attack is amount of damage, defence is how much damage is negated when attacked, regenerates 1 point of def every (two?) steps. Con is how many hitpoints it has. Regenerates 1 HP per step if not attacking. Whoever gets to their step first will regen first, tough luck if a genome isn't regened when it gets attacked. Def regeneration isn't cumulative, a genome must spend two full turns regernating one point of Def.
All genomes attack each other.
If another genome is within range (1 square) of another it determines randomly, at this point, which to attack. Then attacks, it gets first strike, so it does its' damage first then the other genome does its' damage.
First experiment, only four bugs with genomes.
I think that one of the 3 stronger ones are going to prevail simply because they have higher stats at this point. Of those three, I would have to say that G2 is probably going to win because of how hard it hits.