Cartpole agents and environments for real-world RL.
Running Experiments
go build cmd/experiment/main.go This provides a slight speedup over using go run in the next step (about 3 seconds per run).
time parallel './main -config "config/esarsa.json" -run' ::: {1..60} This runs 60 experiments in parallel. They'll all use the default sweep=0, but a different run number. Note this uses GNU Parallel.
Change config/esarsa.json to a different config as necessary. (As much as possible it's good to run experiments based on versions of a config that have been committed. Then we have a history and can re-run previous versions.)
Plotting with Jupyter
Make sure you're in the virtualenv: source env/bin/activate.
If you haven't yet done so, install Jupyter from the pip file: pip install -r requirements.txt.
Launch Jupyter: jupyter notebook --notebook-dir="plot". (The argument isn't necessary. It just opens the plot folder directly.)
Development Workflow
Execute source env/bin/activate (or .\env\Scripts\activate on Windows) to enter the virtual environment.
Change into the Experiments directory: cd python/Experiments/. The control script currently only works from that directory. Then run the code with python control.py. Parameters can be changed by providing a different parameters JSON file.
If you need a new package, install it in the virtual environment with python -m pip install PACKAGE_NAME and add it to the requirements with pip freeze > requirements.txt.
When you're done working on the project, deactivate exits the virtual environment.
Install Instructions
Run python3 -m venv env (or py -m venv env on Windows). This will create the virtual environment. This only needs to be done once.
Execute source env/bin/activate (or .\env\Scripts\activate on Windows) to enter the virtual environment.
Execute pip install --upgrade pip to upgrade pip.
Execute pip install -r requirements.txt to install required packages.
Execute deactivate to exit the virtual environment.
Protocol Buffers
This is only necessary if you need to modify the protocol buffer definitions (which is unlikely).