I'm working on a evolutionary simulation with predators, prey, and food (plants that grow on terrain depending on the conditions and meat that creatures give off when they die).
Each of them ocupy an (x,y) position.

At the moment, each creature has a few "eyes" which are sensible to red, green and blue color channels, and when a creature or a piece of food is within their viewing distance, the eyes react sending an input to their neural network, depending on the color of the object they are seeing, it's relative angle and it's distance from the creature.

What I'm doing right now is iterating through ALL the plants, meat pieces, and creatures, and checking if they are within the creature's viewing distance. If that condition is true, then the inputs for the network are calculated.

The problem is that the world is massive (about 10,000\*10,000 "units") compared to the creatures viewing distance, which is normally between 150 and 300 "units". On top of that, plant number can get really high depending on terrain conditions (up to a few thousand, too), together whith all the other creatures and meat pieces.

So, I normally end up with a massive loop being performed for each creature, which really slows down the simulation, when most of the creatures and food pieces checked are completely irrelevant (are too far away).

What I'm asking for is some method or algorithm that can reduce the number of points being checked for distance in each loop, limiting the distance of the points being checked, or some other technique. 

PS: I thought about dividing the simulation in various "zones" so if a creature was in a zone it would only check for other points (food and other creatures) in that particular zone. However, as they are continuously moving, if they were on the edge of a zone it would make their view very inaccurate.
I also slightly improved the speed by checking for distance^2 (not doing the sqrt), and thein calculating it only if it was smaller than viewing\_distance^2.