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 55EE87F8FC for ; Mon, 9 Jun 2014 17:56:31 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anthony.tavener@gmail.com) identity=pra; client-ip=209.85.128.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anthony.tavener@gmail.com"; x-sender="anthony.tavener@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of anthony.tavener@gmail.com designates 209.85.128.179 as permitted sender) identity=mailfrom; client-ip=209.85.128.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anthony.tavener@gmail.com"; x-sender="anthony.tavener@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-ve0-f179.google.com) identity=helo; client-ip=209.85.128.179; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anthony.tavener@gmail.com"; x-sender="postmaster@mail-ve0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwDAJ7YlVPRVYCzlGdsb2JhbABZDoNRVgOCbMEIBAIBgQoIFg8BAQEBBwsLCRIqhAMBAQEDARIRHQEbHQEDAQsGBQQHNwICIgERAQUBHBkiiAsBAwkIDaBFaosngXKDD5M7ChknDWSEYREBAQQMjXMLEQFMBAeCdYFMBIoyj2+RVBgpgyyBAF8eLwGBCQ X-IPAS-Result: AmwDAJ7YlVPRVYCzlGdsb2JhbABZDoNRVgOCbMEIBAIBgQoIFg8BAQEBBwsLCRIqhAMBAQEDARIRHQEbHQEDAQsGBQQHNwICIgERAQUBHBkiiAsBAwkIDaBFaosngXKDD5M7ChknDWSEYREBAQQMjXMLEQFMBAeCdYFMBIoyj2+RVBgpgyyBAF8eLwGBCQ X-IronPort-AV: E=Sophos;i="4.98,1003,1392159600"; d="scan'208";a="66410244" Received: from mail-ve0-f179.google.com ([209.85.128.179]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 09 Jun 2014 17:56:30 +0200 Received: by mail-ve0-f179.google.com with SMTP id oy12so6685456veb.38 for ; Mon, 09 Jun 2014 08:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=73WeWti+xGa1+Y/a2Hy1HIQZ/VfwPH7NkdE9hKnk79o=; b=Ti/a0sfyIUpG6g4wOVnPhR4DgD/kDH0JO+yUk8FDLcfzYt0danFDNc3cOVn8dkyKRZ xJ5R5Yil+DmHvnO+gOEam2VeCSNbnOi3AgQev02Y5BCGolcanXhLXS7wTNHwZVMMQZGs t4oebZB9uzz7QKXiCwBkRiq3GGNDoziMVvAJwGlETELIisuXGktXb/VsEsb/xfa+ZTOX TyBzUKlqdSZ0LZJCtqOamqeCrTilLpd9olXWHBwCIe+PVBNKR8civjKktmjdscDCSywM FvLOOnoFx+/xA0ZDoHzREv7BUTrOhM2HH1vifYeCYj926C8nfysKJYH6oh5VlpVq3Cr2 e7ow== MIME-Version: 1.0 X-Received: by 10.58.133.6 with SMTP id oy6mr12675042veb.25.1402329389160; Mon, 09 Jun 2014 08:56:29 -0700 (PDT) Received: by 10.220.151.12 with HTTP; Mon, 9 Jun 2014 08:56:29 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Jun 2014 09:56:29 -0600 Message-ID: From: Anthony Tavener To: ollie.frolovs.2012@my.bristol.ac.uk Cc: caml users Content-Type: multipart/alternative; boundary=047d7b6d9f7c195c6304fb694186 Subject: Re: [Caml-list] Designing a (functional) multi-agent simulation -- illusion of paralellism --047d7b6d9f7c195c6304fb694186 Content-Type: text/plain; charset=UTF-8 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 > --047d7b6d9f7c195c6304fb694186 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
To implement something like the bidding you're thinkin= g of (or any finer-grained competition) you might need to have several sub-= iterations to each timestep... or each timestep is smaller and not sufficie= nt 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 ac= tions. In this case, "losers" of a competition probably wasted th= eir action. If you still want them to be able to at least do a simpler acti= on 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@m= y.bristol.ac.uk> wrote:
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

--047d7b6d9f7c195c6304fb694186--