I have been playing around with resource collecting ai, check out the following example.

https://www.dropbox.com/s/ejo9hek1eucof ... .capx?dl=0

The men will find a path to the nearest wood and base but they don't take the walls into account and find the nearest based on a straight line. Is there a simple way to the calculate the length of a path for each target then pick the shortest before moving along it?