evo_game: Simulate a two dimensional plane with agents and food over...

View source: R/evo_game.R

evo_gameR Documentation

Simulate a two dimensional plane with agents and food over time and also return meta data

Description

The function evo_game, as base_evo_game gives information about agents and food per time point and additionally returns meta data for each time point.

Usage

evo_game(
  rowsField = 20,
  columnsField = 20,
  nFood = 50,
  nAgent = 20,
  tick = 20,
  foodGeneratingType = "linear",
  foodGeneratingFactor = 1
)

Arguments

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.

Details

For information each data frame column and information about the underlying generating process, see the github README.md file https://github.com/PhilNrbts/Evo_simulation/blob/master/README.md.

Value

A list of two data frames with information about individual agents ("Agent_Details") and food quantities ("Food_Details") at each time point, equal to base_evo_game. Additionally provides a data frame about meta data ("Meta_Data").

See Also

base_evo_game

Examples

game <- base_evo_game(rowsField = 4, columnsField = 4, nFood = 2, nAgent = 3, tick = 5, foodGeneratingType = "linear", foodGeneratingFactor = 1)
game$Agent_Details
game$Food_Details
game$Meta_Data

PhilNrbts/EvoGame documentation built on Sept. 14, 2024, 1:25 a.m.