OpenAI in rust
This crate allows you to create an environment in OpenAI where to train your agents.
Setup
To use this crate you will need to have a few things already installed on your machine including python 3 as well as OpenAI gym and the environments you need. You can find out how to install OpenAI in the README of their repository.
Once you've installed all of the dependencies you'll need to start a display server on port zero like this:
xvfb-run -s "-screen 0 1080x1920x24" bash
export DISPLAY=:0
Now that you've executed this command you can run your program and a window should pop up and you'll see your agent training in the environment that you have chosen.
Code example
Cargo.toml
[]
= "0.1.1"
= "0.3"
main.rs
extern crate open_ai;
extern crate rand;
use Rng;
use ;