Re:Show HN: Space invaders, but the invaders evolve with gen...
by flashman on Tuesday October 30, 2018 @06:17PM
(#18341742)
> the invader wins by covering distance
The invader wins by crossing the baseline. This fitness function lets me use evolution against the invaders by letting the dumbest ones approach the baseline before killing them, making future waves easier than if I killed the easiest invaders first.
Perhaps the fitness score could include the number of projectiles that passed nearby without impacting, as a measure of difficulty to hit.
Re:Show HN: Space invaders, but the invaders evolve with gen...
by thaumasiotes on Wednesday October 31, 2018 @02:09AM
(#18343671)
>> the invader wins by covering distance
> The invader wins by crossing the baseline.
Both are true, but covering distance is a better fitness function because it is continuous and crossing the baseline is discrete (and not just discrete -- binary). Your strategy can make the difficulty rise more slowly than otherwise, but it can't make the difficulty plateau or drop.
Re:Show HN: Space invaders, but the invaders evolve with gen...
by NickBusey on Tuesday October 30, 2018 @05:19PM
(#18341371)
I said 'for this scenario', I suppose I should have been more clear. In my post I go on to list ways to change the scenario so it does fit the fitness function. I do agree the fitness function is probably correct, but the rest of the implementation doesn't match it.
> With so many invaders spawning at the same time, and the 'bullet' you shoot moving so slow, the last invader to be destroyed seems to me to be a result of random choice (which one did you get around to shooting last) rather than it being any 'healthier' than the other invaders.
I couldn't disagree more. The fitness score is correct, because the invader wins by covering distance.
What happens by chance early will happen by design late -- that is nearly the entire concept of evolutionary approaches. They always improve on their fitness function, and what matters is that you chose the right one. In this case, improving on the distance invaders travel is the point of being an invader, and the point of the game, so that distance is very obviously the correct fitness function.