Bots and Simulations > The Gene depository

OCULUS II

<< < (5/5)

Peter:
The loop could be a serious problem, I could imagine DB being held in a loop pretty easily.

Trafalgar:

--- Quote from: Peter ---The loop could be a serious problem, I could imagine DB being held in a loop pretty easily.
--- End quote ---

I'm not suggesting adding a loop operator. I included it and the [] in the first pseudocode to show the basis for the idea. As I said, you would unroll the loop (and convert the eye[num] into eye1, eye2, etc), and you can see what that looks like (with 2 eyes instead of all 9) in the third code block in that post.

bacillus:

--- Quote from: Trafalgar ---So what happens with yours if there are targets in two eyes with exactly the same distance? (The >=s in this one should prevent that from resulting in more than one eye's addition occurring)
--- End quote ---
Ah, that's why I use the >= comparator (which I already was using, by the way). So if two eyes have conflicting data, they are chosen according to the priority list, Eye5 being the first choice:
Eye5
Eye6
Eye4
Eye7
Eye3
Eye8
Eye2
Eye9
Eye1

Navigation

[0] Message Index

[*] Previous page

Go to full version