To implement something like the bidding you're thinking of (or any finer-grained competition) you might need to have several sub-iterations to each timestep... or each timestep is smaller and not sufficient for completing an "eat" action. Think of pipelined processors, perhaps, as some inspiration. ;)

For an example of sub-iterations within each timestep: you have claims, then resolve conflicting claims, then do all resulting actions. In this case, "losers" of a competition probably wasted their action. If you still want them to be able to at least do a simpler action or start another claim, this is where you might want finer-grained steps (and actions).


On Mon, Jun 9, 2014 at 8:24 AM, O Frolovs <ollie.frolovs.2012@my.bristol.ac.uk> wrote:
Hello

I am trying to write a predator-prey simulator and I have hit the wall with functional design. I would appreciate any help or pointers to relevant literature.

The simulator is that of a world populated with fish and sharks. It is a discrete-time multi-agent simulation and what I am struggling to think about is how to implement the illusion of parallelism in simulation. Since the problem is not specifically with OCaml (but the simulator is in OCaml), I have kept this email short and put all the details and the code on GitHub:

"On the subject of Toroidal Planets, Sharks and Fish."
https://gist.github.com/olliefr/fb26ca3a7645dae7e203

It's only a hobby project, but it is of some interest to me, so I would really appreciate any advice.

Best regards,

Ollie