https://github.com/mrrobb/gym-rs
OpenAI Gym bindings for Rust
https://github.com/mrrobb/gym-rs
Last synced: 12 months ago
JSON representation
OpenAI Gym bindings for Rust
- Host: GitHub
- URL: https://github.com/mrrobb/gym-rs
- Owner: MrRobb
- License: mit
- Created: 2019-08-20T23:26:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T19:03:18.000Z (over 3 years ago)
- Last Synced: 2024-08-09T08:07:44.675Z (almost 2 years ago)
- Language: Rust
- Size: 134 KB
- Stars: 61
- Watchers: 5
- Forks: 4
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gym-rs
[](https://crates.io/crates/gym)
[](https://docs.rs/gym/latest/gym)
[](https://codecov.io/gh/MrRobb/gym-rs)
[](https://github.com/MrRobb/gym-rs/blob/master/LICENSE)
OpenAI gym binding for Rust.
> Actively maintained! If you have any problem just [create an issue](https://github.com/MrRobb/gym-rs/issues/new).
### Install
Just install the requierements layed out in the [requirements.txt](https://github.com/MrRobb/gym-rs/blob/master/requirements.txt).
> If you don't have python installed, go [here](https://realpython.com/installing-python/)
```sh
curl "https://raw.githubusercontent.com/MrRobb/gym-rs/master/requirements.txt" > requirements.txt
pip3 install -r requirements.txt
```
### Usage
Once everything is installed, just add this crate to your your Rust project.
```toml
# Cargo.toml
[dependencies]
gym = "*" # Update * with the latest version
```
### Example
Once you have installed correctly the library, the only thing left is to test if its working ok. To do so, you just have to execute the following commands:
> If you don't have Rust installed go [here](https://www.rust-lang.org/tools/install)
```sh script
git clone https://github.com/MrRobb/gym-rs.git
cd gym-rs
pip3 install -r requirements.txt
cargo run --example basic
```
### Troubleshooting
In Ubuntu 20.04, it is possible that you need to install `swig`. To do that, execute:
```sh
sudo apt-get install swig
```
The example can fail with virtualenv. It's more of a general problem of the cpython crate rather than this one, you can resolve it by setting the PYTHONHOME env var to the module path of the venv, e.g.:
```sh
PYTHONPATH=~/venv-py37/lib/python3.7/site-packages cargo run --example basic
```
## Donation (BTC)
BTC address: 3KRM66geiaXWzqs5hRb35dGiQEQAa6JTYU