-
Notifications
You must be signed in to change notification settings - Fork 6
MakeGraphics
Ngô Xuân Phong edited this page Jun 26, 2023
·
3 revisions
1. Graphics interface:
- It is a collection of images representing the game.
- Each image depicts the (state) that the player observes from a personal perspective.
- It is designed based on the state, meaning it visually represents the parameters of the state for the player to easily track the game's progress.
2. Interaction:
- At each state, the player receives appropriate (actions) to use.
- When selecting one of those actions, the graphics interface records it and transitions to the corresponding next state. In this new state, there will be another set of appropriate actions... and so on until the end of the game.
--> All (states) and actions used by the player are stored for later observation when a game ends.
- Use the available template for the system.
- Use the PIL library to process images.
-
get_state_image
function:
- Input: state ( np.array 1D)
- Output: Image representing the corresponding state
-
get_description
function:
- Input: action ( float64)
- Output: String describing the meaning of that action
-
get_env_components
function:
- Input: ( None)
- Output: An
env_components
object containing all components and information about the environment's state.
-
get_main_player_state
function:
- Input:
env_components, list_agent, list_data, action = None
- Output:
win, state, new_env_components
- win: Does the player win or not?
- state: The next state received by the main player
- new_env_components: contains changes to the environment's components.
- Observing a match played by an Agent:
- Playing directly:
- Set Agent = "human"
You may be interested in FAQ.
Contributions are Welcome!
Contributions are Welcome!