Genetic Algorithm Neural Network- Inputs for evolving creatures
If I understand well, your neural net have 4 inputs. But let's take this example :


The black circle is your creature
Grey circles are your sensors
Green circle is food
Red circle is a trap




Does the left sensor "see" the trap closer than the food ?

If yes, you're doing it wrong

A better way to do it would be to "simulate" real eyes, like this, where each sensor can only see what is in its field of view



Your neural net can take 2 inputs per sensor, as you did, with the distance to the closest food/trap it can see.

A second thing to try would be to only take in account the closest item for each sensor.

Another interesting thing to do would be to decrease the fitness over time, avoiding passive bots