Search
Class State encapsulates a position in a maze, i.e. a row r and a column c. You can create a State like this:
State
r
c
>>> from kuimaze2 import State >>> state = State(1, 2) >>> state State(r=1, c=2)
You can easilly see what position the state represents. But in your algorithms you will almost never need to create a State instance yourself. (But you may need to create a State instance in your testing code.)
Class Action is an Enum and represents 4 actions available for your agents to choose from:
Action
Enum
>>> from kuimaze2 import Action >>> Action <enum 'Action'> >>> actions = list(Action) >>> actions [<Action.UP: 0>, <Action.RIGHT: 1>, <Action.DOWN: 2>, <Action.LEFT: 3>] >>> actions[0] == Action.UP True