Pred_Prey_Sim_Stage_3
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])
Stage 3: In the world of Stage 2, after some time (@rabbit_spawn) a rabbit will spawn a new rabbit. New statistic (@rabbit_births). New agent attribute of rabbit (maturity). Rabbit maturity incremented each cycle. If rabbit reaches maturity (@rabbit_spawn), it creates a new rabbit, increments @rabbit_births, and sets its maturity to zero. Additional plot (@rabbit_births).
Data | |
---|---|
Created: | February 6, 2016 |
Edit Time: | 12 Minutes |
Played: | 138 |
Agent: | 4 |
Rules: | 19 |
Methods: | 9 |
Parent Project: | 60529 |
false
Configuración
Nombre del nuevo proyecto
Renombrar
Copiar
Descargar
Mostrar informe del proyecto
Marcar Proyecto
Borrar
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])
Stage 3: In the world of Stage 2, after some time (@rabbit_spawn) a rabbit will spawn a new rabbit. New statistic (@rabbit_births). New agent attribute of rabbit (maturity). Rabbit maturity incremented each cycle. If rabbit reaches maturity (@rabbit_spawn), it creates a new rabbit, increments @rabbit_births, and sets its maturity to zero. Additional plot (@rabbit_births).
Editar Descripción
Diseñar