sotetsuk / pgx

♟️ Vectorized RL game environments in JAX
http://sotets.uk/pgx/
Apache License 2.0
387 stars 25 forks source link

[Internal change] Decompose the game logic and API #1127

Open sotetsuk opened 8 months ago

sotetsuk commented 8 months ago

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,


carlosgmartin commented 5 months ago

@sotetsuk How would this approach handle intermediate rewards?

sotetsuk commented 5 months ago

Sorry for the late response 🙏 It depends on the game. In the case of Go, it looks like https://github.com/sotetsuk/pgx/blob/main/pgx/_src/games/go.py#L129

Note that this change is just a internal change and is supposed to give no effects to the current public API.