Lets a game define how its state becomes an observation as a plain Python function (module:attr), used identically by GameEnvironment (training) and TrainedPolicy (inference) instead of two independently maintained encoding paths. Removes the egocentric/egocentric_player/ egocentric_radius flags — cropping is now something an observation_function does itself by calling egocentric_board(), and extras_size is discovered from one sampled observation instead of being configured via observe_state_sizes.
31 lines
587 B
ReStructuredText
31 lines
587 B
ReStructuredText
API Reference
|
|
=============
|
|
|
|
All classes below are importable directly from ``retro_gamer``.
|
|
|
|
Game description
|
|
----------------
|
|
|
|
.. autoclass:: retro_gamer.GameMetadata
|
|
:members: from_pyproject, from_dict, validate, resolve_observation_function
|
|
|
|
Training
|
|
--------
|
|
|
|
.. autoclass:: retro_gamer.DQNTrainer
|
|
:members: train, load_checkpoint
|
|
|
|
Environment
|
|
-----------
|
|
|
|
.. autoclass:: retro_gamer.GameEnvironment
|
|
:members: reset, step
|
|
|
|
Using a trained model
|
|
---------------------
|
|
|
|
.. autoclass:: retro_gamer.TrainedPolicy
|
|
:members: get_action
|
|
|
|
.. autoclass:: retro_gamer.PolicyInput
|