From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 39B9C7F918 for ; Mon, 9 Jun 2014 18:45:27 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of arnaud.spiwack@gmail.com) identity=pra; client-ip=74.125.82.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="arnaud.spiwack@gmail.com"; x-sender="arnaud.spiwack@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of arnaud.spiwack@gmail.com designates 74.125.82.174 as permitted sender) identity=mailfrom; client-ip=74.125.82.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="arnaud.spiwack@gmail.com"; x-sender="arnaud.spiwack@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f174.google.com) identity=helo; client-ip=74.125.82.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="arnaud.spiwack@gmail.com"; x-sender="postmaster@mail-we0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoFACDklVNKfVKulGdsb2JhbABZg19WA4Jsp3gGkAOJDYELCBYPAQEBAQcLCwkSKoQDAQEBAwESER0BOAEDAQsBBQUEBw0qAgIhARIBBQEcBhMiiAwDCQgNoFZqiyeFAZNnJw2FRREBBQyFUYZtgTULEQFMgwCBTASYJ4F6gUKMCoQIGCmBaYFDgUI7LwGBCQ X-IPAS-Result: AgoFACDklVNKfVKulGdsb2JhbABZg19WA4Jsp3gGkAOJDYELCBYPAQEBAQcLCwkSKoQDAQEBAwESER0BOAEDAQsBBQUEBw0qAgIhARIBBQEcBhMiiAwDCQgNoFZqiyeFAZNnJw2FRREBBQyFUYZtgTULEQFMgwCBTASYJ4F6gUKMCoQIGCmBaYFDgUI7LwGBCQ X-IronPort-AV: E=Sophos;i="4.98,1003,1392159600"; d="scan'208";a="66419772" Received: from mail-we0-f174.google.com ([74.125.82.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 09 Jun 2014 18:45:26 +0200 Received: by mail-we0-f174.google.com with SMTP id k48so6225944wev.33 for ; Mon, 09 Jun 2014 09:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=LBnNj3fgOCBdumWuUPvZ2B7TYZz8XDjyWbrOmcuVgFw=; b=L26QowwqJ3GG3FTzDGIjcx+5bo3I3yiQXWMHzFU/eeCQA0b9yVgGkIBRYfjJ1kXzRS z12b0gSfWdopSb1rUS3imVu+E7uCd32MdX/CMaSVf0OmdhsCyuaomhT1tZiZXCWoF/lZ Uc7tTVwsXps66BAtiPSJmkHjRfcp1DpviiUMtz9FGNNPAYFCsPXEkdOjj8UqaQvEjA/V AlHHlg/vg6v3QCY/u2HAsr4McpkZuUtVJ/3TOPS7qK1YE9eoN2u90Zb/y2Rr54weQU+h ibrZ8K07SPsn8M73ALGHT3pubca2INhwZ4FE/BUq6t+cUCi8XZNbisni9yGuw8T1dwoN D2cQ== X-Received: by 10.180.187.111 with SMTP id fr15mr21728453wic.57.1402332326299; Mon, 09 Jun 2014 09:45:26 -0700 (PDT) MIME-Version: 1.0 Sender: arnaud.spiwack@gmail.com Received: by 10.216.210.71 with HTTP; Mon, 9 Jun 2014 09:44:46 -0700 (PDT) In-Reply-To: References: From: Arnaud Spiwack Date: Mon, 9 Jun 2014 18:44:46 +0200 X-Google-Sender-Auth: WgICWbafcEAzSZcaQFQZd68Wb9o Message-ID: To: Anthony Tavener Cc: ollie.frolovs.2012@my.bristol.ac.uk, caml users Content-Type: multipart/alternative; boundary=001a11c265de2a8ebf04fb69f035 X-Validation-by: arnaud@spiwack.net Subject: Re: [Caml-list] Designing a (functional) multi-agent simulation -- illusion of paralellism --001a11c265de2a8ebf04fb69f035 Content-Type: text/plain; charset=UTF-8 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 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 >> > > --001a11c265de2a8ebf04fb69f035 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 9 Ju= ne 2014 17:56, Anthony Tavener <anthony.tavener@gmail.com><= /span> 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 times= tep 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 h= ave claims, then resolve conflicting claims, then do all resulting actions.= In this case, "losers" of a competition probably wasted their ac= tion. 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> wrot= e:
Hello

I = am trying to write a predator-prey simulator and I have hit the wall with f= unctional design. I would appreciate any help or pointers to relevant liter= ature.

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

"On the subject of Toroidal Planets, Sharks = and Fish."
=

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

Best regards,

Ollie


--001a11c265de2a8ebf04fb69f035--