robot_game#
Classes#
- class prt_sim.jhu.robot_game.RobotGame(render_mode: str | None = 'rgb_array')[source]#
Robot Game is a discrete grid world navigated by Fred the robot.
Action space: integer representing a discrete action described in the table below
Num
Action
0
up
1
down
2
left
3
right
Observation space: integer representing the current grid space
Reward: +25 for reaching goal, -25 for falling in pit, -1 for every other location
Examples:
- execute_action(action: int) Tuple[int, float, bool][source]#
Executes the action and a step of the world.
- get_number_of_actions() int[source]#
Returns the number of actions in the world.
- Returns:
number of actions
- Return type:
- get_number_of_states() int[source]#
Returns the number of states in the world.
- Returns:
number of states
- Return type:
- get_state() int[source]#
Returns the current world state, which is the location of the robot.
- Returns:
current location of the robot
- Return type: