diff --git a/README.md b/README.md index 657f2dc..dabc4eb 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,36 @@ *warning*: pystk2-gymnasium is in alpha stage - the environments might change abruptly! +## Install + +The PySuperKart2 gymnasium wrapper is a Python package, so installing is fairly easy + +`pip install pystk2-gymnasium` + +Note that during the first run, SuperTuxKart assets are downloaded in the cache directory. + ## Environments +*Warning* only one SuperTuxKart environment can be created for now. Moreover, no graphics information +is available for now. + After importing `pystk2_gymnasium`, the following environments are available: -- `supertuxkart-v0` is the main environment containing complete observations -- `supertuxkart-simple-v0` is a simplified environment with fixed size observations -- `supertuxkart-flattened-v0` has observation and action spaces simplified at the maximum (only `obs_discrete` and `obs_continuous` keys) +- `supertuxkart-v0` is the main environment containing complete observations, with the following options: + - `render_mode` can be None or `human` + - `track` defines the SuperTuxKart track to use (None for random). The full list can be found in `STKRaceEnv.TRACKS` after initialization with `initialize.initialize(with_graphics: bool)` has been called. + - `num_kart` defines the number of karts on the track (3 by default) + - `rank_start` defines the starting position (None for random, which is the default) + - `use_ai` flag (False by default) to ignore actions and use a SuperTuxKart bot + - `max_paths` the maximum number of the (nearest) paths (a track is made of paths) to consider in the observation state + - `laps` is the number of laps (1 by default) + - `difficulty` is the difficulty of the other bots (0 to 2, default to 2) +- `supertuxkart-simple-v0` is a simplified environment with fixed number of observations for paths (controlled by `state_paths`, default 5), items (`state_items`, default 5), karts (`state_karts`, default 5) +- `supertuxkart-flattened-v0` has observation and action spaces simplified at the maximum (only `discrete` and `continuous` keys) - `supertuxkart-flattened-discrete-v0` is like the previous one, but with fully discretized actions +The reward is the distance traveled. + ## Example ```py3