neat-python icon indicating copy to clipboard operation
neat-python copied to clipboard

How to make the output of neat to be only binary numbers?

Open ShinhuPark opened this issue 5 years ago • 1 comments

I used Gym Retro to try NEAT in Pong Atari 2600.

The game has 2 binary numbers as input, but because the Neat gives me real numbers,

Instead of getting list of 0 or 1 like [0,1], it gives me 0.12451 or 123.3123. This cannot be input and i have no idea how to fix neat's output to only binary.

Is there any other way?

ShinhuPark avatar May 05 '20 10:05 ShinhuPark

I think the best approach to this is to round the numbers to the nearest whole and then clamp that number to 0 or 1. NEAT will learn to place its outputs into that range of 0-1.

EKKOING avatar May 13 '22 05:05 EKKOING