Skip to main content

UAV Flight Simulator Gymnasium Environments for Reinforcement Learning Research.

Project description

Ruff total downloads weekly downloads

PyFlyt - UAV Flight Simulator for Reinforcement Learning Research

Comes with Gymnasium and PettingZoo environments built in!

View the documentation here!

This is a library for testing reinforcement learning algorithms on UAVs. This repo is still under development. We are also actively looking for users and developers, if this sounds like you, don't hesitate to get in touch!

Installation

pip3 install wheel numpy
pip3 install pyflyt

numpy and wheel must be installed prior to pyflyt such that pybullet is built with numpy support.

Usage

Usage is similar to any other Gymnasium and PettingZoo environment:

Gymnasium

import gymnasium
import PyFlyt.gym_envs # noqa

env = gymnasium.make("PyFlyt/QuadX-Hover-v2", render_mode="human")
obs = env.reset()

termination = False
truncation = False

while not termination or truncation:
    observation, reward, termination, truncation, info = env.step(env.action_space.sample())

View the official documentation for gymnasium environments here.

PettingZoo

from PyFlyt.pz_envs import MAFixedwingDogfightEnv

env = MAFixedwingDogfightEnv(render_mode="human")
observations, infos = env.reset()

while env.agents:
    # this is where you would insert your policy
    actions = {agent: env.action_space(agent).sample() for agent in env.agents}

    observations, rewards, terminations, truncations, infos = env.step(actions)
env.close()

View the official documentation for pettingzoo environments here.

Citation

If you use our work in your research and would like to cite it, please use the following bibtex entry:

@article{tai2023pyflyt,
  title={PyFlyt--UAV Simulation Environments for Reinforcement Learning Research},
  author={Tai, Jun Jet and Wong, Jim and Innocente, Mauro and Horri, Nadjim and Brusey, James and Phang, Swee King},
  journal={arXiv preprint arXiv:2304.01305},
  year={2023}
}

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

pyflyt-0.25.0.tar.gz (177.5 kB view details)

Uploaded Source

Built Distribution

PyFlyt-0.25.0-py3-none-any.whl (211.3 kB view details)

Uploaded Python 3

File details

Details for the file pyflyt-0.25.0.tar.gz.

File metadata

  • Download URL: pyflyt-0.25.0.tar.gz
  • Upload date:
  • Size: 177.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyflyt-0.25.0.tar.gz
Algorithm Hash digest
SHA256 68f8b3a032ce4c234bec41b16e5c287c0b1d87357d602ee45d8a626c1c3c199e
MD5 8021cf0479434f3c27126f112996a60b
BLAKE2b-256 2ce56c480f048c1ab7b410586ebc3be41b8d4f9a22946cb41a7d03aa9b186f3b

See more details on using hashes here.

File details

Details for the file PyFlyt-0.25.0-py3-none-any.whl.

File metadata

  • Download URL: PyFlyt-0.25.0-py3-none-any.whl
  • Upload date:
  • Size: 211.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for PyFlyt-0.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b37dc24cc9d0ce4d40b5d2898e82f7914092d7f9dff34e11b4f469dd717eea4f
MD5 93d02adefc7dbd1df77f43e3f54bbdf5
BLAKE2b-256 2a0bcc30197df5d7ddf5a5a45854219c7c554f84dd72a01e4c2ab29904827f2f

See more details on using hashes here.

Supported by

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