For example, the red receptor in the left eye gets activated if there
is anything slightly to the left of the bot, extending outwards in a
cone. The further back the stimulus comes from, the weaker the
response in the receptor will be.
So basically, say one eye points in direction 30 degrees to the left
of the agent, then:
1. find all red things that are between 10 and 50 degrees relative to
that agent,
2. find distance of all those red things to the agent
3. for every one of those things, red_activation_left_eye += redness *
a * e^(-b * distance)
so when the distance = 0 (i.e. stimulus right on top of the eye), the
above will become redness * a because e^0 = 1, and when distance goes
to infinity, the activation it contributes goes to 0 because the
decaying exponential function goes to 0.
Your other question about the connections in brain is a bit too vague.
I'll try to make more accessible tutorial for this at some point.
I can only say that a is multiplier acting on the eye sensitivity, and e is the standard mathematical exponent. b I don't remember seeing in the code.