[erlang-questions] write the ant simulation in Erlang?

Roger Critchlow rec@REDACTED
Fri Oct 10 05:17:16 CEST 2008


On Thu, Oct 9, 2008 at 8:54 PM, jm <jeffm@REDACTED> wrote:

>
>
> > Moving is a little tricky because we need to change the
> > state of two cells (if doing cells) or possibly two
> > patches (if doing patches).
> Can you live with an ant occupying two squares at once? Then enter the
> new location first before leaving the old location.
>

That would break the transactional consistency that the example has in
Clojure:  You have a thing you want to move from one place to another, you
don't want it to be in both places, and you don't want it to be no place.

It would also break the graphical display of the simulation if the number of
ants fluctuated from frame to frame.

-- rec --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081009/dc9689bb/attachment.htm>


More information about the erlang-questions mailing list