IAMDinosaur icon indicating copy to clipboard operation
IAMDinosaur copied to clipboard

Bug on the fitness

Open ladsong opened this issue 10 years ago • 4 comments

I noticed that when the learning mutates to a NORM/DOWN behaviour, the fitness counts each NORM/DOWN as if it were a cactus jumped, so the algorithm thinks that its a good behaviour and it goes down to the next generations.

ladsong avatar Dec 28 '15 20:12 ladsong

That is a bug from the game. It took me some time to figure out that.. What happens is: With the game being played MANY and MANY times, the Dino "drifts" to the right (moves relative to the origin). That, makes the program to read the dino as if it was a cactus.

Take a look at the new README, in the bottom: https://github.com/ivanseidel/IAMDinosaur#be-aware-of-a-game-bug

ivanseidel avatar Dec 28 '15 21:12 ivanseidel

We might try to find out that offset dynamically, but it will not be so easy, as the dino is the same color of the cactus, and the cactus might be together with the Dino at the end of the game

ivanseidel avatar Dec 28 '15 21:12 ivanseidel

@ivanseidel I think he is talking about something else. I also noticed this behavior. Fitness is always incremented when the movement down/norm occurs.

rodrigoalviani avatar Dec 29 '15 09:12 rodrigoalviani

The fitness is incremented when distance increases (lastDist < newDist + threshold), when dino is shifted right, "down" key makes the dino go a little more to the front with his head, causing the sensor to read close to 0.

Try this to check for it: If you press down, and distance goes to 0, that's because of the game problem.. Try two things:

  1. Refreshing the game page
  2. Moving the chrome window to the left a bit (must be moved after code is running)

Also, something else that might interfere: The window size when less than a value, makes the game to "shrink" and cause the dino to move relative to it's origin as well (to fit on the screen).

Can you test that @rodrigoalviani and @ladsong ?

Thanks

ivanseidel avatar Dec 29 '15 10:12 ivanseidel