From: Anthony Tavener <anthony.tavener@gmail.com>
To: ollie.frolovs.2012@my.bristol.ac.uk
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Designing a (functional) multi-agent simulation -- illusion of paralellism
Date: Mon, 9 Jun 2014 09:56:29 -0600 [thread overview]
Message-ID: <CAN=ouMSAtsmLtLjTqgTzWZsJmMhAyqNnfFzSM=FKaLtz9jg9vQ@mail.gmail.com> (raw)
In-Reply-To: <CAERFpKW7Zpb4u5nVLt_cEj=z5JxbupEyAzYL_z5dNqVVguP4sw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]
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: 2205 bytes --]
next prev parent reply other threads:[~2014-06-09 15:56 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 [this message]
2014-06-09 16:44 ` Arnaud Spiwack
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='CAN=ouMSAtsmLtLjTqgTzWZsJmMhAyqNnfFzSM=FKaLtz9jg9vQ@mail.gmail.com' \
--to=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).