Hello,<br><br>For the purpose of a simple game, I&#39;m looking for a simple way to get agents communicating with each other, with agents possibly running on different threads:<br><br>Basically, an agent is <span style="font-family: courier new,monospace;">Agent :: * -&gt; *</span>, since it is parameterized with the type of messages it can receive, and can make two basic operations:<br>

<span style="font-family: courier new,monospace;">fetch</span>, which gives it the messages in its mailbox<br>and <span style="font-family: courier new,monospace;">send</span>, which sends a message <span style="font-family: courier new,monospace;">a</span> to an <span style="font-family: courier new,monospace;">Agent a</span><br>

<br>Given that haskell threads are lightweight, is it reasonable to lauch a thread per agent and then implement fetch and send through Chans?<br>It will be simple to implement and to use, but if I have, say, two hundreds of really dumb (sorry, <i>reactive </i>^^) agents, like ants, I will have to launch as many threads.<br>

<br>I could use a neater abstraction than IO to model agents (FRP is perfect for that), but I would loose the benefits of concurrent programming (or I won&#39;t be able to keep things simple).<br><br>