Method | Description | |
---|---|---|
Reset ( ) : void |
Resets the world by calling reset on each agents and plant, then generating a new layout for the plants.
|
|
Step ( ) : void |
Moves all agents in the world forward by one step and collects food for any agents on top of a plant.
|
|
World ( IEnumerable |
||
calculateForagingAgentSensors ( IAgent agent ) : double[] | ||
calculatePredatorSensors ( Predator predator ) : double[] |
Method | Description | |
---|---|---|
applyToroidalAgentLocationRules ( IAgent agent ) : void |
Forces the agent to stay on screen by wrapping them around the other side of the world if they run over an edge.
|
|
clusteredLayout ( ) : void | ||
getSensorIndex ( IAgent agent, int offset, int pos ) : int | ||
layoutPlants ( ) : void | ||
onAgentEaten ( Predator eater, IAgent agent ) : void | ||
onChanged ( EventArgs e ) : void | ||
onPlantEaten ( IAgent eater, Plant plant ) : void | ||
onStepped ( EventArgs e ) : void | ||
spiralLayout ( ) : void | ||
uniformLayout ( ) : void |
public World ( IEnumerable |
||
agents | IEnumerable |
|
height | int | |
width | int | |
species | IEnumerable |
|
predators | IEnumerable |
|
layout | PlantLayoutStrategies | |
agentHorizon | int | |
return | System |
public calculateForagingAgentSensors ( IAgent agent ) : double[] | ||
agent | IAgent | |
return | double[] |
public calculatePredatorSensors ( Predator predator ) : double[] | ||
predator | Predator | |
return | double[] |