Jason (jcreed) wrote,
Jason
jcreed

-

Aha! The bug was arising from suicides.
If an agent kills -itself- during its action phase,
then it still tries to eat, and corrupts empty memory
which later confuses malloc.

In the process of debugging I turned -Wall on, which
alerted me to a lot of little fiddling things which
are now fixed.

Messing around with strategies now.
Things are somewhat dependent on parameter settings,
but reproducing as often as possible and moving
randomly with 1/7 probability seems a good basic
strategy, although moving in a random direction
but deterministically every sixth time step beats
it by a little.
Attacking only seems useful if the attacker can
reliably identify that the target is not one of
eir own paradigmmates -- I added an actarg to farming
which allows agents to voluntarily farm less than
MAX_FARM, and so this information goes into the
event list. So one strategy is to only farm MAX_FARM-1,
and kill everyone who farms MAX_FARM. But that
is defeated by a strategy who farms MAX_FARM-2 but
kills MAX_FARM-1, ... etc. Haven't tested where
this bottoms out. Maybe should write some ladder
code soon. Also haven't done visualization yet,
which ought to be pretty trivial in pTk.

At 1896 loc.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments