# RaycastMaze¶

In RaycastMaze the agent must navigate a 3D environment searching for the exit denoted with a bright red square.

It is possible to increase the map size by 1 each time it successfully solves the maze. As seen below.

## Example¶

>>> #init and setup etc.
>>> while True:
>>>   if game.game_over():
>>>     game.map_size += 1
>>>   game.step(dt) #assume dt is given


Not valid code above.

## Valid Actions¶

Forwards, backwards, turn left and turn right.

## Terminal states (game_over)¶

When the agent is a short distance, nearly touching the red square, the game is considered over.

## Rewards¶

Currently it receives a postive reward of +1 when it finds the red block.

class ple.games.raycastmaze.RaycastMaze(init_pos=(1, 1), resolution=1, move_speed=20, turn_speed=13, map_size=10, height=48, width=48)[source]
Parameters: init_pos : tuple of int (default: (1,1)) The position the player starts on in the grid. The grid is zero indexed. resolution : int (default: 1) This instructs the Raycast engine on how many vertical lines to use when drawing the screen. The number is equal to the width / resolution. move_speed : int (default: 20) How fast the agent moves forwards or backwards. turn_speed : int (default: 13) The speed at which the agent turns left or right. map_size : int (default: 10) The size of the maze that is generated. Must be greater then 5. Can be incremented to increase difficulty by adjusting the attribute between game resets. width : int (default: 48) Screen width. height : int (default: 48) Screen height, recommended to be same dimension as width.
getGameState()[source]
Returns: None Does not have a non-visual representation of game state. Would be possible to return the location of the maze end.