diff --git a/_modules/tetris_gymnasium/envs/tetris/index.html b/_modules/tetris_gymnasium/envs/tetris/index.html index 5846118..25273d1 100644 --- a/_modules/tetris_gymnasium/envs/tetris/index.html +++ b/_modules/tetris_gymnasium/envs/tetris/index.html @@ -322,6 +322,7 @@
randomizer: Randomizer = None,
base_pixels=None,
tetrominoes=None,
+ render_upscale: int = 10,
):
"""Creates a new Tetris environment.
@@ -337,8 +338,10 @@ Source code for tetris_gymnasium.envs.tetris
randomizer: The :class:`Randomizer` to use for selecting tetrominoes
base_pixels: A list of base (non-Tetromino) :class:`Pixel` to use for the environment (e.g. empty, bedrock).
tetrominoes: A list of :class:`Tetromino` to use in the environment.
+ render_upscale: The factor to upscale the rendered board by.
"""
# Dimensions
+ self.game_over = False
self.height: int = height
self.width: int = width
@@ -429,6 +432,7 @@ Source code for tetris_gymnasium.envs.tetris
assert render_mode is None or render_mode in self.metadata["render_modes"]
self.render_mode = render_mode
+ self.render_scaling_factor = render_upscale
self.window_name = None
def step(self, action: ActType) -> "tuple[dict, float, bool, bool, dict]":
@@ -447,9 +451,9 @@ Source code for tetris_gymnasium.envs.tetris
action
), f"{action!r} ({type(action)}) invalid"
- game_over = False
truncated = False # Tetris without levels will never truncate
reward = 0
+ lines_cleared = 0
if action == self.actions.move_left:
if not self.collision(self.active_tetromino, self.x - 1, self.y):
@@ -482,7 +486,7 @@ Source code for tetris_gymnasium.envs.tetris
else:
self.reset_tetromino_position()
elif action == self.actions.hard_drop:
- reward, game_over = self.commit_active_tetromino()
+ reward, self.game_over, lines_cleared = self.commit_active_tetromino()
elif action == self.actions.no_op:
pass
@@ -492,9 +496,15 @@ Source code for tetris_gymnasium.envs.tetris
self.y += 1
else:
# If there's no more room to move, lock in the tetromino
- reward, game_over = self.commit_active_tetromino()
-
- return self._get_obs(), reward, game_over, truncated, self._get_info()
+ reward, self.game_over, lines_cleared = self.commit_active_tetromino()
+
+ return (
+ self._get_obs(),
+ reward,
+ self.game_over,
+ truncated,
+ {"lines_cleared": lines_cleared},
+ )
def reset(
self, *, seed: "int | None" = None, options: "dict[str, Any] | None" = None
@@ -513,6 +523,7 @@ Source code for tetris_gymnasium.envs.tetris
# Initialize fresh board
self.board = self.create_board()
+ self.game_over = False
# Reset the randomizer
self.queue.reset(seed=seed)
@@ -587,14 +598,17 @@ Source code for tetris_gymnasium.envs.tetris
matrix = self.get_rgb(self._get_obs())
if self.render_mode == "human" or self.render_mode == "rgb_array":
+ # Upscale the matrix for better visualization
+ kernel = np.ones(
+ (self.render_scaling_factor, self.render_scaling_factor, 1),
+ dtype=np.uint8,
+ )
+ matrix = np.kron(matrix, kernel)
+
if self.render_mode == "rgb_array":
return matrix
if self.render_mode == "human":
- # Upscale the matrix for better visibility
- scale_factor = 10
- kernel = np.ones((scale_factor, scale_factor, 1), dtype=np.uint8)
- matrix = np.kron(matrix, kernel)
if self.window_name is None:
self.window_name = "Tetris Gymnasium"
cv2.namedWindow(self.window_name, cv2.WINDOW_GUI_NORMAL)
@@ -678,26 +692,28 @@ Source code for tetris_gymnasium.envs.tetris
The reward for the current step and whether the game is over.
"""
# 1. Drop the tetromino and lock it in place
+ lines_cleared = 0
if self.collision(self.active_tetromino, self.x, self.y):
reward = self.rewards.game_over
- game_over = True
+ self.game_over = True
else:
self.drop_active_tetromino()
self.place_active_tetromino()
- reward = self.score(self.clear_filled_rows())
+ self.board, lines_cleared = self.clear_filled_rows(self.board)
+ reward = self.score(lines_cleared)
# 2. Spawn the next tetromino and check if the game continues
- game_over = not self.spawn_tetromino()
+ self.game_over = not self.spawn_tetromino()
reward += self.rewards.alife
- if game_over:
+ if self.game_over:
reward = self.rewards.game_over
# 3. Reset the swap flag (agent can swap once per tetromino)
self.has_swapped = False
- return reward, game_over
+ return reward, self.game_over, lines_cleared
- def clear_filled_rows(self) -> int:
+ def clear_filled_rows(self, board) -> "tuple(np.ndarray, int)":
"""Clear any filled rows on the board.
The clearing is performed using numpy by indexing only the rows that are not filled and
@@ -709,14 +725,12 @@ Source code for tetris_gymnasium.envs.tetris
The number of rows that were cleared.
"""
# A row is filled if it doesn't contain any free space (0) and doesn't contain any bedrock / padding (1).
- filled_rows = (~(self.board == 0).any(axis=1)) & (
- ~(self.board == 1).all(axis=1)
- )
+ filled_rows = (~(board == 0).any(axis=1)) & (~(board == 1).all(axis=1))
n_filled = np.sum(filled_rows)
if n_filled > 0:
# Identify the rows that are not filled.
- unfilled_rows = self.board[~filled_rows]
+ unfilled_rows = board[~filled_rows]
# Create a new top part of the board with free space (0) to compensate for the cleared rows.
free_space = np.zeros((n_filled, self.width), dtype=np.uint8)
@@ -728,9 +742,9 @@ Source code for tetris_gymnasium.envs.tetris
)
# Concatenate the new top with the unfilled rows to form the updated board.
- self.board[:] = np.concatenate((free_space, unfilled_rows), axis=0)
+ board[:] = np.concatenate((free_space, unfilled_rows), axis=0)
- return n_filled
+ return board, n_filled
def crop_padding(self, matrix: np.ndarray) -> np.ndarray:
"""Crop the padding from the given matrix.
@@ -837,7 +851,7 @@ Source code for tetris_gymnasium.envs.tetris
def _get_info(self) -> dict:
"""Return the current game state as info."""
- return {}
+ return {"lines_cleared": 0}
def score(self, rows_cleared) -> int:
"""Calculate the score based on the number of lines cleared.
@@ -848,7 +862,7 @@ Source code for tetris_gymnasium.envs.tetris
Returns
The score for the given number of lines cleared.
"""
- return rows_cleared * self.rewards.clear_line
+ return (rows_cleared**2) * self.width
def create_board(self) -> np.ndarray:
"""Create a new board with the given dimensions."""
diff --git a/_modules/tetris_gymnasium/wrappers/grouped/index.html b/_modules/tetris_gymnasium/wrappers/grouped/index.html
index ce94eea..5fd3c64 100644
--- a/_modules/tetris_gymnasium/wrappers/grouped/index.html
+++ b/_modules/tetris_gymnasium/wrappers/grouped/index.html
@@ -391,6 +391,10 @@ Source code for tetris_gymnasium.wrappers.grouped
grouped_board_obs = []
+ if self.env.game_over:
+ # game over (previous step)
+ np.zeros(self.observation_space.shape)
+
t = self.env.unwrapped.active_tetromino
for x in range(self.env.unwrapped.width):
# reset position
@@ -407,19 +411,38 @@ Source code for tetris_gymnasium.wrappers.grouped
while not self.env.unwrapped.collision(t, x, y + 1):
y += 1
+ # # append to results
+ # if self.collision_with_frame(t, x, y):
+ # self.legal_actions_mask[
+ # self.encode_action(x - self.env.unwrapped.padding, r)
+ # ] = 0
+ # grouped_board_obs.append(np.ones_like(board_obs))
+ # elif not self.env.unwrapped.collision(t, x, y):
+ # grouped_board_obs.append(
+ # self.env.unwrapped.project_tetromino(t, x, y)
+ # )
+ # else:
+ # # regular game over
+ # grouped_board_obs.append(np.zeros_like(board_obs))
+
# append to results
+
if self.collision_with_frame(t, x, y):
+ # illegal action
self.legal_actions_mask[
self.encode_action(x - self.env.unwrapped.padding, r)
] = 0
grouped_board_obs.append(np.ones_like(board_obs))
- elif not self.env.unwrapped.collision(t, x, y):
+ elif self.env.unwrapped.collision(t, x, y):
+ # game over placement
+ grouped_board_obs.append(np.zeros_like(board_obs))
+ else:
+ # regular placement
grouped_board_obs.append(
- self.env.unwrapped.project_tetromino(t, x, y)
+ self.env.clear_filled_rows(
+ self.env.unwrapped.project_tetromino(t, x, y)
+ )[0]
)
- else:
- # regular game over
- grouped_board_obs.append(np.ones_like(board_obs))
t = self.env.unwrapped.rotate(
t
@@ -468,7 +491,7 @@ Source code for tetris_gymnasium.wrappers.grouped
np.ones(self.observation_space.shape) * self.observation_space.high
)
game_over, truncated = True, False
- info = {"action_mask": self.legal_actions_mask}
+ info = {"action_mask": self.legal_actions_mask, "lines_cleared": 0}
else:
(
observation,
@@ -499,6 +522,10 @@ Source code for tetris_gymnasium.wrappers.grouped
observation, reward, game_over, truncated, info = self.env.unwrapped.step(
self.env.unwrapped.actions.hard_drop
)
+ board = observation
+ for wrapper in self.observation_wrappers:
+ board = wrapper.observation(board)
+ info["board"] = board
observation = self.observation(observation) # generates legal_action_mask
info["action_mask"] = self.legal_actions_mask
@@ -519,6 +546,10 @@ Source code for tetris_gymnasium.wrappers.grouped
"""
self.legal_actions_mask = np.ones(self.action_space.n)
observation, info = self.env.reset(seed=seed, options=options)
+ board = observation
+ for wrapper in self.observation_wrappers:
+ board = wrapper.observation(board)
+ info["board"] = board
observation = self.observation(observation) # generates legal_action_mask
info["action_mask"] = self.legal_actions_mask
diff --git a/environments/tetris/index.html b/environments/tetris/index.html
index ffd7a2d..23be381 100644
--- a/environments/tetris/index.html
+++ b/environments/tetris/index.html
@@ -343,7 +343,7 @@ Episode Termination¶
-
-class tetris_gymnasium.envs.tetris.Tetris(render_mode=None, width=10, height=20, gravity=True, actions_mapping=ActionsMapping(), rewards_mapping=RewardsMapping(), queue: TetrominoQueue | None = None, holder: TetrominoHolder | None = None, randomizer: Randomizer | None = None, base_pixels=None, tetrominoes=None)[source]¶
+class tetris_gymnasium.envs.tetris.Tetris(render_mode=None, width=10, height=20, gravity=True, actions_mapping=ActionsMapping(), rewards_mapping=RewardsMapping(), queue: TetrominoQueue | None = None, holder: TetrominoHolder | None = None, randomizer: Randomizer | None = None, base_pixels=None, tetrominoes=None, render_upscale: int = 10)[source]¶
Tetris environment for Gymnasium.
- Parameters:
@@ -359,6 +359,7 @@ ArgumentsRandomizer to use for selecting tetrominoes
base_pixels – A list of base (non-Tetromino) Pixel
to use for the environment (e.g. empty, bedrock).
tetrominoes – A list of Tetromino
to use in the environment.
+render_upscale – The factor to upscale the rendered board by.
diff --git a/searchindex.js b/searchindex.js
index d9632a1..4afe948 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"Acknowledgements": [[6, "acknowledgements"]], "Action wrappers": [[10, "action-wrappers"]], "Actions": [[9, "actions"]], "Actions Space": [[5, "actions-space"]], "Adding typing to more modules and packages": [[4, "adding-typing-to-more-modules-and-packages"]], "Arguments": [[5, "arguments"]], "Background": [[6, "background"]], "Building the docs": [[4, "building-the-docs"]], "Contributing": [[4, null]], "Description": [[5, "description"]], "Docstrings": [[4, "docstrings"]], "Documentation": [[6, "documentation"]], "Episode Termination": [[5, "episode-termination"]], "Feature vectors": [[10, "feature-vectors"]], "Git hooks": [[4, "git-hooks"]], "Grouped actions": [[10, "grouped-actions"]], "Holder": [[0, null]], "Implementations": [[2, "implementations"]], "Information": [[6, null]], "Installation": [[7, null]], "Interactive environment": [[8, "interactive-environment"]], "License": [[6, "license"]], "Mappings": [[9, null]], "Methods": [[0, "methods"], [1, "methods"], [2, "methods"]], "Observation Space": [[5, "observation-space"]], "Observation wrappers": [[10, "observation-wrappers"]], "Pixels and Tetrominoes": [[5, "pixels-and-tetrominoes"]], "Queue": [[1, null]], "Quickstart": [[8, null]], "RGB": [[10, "rgb"]], "Randomizer": [[2, null]], "Rewards": [[5, "rewards"], [9, "rewards"]], "Simple random agent": [[8, "simple-random-agent"]], "Starting state": [[5, "starting-state"]], "Tests": [[4, "tests"]], "Tetris": [[5, null]], "Tetromino": [[3, null]], "Training": [[8, "training"]], "Type checking": [[4, "type-checking"]], "Wrappers": [[10, null]]}, "docnames": ["components/holder", "components/queue", "components/randomizer", "components/tetromino", "development/contributing", "environments/tetris", "index", "introduction/installation", "introduction/quickstart", "utilities/mappings", "utilities/wrappers"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1}, "filenames": ["components/holder.md", "components/queue.md", "components/randomizer.md", "components/tetromino.md", "development/contributing.md", "environments/tetris.md", "index.md", "introduction/installation.md", "introduction/quickstart.md", "utilities/mappings.md", "utilities/wrappers.md"], "indexentries": {"bagrandomizer (class in tetris_gymnasium.components.tetromino_randomizer)": [[2, "tetris_gymnasium.components.tetromino_randomizer.BagRandomizer", false]], "featurevectorobservation (class in tetris_gymnasium.wrappers.observation)": [[10, "tetris_gymnasium.wrappers.observation.FeatureVectorObservation", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_queue.tetrominoqueue method)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue.get_next_tetromino", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_randomizer.bagrandomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.BagRandomizer.get_next_tetromino", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_randomizer.randomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.Randomizer.get_next_tetromino", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_randomizer.truerandomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.TrueRandomizer.get_next_tetromino", false]], "get_queue() (tetris_gymnasium.components.tetromino_queue.tetrominoqueue method)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue.get_queue", false]], "get_tetrominoes() (tetris_gymnasium.components.tetromino_holder.tetrominoholder method)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder.get_tetrominoes", false]], "groupedactionsobservations (class in tetris_gymnasium.wrappers.grouped)": [[10, "tetris_gymnasium.wrappers.grouped.GroupedActionsObservations", false]], "pixel (class in tetris_gymnasium.components.tetromino)": [[3, "tetris_gymnasium.components.tetromino.Pixel", false]], "randomizer (class in tetris_gymnasium.components.tetromino_randomizer)": [[2, "tetris_gymnasium.components.tetromino_randomizer.Randomizer", false]], "reset() (tetris_gymnasium.components.tetromino_holder.tetrominoholder method)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder.reset", false]], "reset() (tetris_gymnasium.components.tetromino_queue.tetrominoqueue method)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue.reset", false]], "reset() (tetris_gymnasium.components.tetromino_randomizer.randomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.Randomizer.reset", false]], "rgbobservation (class in tetris_gymnasium.wrappers.observation)": [[10, "tetris_gymnasium.wrappers.observation.RgbObservation", false]], "swap() (tetris_gymnasium.components.tetromino_holder.tetrominoholder method)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder.swap", false]], "tetris (class in tetris_gymnasium.envs.tetris)": [[5, "tetris_gymnasium.envs.tetris.Tetris", false]], "tetromino (class in tetris_gymnasium.components.tetromino)": [[3, "tetris_gymnasium.components.tetromino.Tetromino", false]], "tetrominoholder (class in tetris_gymnasium.components.tetromino_holder)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder", false]], "tetrominoqueue (class in tetris_gymnasium.components.tetromino_queue)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue", false]], "truerandomizer (class in tetris_gymnasium.components.tetromino_randomizer)": [[2, "tetris_gymnasium.components.tetromino_randomizer.TrueRandomizer", false]]}, "objects": {"tetris_gymnasium.components.tetromino": [[3, 0, 1, "", "Pixel"], [3, 0, 1, "", "Tetromino"]], "tetris_gymnasium.components.tetromino_holder": [[0, 0, 1, "", "TetrominoHolder"]], "tetris_gymnasium.components.tetromino_holder.TetrominoHolder": [[0, 1, 1, "", "get_tetrominoes"], [0, 1, 1, "", "reset"], [0, 1, 1, "", "swap"]], "tetris_gymnasium.components.tetromino_queue": [[1, 0, 1, "", "TetrominoQueue"]], "tetris_gymnasium.components.tetromino_queue.TetrominoQueue": [[1, 1, 1, "", "get_next_tetromino"], [1, 1, 1, "", "get_queue"], [1, 1, 1, "", "reset"]], "tetris_gymnasium.components.tetromino_randomizer": [[2, 0, 1, "", "BagRandomizer"], [2, 0, 1, "", "Randomizer"], [2, 0, 1, "", "TrueRandomizer"]], "tetris_gymnasium.components.tetromino_randomizer.BagRandomizer": [[2, 1, 1, "", "get_next_tetromino"]], "tetris_gymnasium.components.tetromino_randomizer.Randomizer": [[2, 1, 1, "", "get_next_tetromino"], [2, 1, 1, "", "reset"]], "tetris_gymnasium.components.tetromino_randomizer.TrueRandomizer": [[2, 1, 1, "", "get_next_tetromino"]], "tetris_gymnasium.envs.tetris": [[5, 0, 1, "", "Tetris"]], "tetris_gymnasium.wrappers.grouped": [[10, 0, 1, "", "GroupedActionsObservations"]], "tetris_gymnasium.wrappers.observation": [[10, 0, 1, "", "FeatureVectorObservation"], [10, 0, 1, "", "RgbObservation"]]}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"]}, "objtypes": {"0": "py:class", "1": "py:method"}, "terms": {"": [0, 2, 3, 4, 5, 8], "0": [3, 5, 8, 9, 10], "001": 9, "1": [0, 3, 5, 8, 9, 10], "10": 5, "18": 5, "1d": [5, 10], "2": [5, 9, 10], "20": 5, "24": 5, "2d": [3, 5], "3": [5, 9, 10], "4": [1, 5, 9, 10], "42": [6, 8], "5": [9, 10], "6": [9, 10], "7": [9, 10], "8": 5, "9": 5, "A": [0, 2, 3, 5, 6, 10], "And": 3, "At": [7, 10], "For": [4, 8, 10], "If": [0, 2, 4, 5, 8, 10], "In": [2, 3, 4, 5, 7, 8, 10], "It": [2, 4, 5], "On": 3, "The": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "These": [4, 10], "To": [4, 5, 6, 8], "With": 8, "__main__": 8, "__name__": 8, "_build": 4, "about": [5, 6, 10], "abstract": [2, 6], "accord": 5, "action": [6, 8], "action_mask": 10, "action_spac": [6, 8], "actions_map": 5, "actionsmap": [5, 9], "activ": 5, "active_tetromino_mask": 5, "actual": 2, "ad": [9, 10], "adapt": 10, "add": 4, "addit": [4, 10], "addition": [3, 4], "address": 6, "adjust": [5, 6, 8], "after": [2, 8], "agent": [5, 6, 10], "aim": 6, "alif": 9, "all": [0, 1, 2, 3, 4, 5, 6, 10], "allow": 8, "also": [4, 5], "alter": [5, 10], "altern": [4, 10], "alwai": [1, 4], "an": [2, 3, 4, 5, 6, 8, 10], "ani": 4, "ansi": [6, 8], "api": 6, "appli": 10, "approach": [2, 10], "ar": [0, 2, 3, 4, 5, 9, 10], "argument": 4, "around": [8, 10], "arrai": [3, 5, 10], "ascend": 10, "assembl": 6, "assign": 5, "attribut": 10, "autobuild": 4, "automat": 4, "avail": [2, 6], "avoid": 2, "b": 4, "bag": 2, "bagrandom": 2, "base": [4, 5], "base_pixel": 5, "baselin": 6, "basi": 3, "basic": [3, 5], "becaus": 10, "bedrock": [3, 5], "been": [2, 4, 10], "befor": [2, 5], "behavior": 8, "being": 6, "below": 4, "between": [5, 10], "bias": 8, "binari": [3, 5], "block": [3, 4], "board": [5, 10], "bool": 10, "border": 5, "both": 10, "bottom": 10, "box": 5, "break": 8, "build": 3, "built": [4, 6], "bumpi": 10, "call": [2, 3, 8], "caller": 2, "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "cannot": 5, "case": [0, 2], "cd": [4, 7], "center": 5, "challeng": 6, "chang": [4, 5, 10], "choos": [2, 10], "chosen": 2, "ci": 4, "class": [0, 1, 2, 3, 4, 5, 9, 10], "cleanrl": [6, 8], "clear": [0, 6], "clear_lin": 9, "clone": 7, "code": [4, 6, 8], "codebas": 6, "collis": 10, "color": 3, "color_rgb": 3, "column": 10, "com": [2, 7, 10], "combin": 3, "command": [4, 8], "commit": 4, "common": 2, "commonli": 10, "compar": 6, "complet": [6, 8], "compon": [0, 1, 2, 3, 5], "compos": 3, "conceptu": 3, "configur": 4, "consid": 10, "consist": 5, "constant": 5, "constructor": [4, 5, 10], "contain": [5, 10], "contemporari": 6, "continu": 4, "convent": 4, "convolut": 8, "correct": 4, "correspond": [9, 10], "could": 8, "coupl": 4, "creat": [4, 8], "creator": 6, "current": [0, 1, 4, 8, 10], "custom": [1, 5], "customis": 6, "customiz": 5, "cv2": 8, "d": 8, "dataclass": 9, "date": 6, "dedic": 5, "deep": [6, 10], "default": [0, 1, 2, 3, 5, 9, 10], "defin": [5, 10], "demonstr": 10, "depend": 10, "describ": 10, "design": 5, "desir": [2, 9], "despit": 6, "detail": [5, 6], "develop": 4, "dict": 5, "dictionari": [5, 10], "differ": [2, 6, 10], "dimens": 10, "directori": 8, "dirhtml": 4, "discret": [5, 10], "discuss": 10, "displai": 10, "distinguish": 5, "distribut": [2, 7], "do": [2, 8], "doctest": 4, "document": [4, 8, 10], "done": [4, 5], "dqn": 8, "dure": [0, 5, 8], "dynam": 10, "e": [5, 8], "each": [2, 4, 10], "easi": 6, "easili": [2, 10], "easychair": 6, "effect": 10, "either": [4, 5, 10], "element": 5, "elif": 8, "empti": [3, 5], "enabl": [5, 8], "end": 5, "ensur": 2, "env": [5, 6, 8, 10], "environ": [5, 6, 7, 10], "episod": 10, "equal": 5, "especi": 6, "evalu": 6, "everi": 4, "exampl": [3, 4, 6, 8, 10], "exclud": 4, "exit": 8, "expand": 4, "explain": [2, 4], "exploit": 2, "expos": 6, "extend": [9, 10], "fail": 4, "failur": 4, "fals": [6, 8], "fandom": 2, "featur": [4, 6], "featurevectorobserv": 10, "feel": 4, "field": 5, "file": [4, 6, 8], "first": [2, 4, 8, 10], "fit": 2, "flag": 8, "flatten": 10, "folder": 4, "follow": [4, 5, 8, 9, 10], "form": [2, 3], "format": 4, "found": [4, 6, 10], "four": 10, "frame": 10, "framework": 6, "free": [4, 6], "from": [1, 2, 6, 8, 10], "fulfil": 6, "full": [0, 1, 6], "fulli": 2, "function": [2, 4, 8, 10], "futur": [4, 7, 10], "g": 5, "game": [0, 2, 3, 5, 6, 8, 10], "game_ov": 9, "gener": [1, 2, 5, 10], "get": [0, 1, 2, 5, 6], "get_next_tetromino": [1, 2], "get_queu": 1, "get_tetromino": 0, "getwindowproperti": 8, "git": 7, "github": [6, 7, 10], "give": 8, "given": 0, "googl": 4, "graviti": 5, "groupedact": 10, "groupedactionsobserv": 10, "guidelin": 4, "gym": [6, 8], "gymnasium": [2, 4, 5, 6, 7, 8, 10], "ha": [2, 3, 4, 10], "hard_drop": [8, 9], "have": [3, 4, 8, 10], "height": [5, 10], "help": [4, 5], "hendrik": 10, "here": 6, "high": 10, "hint": 4, "hold": 5, "holder": [5, 10], "hole": 10, "how": [4, 8, 10], "howev": 4, "http": [2, 7, 10], "human": 8, "i": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "id": [3, 5], "idea": 10, "ignor": 4, "illeg": 10, "imag": 10, "implement": [0, 6, 10], "import": [5, 6, 8], "includ": 4, "incom": 1, "index": [2, 10], "indic": [5, 10], "individu": 10, "info": [6, 8, 10], "inform": [2, 5, 8, 10], "initi": [0, 1, 2, 3, 5, 8], "input": 8, "instal": [4, 8], "instanc": 8, "instead": 10, "instruct": 4, "int": [2, 3, 10], "integ": 9, "integr": 6, "interpret": 10, "introduc": [6, 10], "involv": [0, 5], "issu": 4, "its": [0, 1, 6], "j": [3, 5], "kei": [6, 8, 10], "keyboard": 8, "l": [3, 5], "lack": 6, "larg": 4, "largest": 5, "later": [0, 5], "lead": 2, "learn": [6, 8, 10], "left": 10, "legal": 10, "legal_actions_mask": 10, "librari": 7, "like": [4, 5, 6, 8], "line": 4, "linear": 8, "list": [2, 3, 4, 5, 10], "literatur": 10, "live": 4, "ll": 3, "local": 4, "login": 8, "long": 2, "look": [5, 8], "loop": 8, "machin": [6, 10], "mai": [2, 4, 5], "main": 8, "maintain": 6, "make": [1, 4, 5, 6, 8], "mani": [6, 10], "manual": 4, "map": [5, 8], "mask": [5, 10], "matric": 5, "matrix": [3, 5, 10], "matter": 4, "max": 7, "maximum": 10, "mean": [5, 10], "method": 8, "might": 10, "mit": 6, "mode": 5, "model": 8, "modern": 6, "modifi": 4, "modular": 6, "moment": 7, "more": [0, 6, 8, 10], "most": 2, "move": [5, 10], "move_down": [8, 9], "move_left": [8, 9], "move_right": [8, 9], "multilin": 4, "multipl": 3, "n": [6, 8], "name": 9, "ndarrai": 3, "need": [2, 4, 5, 8], "new": [1, 2, 4, 10], "next": [1, 2, 5, 8], "non": 5, "none": [0, 1, 2, 5, 8, 10], "note": [4, 8, 10], "number": [0, 1, 2, 4, 10], "o": [3, 5], "object": [2, 3], "observ": [6, 8], "observation_wrapp": 10, "observationwrapp": 10, "offer": 10, "offici": 4, "often": 10, "oldest": 0, "onc": [0, 2, 4], "one": [0, 1, 2, 4, 10], "onli": [0, 2, 10], "open": 6, "oper": 9, "option": 10, "ord": 8, "order": [2, 8, 10], "other": [2, 6], "otherwis": 0, "our": 6, "out": 0, "outlin": 4, "over": [2, 6, 8, 10], "overview": 5, "own": [2, 3, 10], "pad": 5, "page": [2, 6], "paper": 6, "paradigm": 10, "paramet": [0, 1, 2, 5, 10], "particular": 5, "pass": [2, 4, 5, 10], "pattern": 2, "penalti": 10, "per": 4, "perform": [6, 8, 10], "pick": 8, "pickl": 4, "piec": [1, 3, 5, 6], "pixel": 3, "place": [5, 10], "plai": [5, 6, 8, 10], "play_interact": 8, "player": 5, "pleas": [4, 5], "poetri": [4, 7, 8], "point": 4, "popular": [2, 6], "posit": 10, "possibl": 10, "power": 6, "pradhan": 10, "pre": 4, "predefin": 10, "preprint": 6, "preprocess": 5, "print": [6, 8], "problem": 6, "process": [2, 4], "progress": 4, "project": [4, 6], "prompt": 8, "provid": [0, 4, 6], "pull": 4, "purpos": [4, 10], "push": 4, "py": 8, "pydocstyl": 4, "pypi": 7, "pyproject": 4, "pyright": 4, "pytest": 4, "python": 8, "pytorch": [6, 10], "q": [6, 8, 10], "qualiti": 6, "queue": [0, 5, 10], "r": 8, "random": [1, 5, 6], "random_gener": 2, "randomli": 2, "re": 4, "read": [4, 6], "readabl": 9, "real": [8, 10], "reason": [4, 10], "receiv": 5, "recommend": 4, "refer": [5, 6, 8, 10], "reinforc": [6, 8, 10], "relat": 6, "render": [5, 6, 8], "render_mod": [5, 6, 8], "report": 10, "report_bumpi": 10, "report_height": 10, "report_hol": 10, "report_max_height": 10, "repositori": [4, 7], "repres": 3, "represent": 10, "request": 4, "requir": [4, 6], "reset": [0, 1, 2, 6, 8], "reshuffl": 2, "respect": [5, 10], "result": 10, "return": [0, 2, 4, 8, 10], "reward": [6, 8, 10], "rewards_map": 5, "rewardsmap": [5, 9], "rgbobserv": 10, "right": 10, "rl": [6, 10], "rng": 2, "root": 4, "rotat": [5, 10], "rotate_clockwis": [8, 9], "rotate_counterclockwis": [8, 9], "run": [4, 7, 8], "same": [2, 3, 5], "sampl": [2, 6, 8], "script": 8, "second": [4, 10], "section": [4, 5, 10], "see": 6, "seed": [1, 2, 6, 8], "select": [2, 5], "sequenc": [1, 2], "sever": 4, "shape": [5, 10], "short": 4, "should": 4, "show": 8, "simpl": 6, "simplest": 2, "singl": [3, 4, 10], "size": [0, 1, 2, 5, 10], "skip": 4, "small": [4, 9], "so": 10, "solv": 6, "some": [8, 10], "sourc": [0, 1, 2, 3, 4, 5, 6, 10], "space": 10, "spawn": 5, "special": 10, "specif": 10, "sphinx": 4, "stack": 10, "stage": 10, "start": [2, 6, 8], "state": [0, 1, 8, 10], "static": 10, "step": [4, 6, 8], "steven": 10, "store": [0, 1, 3, 5, 10], "strict": 4, "style": 4, "subclass": [2, 9], "support": [4, 5], "sure": 1, "swap": [0, 8, 9], "sy": 8, "t": [3, 5], "take": [5, 8], "taken": 10, "temporarili": 5, "termin": [6, 8, 10], "terminate_on_illegal_act": 10, "tetri": [0, 2, 3, 6, 7, 8, 10], "tetris_gymnasium": [0, 1, 2, 3, 4, 5, 6, 8, 10], "tetromino": [0, 1, 2, 10], "tetromino_hold": 0, "tetromino_queu": 1, "tetromino_random": 2, "tetrominohold": [0, 5], "tetrominoqueu": [1, 5], "text": 8, "thank": 6, "thei": [4, 5], "them": 10, "therefor": [5, 10], "thi": [0, 2, 4, 5, 6, 7, 8, 10], "those": 4, "three": 5, "thu": 2, "tightli": 6, "time": [4, 10], "toml": 4, "too": 10, "tool": 4, "top": [4, 5, 10], "total": 10, "track": 8, "train": [5, 6], "train_cnn": 8, "train_lin": 8, "tri": 6, "true": [5, 10], "truerandom": 2, "truncat": [6, 8], "two": 4, "typic": [3, 8], "uint8": 5, "under": [6, 10], "understand": 6, "uniform": 2, "unwrap": 8, "up": 6, "us": [0, 1, 2, 3, 4, 5, 6, 8, 10], "usag": 2, "user": [1, 8], "usual": 5, "uvipen": 10, "valu": [3, 5, 9, 10], "variabl": 9, "veri": [2, 5], "verifi": 4, "version": 10, "via": [2, 7], "vscode": 4, "w": 8, "wa": 6, "wait": 4, "waitkei": 8, "want": 4, "watch": 4, "we": [6, 7], "weight": 8, "welcom": 4, "when": [2, 3, 4], "where": [2, 3, 5], "whether": [5, 10], "which": [1, 2, 5, 10], "while": [6, 8], "whole": 4, "width": [5, 10], "wiki": 2, "window_nam": 8, "within": [4, 10], "without": 4, "wnd_prop_vis": 8, "work": [4, 6], "world": 8, "would": [4, 6, 10], "wrap": 10, "wrapper": 5, "x": 5, "you": [2, 3, 4, 6, 7, 8, 9, 10], "your": [2, 3, 4, 5, 8, 10], "z": [3, 5]}, "titles": ["Holder", "Queue", "Randomizer", "Tetromino", "Contributing", "Tetris", "Information", "Installation", "Quickstart", "Mappings", "Wrappers"], "titleterms": {"acknowledg": 6, "action": [5, 9, 10], "ad": 4, "agent": 8, "argument": 5, "background": 6, "build": 4, "check": 4, "contribut": 4, "descript": 5, "doc": 4, "docstr": 4, "document": 6, "environ": 8, "episod": 5, "featur": 10, "git": 4, "group": 10, "holder": 0, "hook": 4, "implement": 2, "inform": 6, "instal": 7, "interact": 8, "licens": 6, "map": 9, "method": [0, 1, 2], "modul": 4, "more": 4, "observ": [5, 10], "packag": 4, "pixel": 5, "queue": 1, "quickstart": 8, "random": [2, 8], "reward": [5, 9], "rgb": 10, "simpl": 8, "space": 5, "start": 5, "state": 5, "termin": 5, "test": 4, "tetri": 5, "tetromino": [3, 5], "train": 8, "type": 4, "vector": 10, "wrapper": 10}})
\ No newline at end of file
+Search.setIndex({"alltitles": {"Acknowledgements": [[6, "acknowledgements"]], "Action wrappers": [[10, "action-wrappers"]], "Actions": [[9, "actions"]], "Actions Space": [[5, "actions-space"]], "Adding typing to more modules and packages": [[4, "adding-typing-to-more-modules-and-packages"]], "Arguments": [[5, "arguments"]], "Background": [[6, "background"]], "Building the docs": [[4, "building-the-docs"]], "Contributing": [[4, null]], "Description": [[5, "description"]], "Docstrings": [[4, "docstrings"]], "Documentation": [[6, "documentation"]], "Episode Termination": [[5, "episode-termination"]], "Feature vectors": [[10, "feature-vectors"]], "Git hooks": [[4, "git-hooks"]], "Grouped actions": [[10, "grouped-actions"]], "Holder": [[0, null]], "Implementations": [[2, "implementations"]], "Information": [[6, null]], "Installation": [[7, null]], "Interactive environment": [[8, "interactive-environment"]], "License": [[6, "license"]], "Mappings": [[9, null]], "Methods": [[0, "methods"], [1, "methods"], [2, "methods"]], "Observation Space": [[5, "observation-space"]], "Observation wrappers": [[10, "observation-wrappers"]], "Pixels and Tetrominoes": [[5, "pixels-and-tetrominoes"]], "Queue": [[1, null]], "Quickstart": [[8, null]], "RGB": [[10, "rgb"]], "Randomizer": [[2, null]], "Rewards": [[5, "rewards"], [9, "rewards"]], "Simple random agent": [[8, "simple-random-agent"]], "Starting state": [[5, "starting-state"]], "Tests": [[4, "tests"]], "Tetris": [[5, null]], "Tetromino": [[3, null]], "Training": [[8, "training"]], "Type checking": [[4, "type-checking"]], "Wrappers": [[10, null]]}, "docnames": ["components/holder", "components/queue", "components/randomizer", "components/tetromino", "development/contributing", "environments/tetris", "index", "introduction/installation", "introduction/quickstart", "utilities/mappings", "utilities/wrappers"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1}, "filenames": ["components/holder.md", "components/queue.md", "components/randomizer.md", "components/tetromino.md", "development/contributing.md", "environments/tetris.md", "index.md", "introduction/installation.md", "introduction/quickstart.md", "utilities/mappings.md", "utilities/wrappers.md"], "indexentries": {"bagrandomizer (class in tetris_gymnasium.components.tetromino_randomizer)": [[2, "tetris_gymnasium.components.tetromino_randomizer.BagRandomizer", false]], "featurevectorobservation (class in tetris_gymnasium.wrappers.observation)": [[10, "tetris_gymnasium.wrappers.observation.FeatureVectorObservation", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_queue.tetrominoqueue method)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue.get_next_tetromino", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_randomizer.bagrandomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.BagRandomizer.get_next_tetromino", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_randomizer.randomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.Randomizer.get_next_tetromino", false]], "get_next_tetromino() (tetris_gymnasium.components.tetromino_randomizer.truerandomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.TrueRandomizer.get_next_tetromino", false]], "get_queue() (tetris_gymnasium.components.tetromino_queue.tetrominoqueue method)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue.get_queue", false]], "get_tetrominoes() (tetris_gymnasium.components.tetromino_holder.tetrominoholder method)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder.get_tetrominoes", false]], "groupedactionsobservations (class in tetris_gymnasium.wrappers.grouped)": [[10, "tetris_gymnasium.wrappers.grouped.GroupedActionsObservations", false]], "pixel (class in tetris_gymnasium.components.tetromino)": [[3, "tetris_gymnasium.components.tetromino.Pixel", false]], "randomizer (class in tetris_gymnasium.components.tetromino_randomizer)": [[2, "tetris_gymnasium.components.tetromino_randomizer.Randomizer", false]], "reset() (tetris_gymnasium.components.tetromino_holder.tetrominoholder method)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder.reset", false]], "reset() (tetris_gymnasium.components.tetromino_queue.tetrominoqueue method)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue.reset", false]], "reset() (tetris_gymnasium.components.tetromino_randomizer.randomizer method)": [[2, "tetris_gymnasium.components.tetromino_randomizer.Randomizer.reset", false]], "rgbobservation (class in tetris_gymnasium.wrappers.observation)": [[10, "tetris_gymnasium.wrappers.observation.RgbObservation", false]], "swap() (tetris_gymnasium.components.tetromino_holder.tetrominoholder method)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder.swap", false]], "tetris (class in tetris_gymnasium.envs.tetris)": [[5, "tetris_gymnasium.envs.tetris.Tetris", false]], "tetromino (class in tetris_gymnasium.components.tetromino)": [[3, "tetris_gymnasium.components.tetromino.Tetromino", false]], "tetrominoholder (class in tetris_gymnasium.components.tetromino_holder)": [[0, "tetris_gymnasium.components.tetromino_holder.TetrominoHolder", false]], "tetrominoqueue (class in tetris_gymnasium.components.tetromino_queue)": [[1, "tetris_gymnasium.components.tetromino_queue.TetrominoQueue", false]], "truerandomizer (class in tetris_gymnasium.components.tetromino_randomizer)": [[2, "tetris_gymnasium.components.tetromino_randomizer.TrueRandomizer", false]]}, "objects": {"tetris_gymnasium.components.tetromino": [[3, 0, 1, "", "Pixel"], [3, 0, 1, "", "Tetromino"]], "tetris_gymnasium.components.tetromino_holder": [[0, 0, 1, "", "TetrominoHolder"]], "tetris_gymnasium.components.tetromino_holder.TetrominoHolder": [[0, 1, 1, "", "get_tetrominoes"], [0, 1, 1, "", "reset"], [0, 1, 1, "", "swap"]], "tetris_gymnasium.components.tetromino_queue": [[1, 0, 1, "", "TetrominoQueue"]], "tetris_gymnasium.components.tetromino_queue.TetrominoQueue": [[1, 1, 1, "", "get_next_tetromino"], [1, 1, 1, "", "get_queue"], [1, 1, 1, "", "reset"]], "tetris_gymnasium.components.tetromino_randomizer": [[2, 0, 1, "", "BagRandomizer"], [2, 0, 1, "", "Randomizer"], [2, 0, 1, "", "TrueRandomizer"]], "tetris_gymnasium.components.tetromino_randomizer.BagRandomizer": [[2, 1, 1, "", "get_next_tetromino"]], "tetris_gymnasium.components.tetromino_randomizer.Randomizer": [[2, 1, 1, "", "get_next_tetromino"], [2, 1, 1, "", "reset"]], "tetris_gymnasium.components.tetromino_randomizer.TrueRandomizer": [[2, 1, 1, "", "get_next_tetromino"]], "tetris_gymnasium.envs.tetris": [[5, 0, 1, "", "Tetris"]], "tetris_gymnasium.wrappers.grouped": [[10, 0, 1, "", "GroupedActionsObservations"]], "tetris_gymnasium.wrappers.observation": [[10, 0, 1, "", "FeatureVectorObservation"], [10, 0, 1, "", "RgbObservation"]]}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"]}, "objtypes": {"0": "py:class", "1": "py:method"}, "terms": {"": [0, 2, 3, 4, 5, 8], "0": [3, 5, 8, 9, 10], "001": 9, "1": [0, 3, 5, 8, 9, 10], "10": 5, "18": 5, "1d": [5, 10], "2": [5, 9, 10], "20": 5, "24": 5, "2d": [3, 5], "3": [5, 9, 10], "4": [1, 5, 9, 10], "42": [6, 8], "5": [9, 10], "6": [9, 10], "7": [9, 10], "8": 5, "9": 5, "A": [0, 2, 3, 5, 6, 10], "And": 3, "At": [7, 10], "For": [4, 8, 10], "If": [0, 2, 4, 5, 8, 10], "In": [2, 3, 4, 5, 7, 8, 10], "It": [2, 4, 5], "On": 3, "The": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "These": [4, 10], "To": [4, 5, 6, 8], "With": 8, "__main__": 8, "__name__": 8, "_build": 4, "about": [5, 6, 10], "abstract": [2, 6], "accord": 5, "action": [6, 8], "action_mask": 10, "action_spac": [6, 8], "actions_map": 5, "actionsmap": [5, 9], "activ": 5, "active_tetromino_mask": 5, "actual": 2, "ad": [9, 10], "adapt": 10, "add": 4, "addit": [4, 10], "addition": [3, 4], "address": 6, "adjust": [5, 6, 8], "after": [2, 8], "agent": [5, 6, 10], "aim": 6, "alif": 9, "all": [0, 1, 2, 3, 4, 5, 6, 10], "allow": 8, "also": [4, 5], "alter": [5, 10], "altern": [4, 10], "alwai": [1, 4], "an": [2, 3, 4, 5, 6, 8, 10], "ani": 4, "ansi": [6, 8], "api": 6, "appli": 10, "approach": [2, 10], "ar": [0, 2, 3, 4, 5, 9, 10], "argument": 4, "around": [8, 10], "arrai": [3, 5, 10], "ascend": 10, "assembl": 6, "assign": 5, "attribut": 10, "autobuild": 4, "automat": 4, "avail": [2, 6], "avoid": 2, "b": 4, "bag": 2, "bagrandom": 2, "base": [4, 5], "base_pixel": 5, "baselin": 6, "basi": 3, "basic": [3, 5], "becaus": 10, "bedrock": [3, 5], "been": [2, 4, 10], "befor": [2, 5], "behavior": 8, "being": 6, "below": 4, "between": [5, 10], "bias": 8, "binari": [3, 5], "block": [3, 4], "board": [5, 10], "bool": 10, "border": 5, "both": 10, "bottom": 10, "box": 5, "break": 8, "build": 3, "built": [4, 6], "bumpi": 10, "call": [2, 3, 8], "caller": 2, "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "cannot": 5, "case": [0, 2], "cd": [4, 7], "center": 5, "challeng": 6, "chang": [4, 5, 10], "choos": [2, 10], "chosen": 2, "ci": 4, "class": [0, 1, 2, 3, 4, 5, 9, 10], "cleanrl": [6, 8], "clear": [0, 6], "clear_lin": 9, "clone": 7, "code": [4, 6, 8], "codebas": 6, "collis": 10, "color": 3, "color_rgb": 3, "column": 10, "com": [2, 7, 10], "combin": 3, "command": [4, 8], "commit": 4, "common": 2, "commonli": 10, "compar": 6, "complet": [6, 8], "compon": [0, 1, 2, 3, 5], "compos": 3, "conceptu": 3, "configur": 4, "consid": 10, "consist": 5, "constant": 5, "constructor": [4, 5, 10], "contain": [5, 10], "contemporari": 6, "continu": 4, "convent": 4, "convolut": 8, "correct": 4, "correspond": [9, 10], "could": 8, "coupl": 4, "creat": [4, 8], "creator": 6, "current": [0, 1, 4, 8, 10], "custom": [1, 5], "customis": 6, "customiz": 5, "cv2": 8, "d": 8, "dataclass": 9, "date": 6, "dedic": 5, "deep": [6, 10], "default": [0, 1, 2, 3, 5, 9, 10], "defin": [5, 10], "demonstr": 10, "depend": 10, "describ": 10, "design": 5, "desir": [2, 9], "despit": 6, "detail": [5, 6], "develop": 4, "dict": 5, "dictionari": [5, 10], "differ": [2, 6, 10], "dimens": 10, "directori": 8, "dirhtml": 4, "discret": [5, 10], "discuss": 10, "displai": 10, "distinguish": 5, "distribut": [2, 7], "do": [2, 8], "doctest": 4, "document": [4, 8, 10], "done": [4, 5], "dqn": 8, "dure": [0, 5, 8], "dynam": 10, "e": [5, 8], "each": [2, 4, 10], "easi": 6, "easili": [2, 10], "easychair": 6, "effect": 10, "either": [4, 5, 10], "element": 5, "elif": 8, "empti": [3, 5], "enabl": [5, 8], "end": 5, "ensur": 2, "env": [5, 6, 8, 10], "environ": [5, 6, 7, 10], "episod": 10, "equal": 5, "especi": 6, "evalu": 6, "everi": 4, "exampl": [3, 4, 6, 8, 10], "exclud": 4, "exit": 8, "expand": 4, "explain": [2, 4], "exploit": 2, "expos": 6, "extend": [9, 10], "factor": 5, "fail": 4, "failur": 4, "fals": [6, 8], "fandom": 2, "featur": [4, 6], "featurevectorobserv": 10, "feel": 4, "field": 5, "file": [4, 6, 8], "first": [2, 4, 8, 10], "fit": 2, "flag": 8, "flatten": 10, "folder": 4, "follow": [4, 5, 8, 9, 10], "form": [2, 3], "format": 4, "found": [4, 6, 10], "four": 10, "frame": 10, "framework": 6, "free": [4, 6], "from": [1, 2, 6, 8, 10], "fulfil": 6, "full": [0, 1, 6], "fulli": 2, "function": [2, 4, 8, 10], "futur": [4, 7, 10], "g": 5, "game": [0, 2, 3, 5, 6, 8, 10], "game_ov": 9, "gener": [1, 2, 5, 10], "get": [0, 1, 2, 5, 6], "get_next_tetromino": [1, 2], "get_queu": 1, "get_tetromino": 0, "getwindowproperti": 8, "git": 7, "github": [6, 7, 10], "give": 8, "given": 0, "googl": 4, "graviti": 5, "groupedact": 10, "groupedactionsobserv": 10, "guidelin": 4, "gym": [6, 8], "gymnasium": [2, 4, 5, 6, 7, 8, 10], "ha": [2, 3, 4, 10], "hard_drop": [8, 9], "have": [3, 4, 8, 10], "height": [5, 10], "help": [4, 5], "hendrik": 10, "here": 6, "high": 10, "hint": 4, "hold": 5, "holder": [5, 10], "hole": 10, "how": [4, 8, 10], "howev": 4, "http": [2, 7, 10], "human": 8, "i": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "id": [3, 5], "idea": 10, "ignor": 4, "illeg": 10, "imag": 10, "implement": [0, 6, 10], "import": [5, 6, 8], "includ": 4, "incom": 1, "index": [2, 10], "indic": [5, 10], "individu": 10, "info": [6, 8, 10], "inform": [2, 5, 8, 10], "initi": [0, 1, 2, 3, 5, 8], "input": 8, "instal": [4, 8], "instanc": 8, "instead": 10, "instruct": 4, "int": [2, 3, 5, 10], "integ": 9, "integr": 6, "interpret": 10, "introduc": [6, 10], "involv": [0, 5], "issu": 4, "its": [0, 1, 6], "j": [3, 5], "kei": [6, 8, 10], "keyboard": 8, "l": [3, 5], "lack": 6, "larg": 4, "largest": 5, "later": [0, 5], "lead": 2, "learn": [6, 8, 10], "left": 10, "legal": 10, "legal_actions_mask": 10, "librari": 7, "like": [4, 5, 6, 8], "line": 4, "linear": 8, "list": [2, 3, 4, 5, 10], "literatur": 10, "live": 4, "ll": 3, "local": 4, "login": 8, "long": 2, "look": [5, 8], "loop": 8, "machin": [6, 10], "mai": [2, 4, 5], "main": 8, "maintain": 6, "make": [1, 4, 5, 6, 8], "mani": [6, 10], "manual": 4, "map": [5, 8], "mask": [5, 10], "matric": 5, "matrix": [3, 5, 10], "matter": 4, "max": 7, "maximum": 10, "mean": [5, 10], "method": 8, "might": 10, "mit": 6, "mode": 5, "model": 8, "modern": 6, "modifi": 4, "modular": 6, "moment": 7, "more": [0, 6, 8, 10], "most": 2, "move": [5, 10], "move_down": [8, 9], "move_left": [8, 9], "move_right": [8, 9], "multilin": 4, "multipl": 3, "n": [6, 8], "name": 9, "ndarrai": 3, "need": [2, 4, 5, 8], "new": [1, 2, 4, 10], "next": [1, 2, 5, 8], "non": 5, "none": [0, 1, 2, 5, 8, 10], "note": [4, 8, 10], "number": [0, 1, 2, 4, 10], "o": [3, 5], "object": [2, 3], "observ": [6, 8], "observation_wrapp": 10, "observationwrapp": 10, "offer": 10, "offici": 4, "often": 10, "oldest": 0, "onc": [0, 2, 4], "one": [0, 1, 2, 4, 10], "onli": [0, 2, 10], "open": 6, "oper": 9, "option": 10, "ord": 8, "order": [2, 8, 10], "other": [2, 6], "otherwis": 0, "our": 6, "out": 0, "outlin": 4, "over": [2, 6, 8, 10], "overview": 5, "own": [2, 3, 10], "pad": 5, "page": [2, 6], "paper": 6, "paradigm": 10, "paramet": [0, 1, 2, 5, 10], "particular": 5, "pass": [2, 4, 5, 10], "pattern": 2, "penalti": 10, "per": 4, "perform": [6, 8, 10], "pick": 8, "pickl": 4, "piec": [1, 3, 5, 6], "pixel": 3, "place": [5, 10], "plai": [5, 6, 8, 10], "play_interact": 8, "player": 5, "pleas": [4, 5], "poetri": [4, 7, 8], "point": 4, "popular": [2, 6], "posit": 10, "possibl": 10, "power": 6, "pradhan": 10, "pre": 4, "predefin": 10, "preprint": 6, "preprocess": 5, "print": [6, 8], "problem": 6, "process": [2, 4], "progress": 4, "project": [4, 6], "prompt": 8, "provid": [0, 4, 6], "pull": 4, "purpos": [4, 10], "push": 4, "py": 8, "pydocstyl": 4, "pypi": 7, "pyproject": 4, "pyright": 4, "pytest": 4, "python": 8, "pytorch": [6, 10], "q": [6, 8, 10], "qualiti": 6, "queue": [0, 5, 10], "r": 8, "random": [1, 5, 6], "random_gener": 2, "randomli": 2, "re": 4, "read": [4, 6], "readabl": 9, "real": [8, 10], "reason": [4, 10], "receiv": 5, "recommend": 4, "refer": [5, 6, 8, 10], "reinforc": [6, 8, 10], "relat": 6, "render": [5, 6, 8], "render_mod": [5, 6, 8], "render_upscal": 5, "report": 10, "report_bumpi": 10, "report_height": 10, "report_hol": 10, "report_max_height": 10, "repositori": [4, 7], "repres": 3, "represent": 10, "request": 4, "requir": [4, 6], "reset": [0, 1, 2, 6, 8], "reshuffl": 2, "respect": [5, 10], "result": 10, "return": [0, 2, 4, 8, 10], "reward": [6, 8, 10], "rewards_map": 5, "rewardsmap": [5, 9], "rgbobserv": 10, "right": 10, "rl": [6, 10], "rng": 2, "root": 4, "rotat": [5, 10], "rotate_clockwis": [8, 9], "rotate_counterclockwis": [8, 9], "run": [4, 7, 8], "same": [2, 3, 5], "sampl": [2, 6, 8], "script": 8, "second": [4, 10], "section": [4, 5, 10], "see": 6, "seed": [1, 2, 6, 8], "select": [2, 5], "sequenc": [1, 2], "sever": 4, "shape": [5, 10], "short": 4, "should": 4, "show": 8, "simpl": 6, "simplest": 2, "singl": [3, 4, 10], "size": [0, 1, 2, 5, 10], "skip": 4, "small": [4, 9], "so": 10, "solv": 6, "some": [8, 10], "sourc": [0, 1, 2, 3, 4, 5, 6, 10], "space": 10, "spawn": 5, "special": 10, "specif": 10, "sphinx": 4, "stack": 10, "stage": 10, "start": [2, 6, 8], "state": [0, 1, 8, 10], "static": 10, "step": [4, 6, 8], "steven": 10, "store": [0, 1, 3, 5, 10], "strict": 4, "style": 4, "subclass": [2, 9], "support": [4, 5], "sure": 1, "swap": [0, 8, 9], "sy": 8, "t": [3, 5], "take": [5, 8], "taken": 10, "temporarili": 5, "termin": [6, 8, 10], "terminate_on_illegal_act": 10, "tetri": [0, 2, 3, 6, 7, 8, 10], "tetris_gymnasium": [0, 1, 2, 3, 4, 5, 6, 8, 10], "tetromino": [0, 1, 2, 10], "tetromino_hold": 0, "tetromino_queu": 1, "tetromino_random": 2, "tetrominohold": [0, 5], "tetrominoqueu": [1, 5], "text": 8, "thank": 6, "thei": [4, 5], "them": 10, "therefor": [5, 10], "thi": [0, 2, 4, 5, 6, 7, 8, 10], "those": 4, "three": 5, "thu": 2, "tightli": 6, "time": [4, 10], "toml": 4, "too": 10, "tool": 4, "top": [4, 5, 10], "total": 10, "track": 8, "train": [5, 6], "train_cnn": 8, "train_lin": 8, "tri": 6, "true": [5, 10], "truerandom": 2, "truncat": [6, 8], "two": 4, "typic": [3, 8], "uint8": 5, "under": [6, 10], "understand": 6, "uniform": 2, "unwrap": 8, "up": 6, "upscal": 5, "us": [0, 1, 2, 3, 4, 5, 6, 8, 10], "usag": 2, "user": [1, 8], "usual": 5, "uvipen": 10, "valu": [3, 5, 9, 10], "variabl": 9, "veri": [2, 5], "verifi": 4, "version": 10, "via": [2, 7], "vscode": 4, "w": 8, "wa": 6, "wait": 4, "waitkei": 8, "want": 4, "watch": 4, "we": [6, 7], "weight": 8, "welcom": 4, "when": [2, 3, 4], "where": [2, 3, 5], "whether": [5, 10], "which": [1, 2, 5, 10], "while": [6, 8], "whole": 4, "width": [5, 10], "wiki": 2, "window_nam": 8, "within": [4, 10], "without": 4, "wnd_prop_vis": 8, "work": [4, 6], "world": 8, "would": [4, 6, 10], "wrap": 10, "wrapper": 5, "x": 5, "you": [2, 3, 4, 6, 7, 8, 9, 10], "your": [2, 3, 4, 5, 8, 10], "z": [3, 5]}, "titles": ["Holder", "Queue", "Randomizer", "Tetromino", "Contributing", "Tetris", "Information", "Installation", "Quickstart", "Mappings", "Wrappers"], "titleterms": {"acknowledg": 6, "action": [5, 9, 10], "ad": 4, "agent": 8, "argument": 5, "background": 6, "build": 4, "check": 4, "contribut": 4, "descript": 5, "doc": 4, "docstr": 4, "document": 6, "environ": 8, "episod": 5, "featur": 10, "git": 4, "group": 10, "holder": 0, "hook": 4, "implement": 2, "inform": 6, "instal": 7, "interact": 8, "licens": 6, "map": 9, "method": [0, 1, 2], "modul": 4, "more": 4, "observ": [5, 10], "packag": 4, "pixel": 5, "queue": 1, "quickstart": 8, "random": [2, 8], "reward": [5, 9], "rgb": 10, "simpl": 8, "space": 5, "start": 5, "state": 5, "termin": 5, "test": 4, "tetri": 5, "tetromino": [3, 5], "train": 8, "type": 4, "vector": 10, "wrapper": 10}})
\ No newline at end of file