Description Usage Arguments Details Value Examples
lookup_situation
retrieves the robots current situation in his strategy
table.
1 | lookup_situation(individual, grid, latitude = 2, longitude = 2)
|
individual |
one individual strategy taken form the population made with
|
grid |
a matrix made with |
latitude |
a number indicating the current position of the robot on the y-axis. |
longitude |
a number indicating the current position of the robot on the x-axis. |
To decide which move to perform next, the robot looks up his current situation in his strategy table. There he finds the corresponding action.
A number from the robots' strategy table.
1 2 3 4 | population1 <- create_population(50)
my_grid <- create_grid(c(5, 5), 8)
lookup_situation(individual = population1[[2]], grid = my_grid, latitude = 9,
longitude = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.