-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Internal change] Decompose the game logic and API #1127
Comments
This was referenced Dec 27, 2023
Merged
This was referenced Jan 8, 2024
@sotetsuk How would this approach handle intermediate rewards? |
Sorry for the late response 🙏 It depends on the game. Note that this change is just a internal change and is supposed to give no effects to the current public API. |
sotetsuk
changed the title
Decompose the game logic and API
[Internal change] Decompose the game logic and API
Mar 15, 2024
This was referenced Sep 11, 2024
Merged
This was referenced Oct 30, 2024
Merged
This was referenced Dec 2, 2024
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe that the API of Pgx is sufficiently general, but the optimal API varies depending on the use case. I would like to separate the implementation functions of each game's logic and the API, to make it easier for users to adjust to their preferred API.
For example,
core.State
->core.EnvState, GameState
step(game_state, action) -> game_state
legal_action_maks(game_state)
is_terminal(game_state)
observe(game_state)
terminal_value(game_state)
?_src/games
#1131NamedTuple
instead ofdataclass
#1134_src/games
#1228games/connect_four.py
#1153Game
class #1289_player_order
#1291Game
class #1271games/tic_tac_toe.py
#1149The text was updated successfully, but these errors were encountered: