Just to beat a dead horse:
The simple, unoptimized algorithm is this:
For x = 1 to MaxRobs
For y = 1 to Maxrobs
check if bot x can see bot y.
Which is clearly O(n^2).
Computer Science is my minor. I've taken everything but the algorithms course. But don't think I don't know a thing or two about algorithms. Especially in this regard, since I've put in 100s of hours to streamlining this vision process.
Using kd-trees, you could make this into O(log n). Which is what I'm sorta looking into. Unfortunately, kd-trees must be balanced to operate correctly, and rebalancing a kd-tree can take O(n log n) time.
If such is the case, other methods might prove better, such as fixed size space partitioning Carlo suggested a while ago. Which is what I ws investingating in 2.4. You can still see the code I commented out. It's quite streamlined, and highly messy. But fast. You must admit it's fast.
Don't lecture me on theoretical computer science. I am all on top of that. Rather, it's the limitations and quirks of VB that are throwing me for loops.