Skip to main content

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-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 discrete and continuous keys)
  • supertuxkart-flattened-discrete-v0 is 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pystk2_gymnasium-0.1.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

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

Hashes for pystk2_gymnasium-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec4f13498eb947e2603aa10981ff4c9d4770ae23f2bfaf5d92fa9999fb80f128
MD5 48483807d7fe1e23c39e165aa417bdc6
BLAKE2b-256 7be86ec86552a65f36d34a8842acd93e48162585979854236332ae032390185a

See more details on using hashes here.

File details

Details for the file pystk2_gymnasium-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pystk2_gymnasium-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b8589deac7d98eb9aa2461286de4cd18bf2410dae5fd06625c206370876edbe
MD5 2a4629376f5cb224a3353a32c2197d75
BLAKE2b-256 6c43758528393bf94ee8a5acf8f491fd15be50e2fe545b81fc71669f597a0f0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page