Code VS Zombies - Optimization - Puzzle discussion

Hi, first of all you must have simulation for turns ahead, this means given a moving command for Ash to predict how the game state will look like. This includes moving Ash, moving zombies, destroying zombies, destroying humans, … Also you need a good evaluation function, to be able to compare states.

After that you should decide how to represent the GA. I’m using Chromosomes where each gene is a float between 0.0 and 1.0 and each pair of genes represents a moving command for Ash:
int ashXTarget = MAP_WIDTH * chromosome[0];
int ashYTarget = MAP_HEIGHT * chromosome[1];

Then I’m using the techniques, I’ve described here https://www.codingame.com/blog/genetic-algorithm-mars-lander/ to optimize the commands for Ash.

Good luck and have fun :slight_smile:

5 Likes