API v2
Pgx has been updated from API **v1** to **v2** as of November 8, 2023 (release **`v2.0.0`**). As a result, the signature for `Env.step` has changed as follows:
- **v1**: `step(state: State, action: Array)`
- **v2**: `step(state: State, action: Array, key: Optional[PRNGKey] = None)`
Also, `pgx.experimental.auto_reset` are changed to specify `key` as the third argument.
**Purpose of the update:** In API v1, even in environments with stochastic state transitions, the state transitions were deterministic, determined by the `_rng_key` inside the `state`. This was intentional, with the aim of increasing reproducibility. However, when using planning algorithms in this environment, there is a risk that information about the underlying true randomness could "leak." To make it easier for users to conduct correct experiments, `Env.step` has been changed to explicitly specify a key.
**Impact of the update**: Since the `key` is optional, it is still possible to execute as `env.step(state, action)` like API v1 in deterministic environments like Go and chess, so there is no impact on these games. As of `v2.0.0`, **only 2048, backgammon, and MinAtar suite are affected by this change.**
What's Changed
* [Docs] Update 2048 version by sotetsuk in https://github.com/sotetsuk/pgx/pull/1036
* [Mahjong] Imprement `ryuukyoku` by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1038
* [Mahjong] Imprement `ron` by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1040
* Update leduc_holdem.md by bleu48 in https://github.com/sotetsuk/pgx/pull/1042
* [Mahjong] Imprement `tsumo` by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1041
* [Mahjong] Convert to `json` format by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1048
* [Backgammon] Add description to the playable_dice_count_vec by nissymori in https://github.com/sotetsuk/pgx/pull/1047
* [CI] Comment out some expensive tests as hotfix by sotetsuk in https://github.com/sotetsuk/pgx/pull/1052
* [Mahjong] Implement Menzen by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1045
* [Mahjong] Determine `current_player` after `pass` by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1053
* [Docs] Add license doc by sotetsuk in https://github.com/sotetsuk/pgx/pull/1057
* [Mahjong] Implement kandora by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1054
* [Docs] Update citation by sotetsuk in https://github.com/sotetsuk/pgx/pull/1063
* [Docs] Add arXiv link by sotetsuk in https://github.com/sotetsuk/pgx/pull/1064
* [Mahjong] Dora-score calculation by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1061
* [Test] Run CI with python3.10 only by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1066
* [Colab] Update chess check by sotetsuk in https://github.com/sotetsuk/pgx/pull/1068
* [Mahjong] Add `mahjong` to Env by OkanoShinri in https://github.com/sotetsuk/pgx/pull/1069
* [Example] Add wandb link by sotetsuk in https://github.com/sotetsuk/pgx/pull/1072
* [Example] Use default Gumbel AlphaZero hyperparameters by sotetsuk in https://github.com/sotetsuk/pgx/pull/1055
* [API] Use `int32` instead of `int8/16` by sotetsuk in https://github.com/sotetsuk/pgx/pull/1074
* [Test] Remove redundant random play tests by sotetsuk in https://github.com/sotetsuk/pgx/pull/1076
* [Chess] Fix wrong zobrist hash by sotetsuk in https://github.com/sotetsuk/pgx/pull/1078
* [Experimental] Fix `act_randomly` API by sotetsuk in https://github.com/sotetsuk/pgx/pull/1077
* [2048] Fix bug in legal action mask by sotetsuk in https://github.com/sotetsuk/pgx/pull/1049
* [Mahjong] Remove old files by sotetsuk in https://github.com/sotetsuk/pgx/pull/1075
* [Backgammon] Update document by sotetsuk in https://github.com/sotetsuk/pgx/pull/1046
* [dataclass] Fix dataclass mutable defaults error by carlosgmartin in https://github.com/sotetsuk/pgx/pull/1067
* [dataclass] Suppress C901 by sotetsuk in https://github.com/sotetsuk/pgx/pull/1080
* [Mahjong] Add type annotations by sotetsuk in https://github.com/sotetsuk/pgx/pull/1081
* Add Python 3.11 CI by sotetsuk in https://github.com/sotetsuk/pgx/pull/997
* [CI] Add Python 3.12 to CI by sotetsuk in https://github.com/sotetsuk/pgx/pull/1082
* v2 API by sotetsuk in https://github.com/sotetsuk/pgx/pull/1058
* [Docs] Fix API document by sotetsuk in https://github.com/sotetsuk/pgx/pull/1083
* [Dependency] Update JAX version by sotetsuk in https://github.com/sotetsuk/pgx/pull/1084
* [Typing] Add `types.py` by sotetsuk in https://github.com/sotetsuk/pgx/pull/1085
* [dataclass] Trace Flax dataclass updates by sotetsuk in https://github.com/sotetsuk/pgx/pull/1086
* [Tidy] Add `requirements.txt` by sotetsuk in https://github.com/sotetsuk/pgx/pull/1087
* [experimental] Adjust `auto_reset` to v2 API by sotetsuk in https://github.com/sotetsuk/pgx/pull/1088
* [Mahjong] Add assets in release by sotetsuk in https://github.com/sotetsuk/pgx/pull/1089
* [MinAtar] Fix minatar usage by sotetsuk in https://github.com/sotetsuk/pgx/pull/1090
* [Backgammon, 2048] Update versions by sotetsuk in https://github.com/sotetsuk/pgx/pull/1092
* [Docs] v2 API description by sotetsuk in https://github.com/sotetsuk/pgx/pull/1091
* [Chess] Update version by sotetsuk in https://github.com/sotetsuk/pgx/pull/1093
* [2048] Update documents by sotetsuk in https://github.com/sotetsuk/pgx/pull/1094
* [Mahjong] Unregister mahjong due to large file size by sotetsuk in https://github.com/sotetsuk/pgx/pull/1095
New Contributors
* bleu48 made their first contribution in https://github.com/sotetsuk/pgx/pull/1042
* carlosgmartin made their first contribution in https://github.com/sotetsuk/pgx/pull/1067
**Full Changelog**: https://github.com/sotetsuk/pgx/compare/v1.4.0...v2.0.0