This template repo was created following the Environment Generation guide from the Gymnasium Documentation. Created for and only tested on Ubuntu 20.04 & Windows 10 using Python 3.8.10.
A checklist for your RL project development with dynamic systems:
- Dynamics Class
- ODE Solver
- Observation Space(s)
- Action Space(s)
- Data logging
Implementing subenvironments inheriting from the BaseEnv allows easy prototyping.
-
__init__(self, render_mode, **kwargs)
: Specific environment configuration -
_get_obs()
: Calculate the observation -
_get_info()
: Log performance and info data -
_check_terminated()
: Evaluate episode termination criteria -
_calculate_reward()
: Implement the reward function -
reset(seed, options)
: Implement stochastic elements for environment reset after each episode -
step(action)
: Implement system dynamics, do environment changes -
render()
+_render_frame()
: Implement a renderer -
close()
: Implement resource cleanup, close windows, threads, etc.
- API compatible with gymnasium standard.
- Stable-Baselines3 integration.
- Multiprocessing with SubprocVecEnvs.
- Callback class for Tensorboard logging.
- Clone this repository
- Set up virtual environment using Python 3.8.10
- Install the package locally
Add any additional required packages to setup.py
.
Show instructions
git clone [email protected]:ThomasNLarsen/TTK29-RL-Lecture.git
Show instructions
This repository was developed using Python 3.8.10.Support for other versions is not guaranteed.
python3 -m venv venv
source venv/bin/activate
Show instructions
python3 -m pip install -e .