Pred_Prey_Sim_Stage_2A

Stage 1: In a world with foxes and rabbits, foxes and rabbits move randomly on a background. If a fox sees a rabbit in any direction, it eats the rabbit. A monitor maintains and plots statistics about the simulation and determines when simulation is complete: no rabbits remain. Implementation: Agents: background, fox, rabbit, monitor. Statistics (simulation properties): @foxes: number of foxes in the world. @rabbits: number of rabbits in the world. @rabbit_eaten: number of rabbits eaten. @cycles: number of simulation cycles executed. Plot: @rabbits, @cycles. Stage 2: In the world of Stage 1, when a fox becomes hungry (simulation property), it seeks (hill-climbing) a rabbit to eat. The background diffuses an attribute of the rabbit to permit hill-climbing by the fox. When not seeking food, a fox moves randomly on the background. New agent attribute of rabbit to be diffused by the background: R. New simulation property to control hunger: @fox_hunger: number of cycles for fox to become hungry and seek food. New agent attribute of fox to record hunger: hunger -- number of cycles since fox has last eaten; set to zero when fox eats. Implementation details: New method in rabbit agent to set R when creating new agent. This is done by creating a separate method in rabbit to initialize agent attribute, then calling this method from the “When Creating New Agent” method. This permits using a test/broadcast to set all rabbit attributes in the world without having to erase/replace them. Diffusion formula used: 0.25*(r[up]+r[down]+r[left]+r[right])
Data
Created:February 6, 2016
Edit Time:11 Minutes
Played:159
Agent:4
Rules:18
Methods:9
Parent Project:60525
false
Settings
New Project Name
Rename
Copy
Download
Show Project Report
Flag Project
Delete
Stage 1: In a world with foxes and rabbits, foxes and rabbits move randomly on a background. If a fox sees a rabbit in any direction, it eats the rabbit. A monitor maintains and plots statistics about the simulation and determines when simulation is complete: no rabbits remain. Implementation: Agents: background, fox, rabbit, monitor. Statistics (simulation properties): @foxes: number of foxes in the world. @rabbits: number of rabbits in the world. @rabbit_eaten: number of rabbits eaten. @cycles: number of simulation cycles executed. Plot: @rabbits, @cycles. Stage 2: In the world of Stage 1, when a fox becomes hungry (simulation property), it seeks (hill-climbing) a rabbit to eat. The background diffuses an attribute of the rabbit to permit hill-climbing by the fox. When not seeking food, a fox moves randomly on the background. New agent attribute of rabbit to be diffused by the background: R. New simulation property to control hunger: @fox_hunger: number of cycles for fox to become hungry and seek food. New agent attribute of fox to record hunger: hunger -- number of cycles since fox has last eaten; set to zero when fox eats. Implementation details: New method in rabbit agent to set R when creating new agent. This is done by creating a separate method in rabbit to initialize agent attribute, then calling this method from the “When Creating New Agent” method. This permits using a test/broadcast to set all rabbit attributes in the world without having to erase/replace them. Diffusion formula used: 0.25*(r[up]+r[down]+r[left]+r[right])
Edit Description
Design