From 3ab42297892d01cc59a064a3779df7afa352a4b7 Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Mon, 23 Oct 2023 22:55:38 +0200 Subject: [PATCH 1/3] Update README.md [ci skip] --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d83aac..00a1f84 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,20 @@ *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 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-simple-v0` is a simplified environment with fixed-size observations - `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 From dd7c05a6f86f86c5deebf87f9d53a684353c19eb Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Mon, 23 Oct 2023 23:10:22 +0200 Subject: [PATCH 2/3] Update README.md [ci skip] --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 00a1f84..b883524 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,21 @@ Note that during the first run, SuperTuxKart assets are downloaded in the cache ## 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-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 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 From d28f1d0a9fbbaae500d9a25b50b4be4d18d87a00 Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Mon, 23 Oct 2023 23:11:21 +0200 Subject: [PATCH 3/3] Update README.md [ci skip] --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b883524..7c73a4f 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,12 @@ After importing `pystk2_gymnasium`, the following environments are available: - `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 observations for paths (controlled by `state_paths`, default 5), items (`state_items`, default 5), karts (`state_karts`, default 5) +- `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