The order doesn't matter, and a somewhat mixed order would even be a welcome side-effect of the whole concurrency bit.
What does worry me is that the agents are very short-lived. The longest of these tasks takes 0.5msec (any evolution event), so I am not sure if spawning all these agents is worth the overhead. There are several other possibilities: I could have each place in the world be a single agent, which just continuously cycles through the events, even if there is no host occupying the place. I could also tie hosts to agents (which I think is somewhat like ant.clj does). Will look into it. On Dec 14, 2:55 pm, Chouser <chou...@gmail.com> wrote: > On Sun, Dec 14, 2008 at 8:49 AM, bOR_ <boris.sch...@gmail.com> wrote: > > > Thanks! Needed only a small change then :) > > > (time > > (do > > (dotimes i popsize > > (doseq a [birth death infect infect evolve evolve evolve > > evolve evolve] > > (send-off (agent i) a))) > > (dosync (commute year inc)))) > > (report) > > Note that you've now got popsize*9 agents, and the actions in your > vector are not guaranteed to happen in order for any given 'i' -- I > don't know if that matters to you or not. > > --Chouser --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---