Suppose there is a grid containing both walls (blocked cells) as well as food items placed in any location on the grid.
Now suppose we are trying to decide the optimal location to place an ant colony on this grid, such that the ants have to travel the least distance (in any direction to/from the starting point of the colony) to get the maximum amount of food.
So far, the best approach I've come up with is the following:
for each square on the grid
use a shortest path algorithm to find the distance to/from each food source from this square
sum these distances to find a number and put the number in that square
select the square with the smallest number
Would this approach even work? Is there a more efficient solution?