caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Arnaud Spiwack <aspiwack@lix.polytechnique.fr>
To: Anthony Tavener <anthony.tavener@gmail.com>
Cc: ollie.frolovs.2012@my.bristol.ac.uk, caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Designing a (functional) multi-agent simulation -- illusion of paralellism
Date: Mon, 9 Jun 2014 18:44:46 +0200	[thread overview]
Message-ID: <CAMoPVjcDsVMsf-HLbi3=qvgWJB97ed-1ey3-SL+850Ke+yeSUQ@mail.gmail.com> (raw)
In-Reply-To: <CAN=ouMSAtsmLtLjTqgTzWZsJmMhAyqNnfFzSM=FKaLtz9jg9vQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]

I don't quite understand the specifics of your needs. But the typical
starting point is the comonadic structure of the grid (see
http://blog.sigfpe.com/2006/12/evaluating-cellular-automata-is.html ) where
you basically iterate over the resulting cells rather than the existing
agents. I don't know if your example can fit in this framework.


On 9 June 2014 17:56, Anthony Tavener <anthony.tavener@gmail.com> wrote:

> 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
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3093 bytes --]

  reply	other threads:[~2014-06-09 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 14:24 O Frolovs
2014-06-09 15:56 ` Anthony Tavener
2014-06-09 16:44   ` Arnaud Spiwack [this message]
2014-06-09 16:02 ` Arthur Breitman
2014-06-10  9:12 ` Goswin von Brederlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMoPVjcDsVMsf-HLbi3=qvgWJB97ed-1ey3-SL+850Ke+yeSUQ@mail.gmail.com' \
    --to=aspiwack@lix.polytechnique.fr \
    --cc=anthony.tavener@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=ollie.frolovs.2012@my.bristol.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).