Code VS Zombies - Optimization - Puzzle discussion

Instead of cartesian coordinates, use polar coordinates. Given that Ash moves within a radius of 1000 during a turn, it will be easier to generate move commands

4 Likes

Hi,
oh, I see. and in the polar coordinates, the center O should be Ash, right? That would be easier for him to move.
Thanks!

Hi,
I’ve tried many combinations of {population size, crossover rate, mutation rate, elitism count}, but I cannot manage to have it converge on Test 09 Rectangle.
maxGenerations: 1000
PopulationSize: 100,
MutationRate: 0.05,
CrossoverRate: 0.95,
ElitismCount: 5,
For the evaluation function, I set it to 0 if there is no humans left.
Any advice ?

My ElitismCount is 10. My MutationRate is higher (15%). I do not have a maxGenerations parameter: I let the search run for the allocated period of time which gives me 3K generations per second for the Rectangle test case. For crossover, I choose randomly between my two populations for each consecutive move.

Given that it is a very simple test case, it should converge with your parameters. Is it your only failed test case ?

Also you could always use a “fallback” strategy if your GA doesn’t find a solution in the given time period, use a “greedy(non optimal)” approach.

Thanks for the advices
My simulation engine was wrong.
I update it ==> now GA works for everything but Rectangle test case.
As mentioned, I added a fallback to naive algorithm if GA fails.
I get to 425th
I will try to change my crossover: for now it is a random swapPoint; taking [0:swapPoint] from parent 1 and [swapPoint:end] from parent 2

1 Like

how to get the position of ash?

it’s given in the first line of every game turn
image

I’m trying to get started here so that I can begin my path down the optimization tree of the achievements and I’m just not sure what’s already been done, I discussed with somebody in chat today about using beam search and was curious what other peoples’ thoughts were?

1 Like

In this thread there are several strategies explained, I personally used GA: Code VS Zombies - Optimization - Puzzle discussion

Look here for some feedback on the strategies used for this puzzle (mostly MonteCarlo and genetic algorithms). Regarding beam search, this is an interesting idea but I see two potential issues:

  • given Ash movement freedom, the search space is really huge even if you discretize movements.
  • because of the scoring system which favors carnage, good solutions herd zombies first and delay shooting as much as possible, so it’s hard to distinguish the right first moves
1 Like

Bonjour.
Question, Ash tue les Zombies se trouvant dans un rayon de 2000 ou dans un rayon de moins de 2000 (2000-1) ?
Parce qu’il est dit dans l’énoncĂ© :

Si Ă  la fin d’un tour, un zombie se trouve dans un rayon de 2000 unitĂ©s de Ash, il tire sur le zombie pour le dĂ©truire

Mais plus loin on a :

Tout zombie se situant dans un rayon de moins de 2000 unités est détruit

Merci :slight_smile:

Les zombies qui sont dans un rayon de moins de 2000 de Ash meurent. C’est ce que j’ai dans ma simulation et c’est cohĂ©rent avec le referee.

2 Likes

Hi Developers,

Could someone tells us more about the validators ?
As far as I’m concerned, “Unavoidable deaths” always fails without knowing why :confused:
I haven’t hard coded anything

Thanks in advance

1 Like

Hello,

I don’t have a really optimized solution (score : 49k) but I had the same issue with the “Unavoidable deaths” validator that always failed without understanding why. I solved it by sending Ash to save the human who is the closest to a zombie but still can be saved.

I think it’s a good way to save all lives that can be saved but if someone has an other option I am curious, please share it.

Thanks in advance and I hope I could help !

3 Likes

Hi,
Thanks for the hint my friend.
I’ll make the necessary adjustments :smiley:

help me please

thank you

1 Like

https://how-to-properly-ask-a-question.surge.sh/

How do you expect to have help without any precision ???

1 Like

Can someone explain this part of the statement?

imagen

I don’t understand why a zombie should land on X=282.843, Y=282.843 how can I calculate the new coordinates of zombies?

Thanks.

trigonometry