|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
#include <grid_world_env.h>
Public Member Functions | |
| board_state_type | init_board (uint_t board_s, GridWorldInitType init_type) |
| initialize the board | |
| board_state_type | step (GridWorldActionType action) |
| Execute the action on the board. | |
| void | move_piece (board_component_type piece, board_position pos) |
| move_piece Move the pice to the given position | |
| board_state_type | get_state () const |
| get_state. Returns the state of the board | |
| real_t | get_reward () const |
| Get the reward the board currently returns depending on the position of the player. | |
| void | close () |
| close | |
| void | build_static_mode () |
| build_static_mode | |
| void | build_random_mode () |
| build_random_mode | |
| void | build_player_mode (uint_t seed) |
| build_player_mode | |
| void | check_and_move (int_t row, int_t col) |
| check if the given move is valid and change the position of the player if the move either causes the game to be lost (PIT) or is a valid move i.e. not stepping into the WALL or out of the board | |
| board_move_type | validate_move (board_component_type piece, board_position pos) const |
| validate_move_ | |
Public Attributes | |
| uint_t | board_size |
| uint_t | seed = 42 |
| std::map< board_component_type, board_piece > | components |
| std::map< std::string, board_mask > | masks |
| bool | is_board_init = {false} |
Represents the board
| void bitrl::envs::grid_world::detail::board::build_player_mode | ( | uint_t | seed | ) |
build_player_mode
| void bitrl::envs::grid_world::detail::board::build_random_mode | ( | ) |
build_random_mode
| void bitrl::envs::grid_world::detail::board::build_static_mode | ( | ) |
build_static_mode
check if the given move is valid and change the position of the player if the move either causes the game to be lost (PIT) or is a valid move i.e. not stepping into the WALL or out of the board
| void bitrl::envs::grid_world::detail::board::close | ( | ) |
close
| real_t bitrl::envs::grid_world::detail::board::get_reward | ( | ) | const |
Get the reward the board currently returns depending on the position of the player.
| board_state_type bitrl::envs::grid_world::detail::board::get_state | ( | ) | const |
get_state. Returns the state of the board
| board_state_type bitrl::envs::grid_world::detail::board::init_board | ( | uint_t | board_s, |
| GridWorldInitType | init_type | ||
| ) |
initialize the board
| void bitrl::envs::grid_world::detail::board::move_piece | ( | board_component_type | piece, |
| board_position | pos | ||
| ) |
move_piece Move the pice to the given position
| piece | |
| pos |
| board_state_type bitrl::envs::grid_world::detail::board::step | ( | GridWorldActionType | action | ) |
Execute the action on the board.
| board_move_type bitrl::envs::grid_world::detail::board::validate_move | ( | board_component_type | piece, |
| board_position | pos | ||
| ) | const |
validate_move_
| piece | |
| pos |
| uint_t bitrl::envs::grid_world::detail::board::board_size |
| std::map<board_component_type, board_piece> bitrl::envs::grid_world::detail::board::components |
| bool bitrl::envs::grid_world::detail::board::is_board_init = {false} |
| std::map<std::string, board_mask> bitrl::envs::grid_world::detail::board::masks |
| uint_t bitrl::envs::grid_world::detail::board::seed = 42 |