Catcher

../../_images/catcher.gif

In Catcher the agent must catch falling fruit with its paddle.

Valid Actions

Left and right control the direction of the paddle. The paddle has a little velocity added to it to allow smooth movements.

Terminal states (game_over)

The game is over when the agent lose the number of lives set by init_lives parmater.

Rewards

The agent receives a positive reward, of +1, for each successful fruit catch, while it loses a point, -1, if the fruit is not caught.

class ple.games.catcher.Catcher(width=64, height=64, init_lives=3)[source]

Based on Eder Santana‘s game idea.

Parameters:

width : int

Screen width.

height : int

Screen height, recommended to be same dimension as width.

init_lives : int (default: 3)

The number lives the agent has.

getGameState()[source]

Gets a non-visual state representation of the game.

Returns:

dict

  • player x position.
  • players velocity.
  • fruits x position.
  • fruits y position.

See code for structure.