AI Spring 2009

  1. Course webpage
  2. Growing Artificial Societies - the sugarscape text, Introduction
  3. Agent based unit sugarscape -
    1. Sugarscape assignments - see this example Sugarscape in Netlogo. Try various experiments. We're beginning with experiments 1 and 2, instant growback and growback one step at a time.
      • Experiment 1: Immediate growback of sugar patches. When an agent consumes the sugar on a patch, the patch's supply is not affected, does not go to 0. The agents can hold unlimited sugar. Agents die when there supply reaches 0 or below. Run the sugarscape model with varying metabolisms, ranges of vision. You should see agent accumlate (somewhat) along the edges of ridges. Once an agent arrives on a new sugar level ridge, they tend to stay in the immediate area of this spot because they cannot see a higher ridge and their sugar is growing back immediately. There is no incentive to move.

        To turn in:

        • Basically, the agents should tend to accumulate along the ridges of the varying sugar areas. Show this with screenshot(s).
        • Run your experiment several times varying the range of the initial vision and metabolism attributes of each agent. For example, use random 1..4 for both vision and metabolism. Then change the vision to random 1..8 or 1..12. Also change the initial metabolism to higher or lower possible values. What effect does this have on the population. Take screenshots of various runs to demonstrate your report.
        • Keep some statistics about average vision and metabolism over time. Do more fit agents survive over time? At the beginning of the run list the total number of agents and the average vision and metabolism. After a certain number of time steps, repeat your measure of the the total number of agents, the average vision, and metabolism. Do the agents tend to have a higher average vision and lower metabolism over time? Higher vision/lower metabolism is a better trait to have for survival in Sugarworld.

      • Experiment 2: Timed growback of the sugar on patches. When an agent consumes sugar on a patch, the patches supply grows back 1 sugar level per time step until the patches max level is reached. Vary the metabolism and vision ranges of the agents. The agents may accumulate on the higher sugar plateau areas, not necessarily staying on the ridges.

        To turn in:

        • Basically, the agents should tend to accumulate in a group inside the high sugar areas. The agents won't be "stuck" on the ridges. Show this with screenshot(s).
        • Run your experiment several times varying the range of the initial vision and metabolism attributes of each agent. As before, change the vision to random 1..8 or 1..12, and also change the initial metabolism to higher or lower possible values. What effect does this have on the population. Take screenshots of various runs to demonstrate your report.
        • As in experiment 1, keep statistics about average vision and metabolism over time. Do the agents tend to have a higher average vision and lower metabolism over time?

      • Experiment 3: Migration. Pickup the handout with the initial setup. Or go to the Netlogo model and "setup" experiment 4: Migration. The agents are set up initially clustered together in the lower left corner of the sugarscape. Vision can now range up to 10, these agents have potentially higher vision than before. In the Sugarscape text, "Growing Artificial Societies", a "wave" pattern emerges as the agents migrate to the sugar mound in the upper right. See if you can duplicate these results. "Reflecting on the local rule, the behavior is understandable. Agents in the leading edge proceed to the best unoccupied sugar site within their vision. This leaves a "bald zone" where they had been. The agents behind them must wait until the bald spot grows back under growth rule G1 before they have any incentive, under movement rule M, to move to those lattice points, and so on for the agents behind them. Hence the series of waves."

      • Experiment 4: Combat between red and blue agents. See handouts for combat rules and various scenarios of combat, including a migration conflict from opposing corners (lower left and upper right) of the sugarscape.

    2. Example Sugarscape in Netlogo. Try various experiments. We're beginning with experiments 1 and 2, instant growback and growback one step at a time.
    3. Shell program for instant growback version (sugar levels on the patches "instantly" grow back)
      • Left click moves the single agent. The agent is placed randomly to begin
      • The metabolism is random 1-4
      • Sugar levels on the patches range from 2-4. The agent consumes the sugar level on the patch, but the patch instantly grows back its sugar.
      • The agent moves radius 1, so its vision is 1.
      • If the sugarlevel of the agent drops to 0 or below, the agent dies.
      • sugarscapeInstantGrowBackShell.py
      • scapeshell.txt - the sugarscape landscape for this shell program
    4. scape.txt
    5. Example run: 400 agents, 500 x 500 sugar patches with levels 1-4

    6. Step 1:
      • A. 50 x 50 patches of neighborhood. Read the file scape.txt with landscape sugar values of 0-4. Use yellow ovals of varying size based upon this sugar value.

      • B. Populate this landscape with 400 red agents in random locations on the sugarscape.

    7. Step 2:
      • Each sugar agent has a metabolism rate, randomly set. Try values 1-4 initially. A sugar agent adds to their sugar value the sugar value of the patch that the agent is on. Each time step, or move, the sugar agent subtracts their metabolism rate from their sugar value. If the agent's sugar value becomes 0 or less, remove the agent from the landscape. Use canvas.delete() and also remove the agent from any lists you have in your program.
      • For this step, don't subtract any sugar from the patch on the sugarscape. This step assumes an immediate growback for the sugar patches.
      • Sugar agents should begin accumulating on the edges of sugar scape changes in elevation of sugar levels.