lookup_situation: Retrieve from the Strategy Table the Number of the Current...

Description Usage Arguments Details Value Examples

Description

lookup_situation retrieves the robots current situation in his strategy table.

Usage

1
lookup_situation(individual, grid, latitude = 2, longitude = 2)

Arguments

individual

one individual strategy taken form the population made with create_poulation.

grid

a matrix made with create_grid.

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.

Details

To decide which move to perform next, the robot looks up his current situation in his strategy table. There he finds the corresponding action.

Value

A number from the robots' strategy table.

Examples

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)

Tabea123/FindMyCat documentation built on June 5, 2019, 7:56 a.m.