openai-gym is an OCaml binding for openai-gym open-source library. It is built as a client for the gym-http-api REST API.
To use the openai-gym package, you need to have a gym-http-api server runnung:
python3 gym_http_server.py
The documentation of the openai-gym package is available online or in the directory docs.
You can install openai-gym with the following command:
opam install openai-gym
Opam can also be used to compile and install from the source directory. For that you first need to pin the source directory. So, from this directory, do:
opam pin add openai-gym .
Then you can install using the command:
opam install openai-gym
If the source files are modified, the packages must be reinstalled with the command:
opam reinstall openai-gym
To build from source, you will need to install the dependencies
listed in the depends
field of the *.opam
files.
An easy way to get set up on most platforms is to use the OCaml package manager (https://opam.ocaml.org). Once opam is installed, you can just add the corresponding libraries:
opam install ocamlfind dune atdgen atd cohttp-lwt-unix ...
To compile, do:
make
To test, do:
make test
To generate the documentation, do:
make doc
In order to do a new release, we have to do the following steps.
- Search and update the version number:
grep -r -e '\d.\d\d-dev' .
- Make sure that the documentation is up to date:
make webdoc
-
Update the
CHANGES.md
file. -
Commit the changes.
-
Create a new release on the github interface: https://github.com/IBM/openai-gym-ocaml/releases
-
Create a new release of the opam packages.
- Create or update the fork of https://github.com/ocaml/opam-repository
git checkout master
git fetch --all
git merge --ff-only upstream/master
git push
- Create a new branch
git checkout -b openai-gym-X.XX
- Create the new packages from the old ones:
mkdir packages/openai-gym/openai-gym.X.XX
- Update the
opam
files:
cp OPENAI-GYM_OCAML_DIR/openai-gym.opam packages/openai-gym/openai-gym.X.XX/opam
- Update the
url
emacs packages/openai-gym/openai-gym.X.XX/opam
- Commit and push the changes
git push origin openai-gym-X.XX
- Create a pull request from the github interface: https://github.com/ocaml/opam-repository
- Once the pull request is accepted update the version number.
Contributions and bug reports are welcome! To contribute please follows the instructions given in the file CONTRIBUTING.md.