MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problems with simulating society ch4 section 4.3

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35546] Re: Problems with simulating society ch4 section 4.3
  • From: "Katherine Geel" <katherine at removethis.burgercom.co.za>
  • Date: Thu, 18 Jul 2002 03:06:55 -0400 (EDT)
  • References: <ah3305$t1r$1@smc.vnet.net>
  • Reply-to: "Katherine Geel" <katherine at removethis.burgercom.co.za>
  • Sender: owner-wri-mathgroup at wolfram.com

I have now managed to sort out my problem, however I still cannot get the
graphical plot to run for either of these two simulations. If anyone has any
ideas as to why MultipleListPLots sometimes just hang without giving any
indication, could you please let me know.
thanks
Katherine Geel
This is the attempted plot:
avgResourceLevel[lat_, strat_] :=
    (Apply[Plus, #]/Length[#]) &[
      Cases[lat, {_, _, strat, _, x_} :> x, 2]];
<< Graphics`Graphics`
<< Graphics`MultipleListPlot`
Needs["Graphics`MultipleListPlot`"]
MultipleListPlot[
  Map[avgResourceLevel[#, 1] &, results],
  Map[avgResourceLevel[#, 0] &, results],
  SymbolShape -> None,
  PlotJoined -> True,
  PlotLegend -> {"Good Guy", "Bad Guy"},
  AxesLabel -> {"Time", "Resource Level"},
  LegendShadow -> {-0.05, -0.05}]

"Katherine Geel" <katherine at removethis.burgercom.co.za> wrote in message
news:ah3305$t1r$1 at smc.vnet.net...
> Hi
> I am hoping that someone can help me as I am fairly desperate for an
answer.
> I am attempting to do two things: one to run a simulation from the gaylord
> and d'andria book "simulating society", the one on page89, section 4.3.
For
> some unknown reason the simulation runs, however the graphical plot just
> hangs for ever and ever. My computer does have the necessary power so I
> don't know what the problem is. The second thing I am trying to do is run
my
> own (partly) simulation of the repeated prisoner's dilemma, with two
types,
> Tit-for-tat players and defectors, and have the two types interact, then
> change their type depending on the average payoff in their immediate Moore
> neighbourhood, and then walk. For some reason I get the following error
> which I have no idea how to get rid of ( this is why I am attempting to
run
> the section 4.3 simulation as it does something similar).
>
> I've attached the code of section 4.3 on the off chance someone knows what
> the problem is.
>
> [Contact the author to get the code - moderator]
>
> Thanks
> Katherine Geel
>
>




  • Prev by Date: RE: Output of left-hand side of expression
  • Next by Date: Re: Integration problem
  • Previous by thread: RE: Problems with simulating society ch4 section 4.3
  • Next by thread: Re: Re: Problems with simulating society ch4 section 4.3