<div dir="ltr">2008/10/10 Richard O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On 10 Oct 2008, at 10:47 am, Robert Virding wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A first approximation would be to have one process per ant and one for the world. The only problem would be handling atomic look-at-the-immediate-world-around-me-and-make-a-move.<br>
</blockquote>
<br></div>
Thinking idly about this last night, I wondered whether<br>
the look at the world bit *should* be atomic.  Real ants<br>
don't lock the real world, and while an ant is looking at<br>
one square, something _could_ move into a square it can't<br>
see.</blockquote><div><br>This was to get around the problem of checking if a cell was free before moving into and then finding the cell has been taken. The immediate world is one cell left, center, right, so it is very immediate. The "spec" stated only one ant per cell.<br>
<br>Robert<br><br></div></div></div>