Breakout-MinAtar¶
MinBreakout ¶
Bases: Environment[EnvState, EnvParams]
Bounce a ball off a paddle to break rows of bricks.
JAX port of the MinAtar Breakout environment. The player controls a paddle in the bottom row of a 10x10 grid and must bounce the ball to break the three rows of bricks in rows 1 to 3. The ball travels only along diagonals and bounces off the paddle, the walls and the bricks. It starts in row 3 at the left or right wall, chosen at random, and moves down towards the centre. Once all bricks are cleared, another three rows are added when the ball next reaches the bottom row. There is no difficulty increase.
- Observation:
Boxof shape(10, 10, 4)with binary channels: 0 paddle, 1 ball, 2 trail (the previous position of the ball, indicating its direction), 3 brick. - Actions:
Discrete(3)with the minimal action set: 0 no-op, 1 left, 2 right.Discrete(6)with the full action set: 0 no-op, 1 left, 3 right; the actions 2, 4 and 5 have no effect. - Reward: +1 for each broken brick.
- Termination: the ball reaches the bottom row without hitting the paddle.
- Truncation: after
params.max_steps_in_episodesteps (1000 by default).
Parameters:
-
use_minimal_action_set(bool, default:True) –Whether to expose only the actions that have an effect in this game instead of all six MinAtar actions.
References
Parameters and state¶
EnvParams ¶
Bases: EnvParams
Parameters of the Breakout environment.
Attributes:
-
max_steps_in_episode(int) –Number of steps after which the episode is truncated.
EnvState ¶
Bases: EnvState
State of the Breakout environment.
Attributes:
-
ball_y(Array) –Row of the ball.
-
ball_x(Array) –Column of the ball.
-
ball_dir(Array) –Direction of the ball: 0 up-left, 1 up-right, 2 down-right, 3 down-left.
-
pos(int) –Column of the paddle.
-
brick_map(Array) –Array of shape
(10, 10)that is 1 where a brick is present. -
strike(bool) –Whether the ball ran into a brick in the previous step, in which case it cannot break another brick in the current step.
-
last_y(Array) –Row of the ball in the previous step.
-
last_x(Array) –Column of the ball in the previous step.
-
time(int) –Number of steps taken in the current episode.
-
terminal(bool) –Whether the episode has terminated.