Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeffa233/rlgym-sim-rs

A Rust version of RLGym for RocketSim.
https://github.com/jeffa233/rlgym-sim-rs

gym gym-environment reinforcement-learning rlgym rocket rust

Last synced: 2 months ago
JSON representation

A Rust version of RLGym for RocketSim.

Awesome Lists containing this project

README

        

[![Windows build & test](https://github.com/JeffA233/rlgym-sim-rs/actions/workflows/rust_compile_win.yml/badge.svg)](https://github.com/JeffA233/rlgym-sim-rs/actions/workflows/rust_compile_win.yml) [![Linux build & test](https://github.com/JeffA233/rlgym-sim-rs/actions/workflows/rust_compile_linux.yml/badge.svg)](https://github.com/JeffA233/rlgym-sim-rs/actions/workflows/rust_compile_linux.yml) [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jeffa233)
# rlgym-sim-rs
Initial release of Rust RLGym for sim. More documentation soon.

Originally a port of [rocket-league-gym-sim](https://github.com/AechPro/rocket-league-gym-sim/tree/main) (which is a version of [RLGym](https://www.rlgym.org)). It no longer has exactly the same functionality but the goal is moving from one to the other should not be difficult.

## Differences between RLGym-sim and rlgym-sim-rs
Observation functions must be provided as a Vec (`Vec>`) where the length must be equal to the number of agents that will be in the match. The current functionality is that observation builders are per-agent and hence independent of each other.

Terminal conditions must return only a singular boolean when called.

Info does not return the state for now. Unfortunately mixed-type HashMaps are not possible by default with PyO3 though this may be adapted in the future. This crate is adapted a bit more for the ease of use of bindings via PyO3, though it can be used entirely from Rust as well, so this has been left as-is for now.

## Docs
See the docs [here](https://docs.rs/rlgym_sim_rs/latest/rlgym_sim_rs/).

## Installation
Installed via cargo: `cargo add rlgym-sim-rs`

While RocketSim will automatically compile thanks to Virx's [bindings](https://github.com/VirxEC/rocketsim-rs), you must still use your own [collision meshes](https://github.com/ZealanL/RocketSim#installation).

## Usage
See `examples/basic_examples.rs` for how to create the gym. Also see `tests/tester.rs` and `tests/team_change_test.rs` as more extensive examples. You can also look at `examples/lib.rs` for an example of how to create Python bindings that you can use.