Gymnasium wrapper for PySTK2
Project description
PySuperTuxKart gymnasium wrapper
warning: pystk2-gymnasium is in alpha stage - the environments might change abruptly!
Environments
After importing pystk2_gymnasium, the following environments are available:
supertuxkart-v0is the main environment containing complete observationssupertuxkart-simple-v0is a simplified environment with fixed size observationssupertuxkart-flattened-v0has observation and action spaces simplified at the maximum (onlydiscreteandcontinuouskeys)supertuxkart-flattened-discrete-v0is like the previous one, but with fully discretized actions
Example
import gymnasium as gym
import pystk2_gymnasium
# Use a a flattened version of the observation and action spaces
# In both case, this corresponds to a dictionary with two keys:
# - `continuous` is a vector corresponding to the continuous observations
# - `discrete` is a vector (of integers) corresponding to discrete observations
env = gym.make("supertuxkart-flattened-v0", render_mode="human", use_ai=False)
ix = 0
done = False
state, *_ = env.reset()
while not done:
ix += 1
action = env.action_space.sample()
state, reward, terminated, truncated, _ = env.step(action)
done = truncated or terminated
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pystk2_gymnasium-0.1.0.tar.gz
(19.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pystk2_gymnasium-0.1.0.tar.gz.
File metadata
- Download URL: pystk2_gymnasium-0.1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec4f13498eb947e2603aa10981ff4c9d4770ae23f2bfaf5d92fa9999fb80f128
|
|
| MD5 |
48483807d7fe1e23c39e165aa417bdc6
|
|
| BLAKE2b-256 |
7be86ec86552a65f36d34a8842acd93e48162585979854236332ae032390185a
|
File details
Details for the file pystk2_gymnasium-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pystk2_gymnasium-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b8589deac7d98eb9aa2461286de4cd18bf2410dae5fd06625c206370876edbe
|
|
| MD5 |
2a4629376f5cb224a3353a32c2197d75
|
|
| BLAKE2b-256 |
6c43758528393bf94ee8a5acf8f491fd15be50e2fe545b81fc71669f597a0f0a
|