So I'm starting a project which aims to make a good AI for my game monsters.
So far I have set up the GA and got some results.
There's two genes, with one chromosome each.
The monster either 'attacks on sight' or 'flee on sight' depending on the gene it got. The fitness function is based upon time alive and the crossover is just eliminating the worst gene.
As expected the 'flee on sight' gene got better result.
What I'm here to ask is what are some good uses of GA in developing AI. Which genes/chromosome/fitnessfunction/crossover should I implement in order to have a challenging AI.
The game is a rogue-like, it's still pretty simple, not much added, so I can make the game around the GA instead of the other way around.
This may be a too broad question, but bear in mind that I don't have any experience in gamedev and AI as a whole.
To make this question a bit more narrow.
Since my fitness function is just 'survive' it's quite obvious that all the enemy generations would get better at fleeing. So,
What should I put in consideration to a good fitness function.
Damage to the player is also quite one-way solver, a monster-healer which doesn't have any attack power would drop his staff and punch the player.
The perfect fitness function for me should translate to 'make the player struggle', but I don't know what that would mean in the game terms, and specially code terms.