View source: R/base_evo_game.R
base_evo_game | R Documentation |
The function base_evo_game runs agents through circles of status changes and movements that resemble a simplified evolution process on a 2 dimensional plane. The agents have the possibility to eat food when being on a coordinate with food.
base_evo_game(
rowsField = 20,
columnsField = 20,
nFood = 50,
nAgent = 20,
tick = 20,
foodGeneratingType = "linear",
foodGeneratingFactor = 1
)
rowsField |
Numeric value > 1 that determines the number of rows the game takes place in. |
columnsField |
Numeric value > 1 that determines the number of columns the game takes place in. |
nFood |
Numeric value that determines the number of food palets that are present at the start of the game. |
nAgent |
Numeric value that determines the number of agents that are present at the start of the game. |
tick |
Numeric value that determines the number of time points that the game runs at most. |
foodGeneratingType |
String value "linear" or "cumulative", which determines if food is added per time point as constant or based on the amount of food that is already present. |
foodGeneratingFactor |
Numeric value that determines how many food is added, depending on foodGeneratingType. |
For information each data frame column and information about the underlying generating process, see the github README.md file.
A list of two data frames with information about individual agents ("Agent_Details") and food quantities ("Food_Details") at each time point. Each agent individual has a personal identification ("ID"), each field with food a quantity ("n"). Both data frames contain information about the row ("row"), column ("col"), and index ("ind") where the agent/food is located at that time.
base_game_function
game <- base_evo_game(rowsField = 4, columnsField = 4, nFood = 2, nAgent = 3, tick = 5, foodGeneratingType = "linear", foodGeneratingFactor = 1)
game$Agent_Details
game$Food_Details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.