Development on the Web Critters project has been rolling along briskly these past few weeks, with the brunt of the work having shifted from perfecting the abstractions to ironing out kinks in the algorithms and observing how the system behaves in very early trials.

The results have been fascinating and have proved that even a level two ECHO simulation (attack + defense) can exhibit a startling amount of intelligence.

As I’ve run different interactions of the Web Critters code, I have turned to observing the behaviors of the agents that evolve to point towards weaknesses in my simulation.  The process illustrates beautifully how a Complex Adaptive System operates.

Before reading further, it is worth reviewing my previous articles describing the structure of agents within Web Critters and how simple interactions are carried out.

Exploit any weakness

My first crash-free runs of Web Critters were done without allowing any of the agents to utilize the wildcard resource and prior to implementing agent migration.  The environment under these conditions was brutal:  in most locations all species went extinct almost immediately; in those locations where life persisted, it eked out a very rough existance, with very little growth or forward progress.

Once I introduced the wildcard resource to the system things changed dramatically.  The wildcard allows agents to have a non-penalized match when computing attack/defense scores during an AttackInteraction, and thus is a good survival skill.  With this new tool in their repertoire, agents suddenly started doing exceptionally well.  Populations skyrocketed as sustainable lifeforms evolved.  Upon closer observation, the “dumb” agents were found to be exploiting a small bug in my calculations (much to my amusement).

The majority of surviving agents after a trial of even a few hundred generations looked something like this:

Offense: ##########c##a#,  Defense: long and random, Exchange: short and random

The agents had “discovered” that my interaction calculations erroneously awarded points for wildcards in an offense tag that exceeded the length of a defense tag.  ResourceNodes in the simulation were fixed in size to 4 (offense, defense, and exchange), and so the optimal strategy to maximize resource gain was to stack wildcards in an offense tag in order to always win versus ResourceNode opponents, and produce a neutral result against other agents.

I patched this issue after I had a chuckle over what the agents had discovered, and re-ran some trials.

click to enlarge

As depicted above (5000 generations into a simulation), the little blighters are still well aware of the fact that ResourceNodes max out at a tag length of 4, and are still designing the first four characters of their offense tags to skip past the node defenses.  However, they are stacking “regular” characters after the initial wildcards in order to maximize their chances of collecting resources from the environment.

These behaviours neatly illustrate what complex adaptive systems do well:  they identify patterns automatically, and evolve agents to produce the best possible results under the conditions that they have been given.  CAS’s – and Web Critters is no exception – are emergent problem solvers.  My little critters will continue exploiting their favorite loophole until I implement my planned change to make ResourceNodes customizable, at which point they will doubtless figure out another strategy.

Follow me on github

If any of this interests you then I urge you to take a second, sign up for a free github account, and follow the Web Critters project.  I would be extremely happy to get some feedback on the actual code, and to have people to play around with the simulation themselves.  If you find issues, have suggestions, or feel like contributing some code then by all means, please do.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Sorry, the comment form is closed at this time.

© 2004-2010 - Systemic Babble is created and maintained by Andrew Anderson. Suffusion WordPress theme by Sayontan Sinha