https://github.com/juliareinforcementlearning/commonrlinterface.jl
A minimal reinforcement learning environment interface with additional opt-in features.
https://github.com/juliareinforcementlearning/commonrlinterface.jl
Last synced: 3 months ago
JSON representation
A minimal reinforcement learning environment interface with additional opt-in features.
- Host: GitHub
- URL: https://github.com/juliareinforcementlearning/commonrlinterface.jl
- Owner: JuliaReinforcementLearning
- License: mit
- Created: 2020-06-15T17:50:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-07T20:06:51.000Z (about 2 years ago)
- Last Synced: 2025-03-14T19:40:39.578Z (3 months ago)
- Language: Julia
- Size: 301 KB
- Stars: 46
- Watchers: 8
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CommonRLInterface
[](https://JuliaReinforcementLearning.github.io/CommonRLInterface.jl/stable)
[](https://JuliaReinforcementLearning.github.io/CommonRLInterface.jl/dev)
[](https://github.com/JuliaReinforcementLearning/CommonRLInterface.jl/actions)
[](https://codecov.io/gh/JuliaReinforcementLearning/CommonRLInterface.jl)## Purpose
The CommonRLInterface package provides an interface for defining and interacting with [Reinforcement Learning Environments](http://incompleteideas.net/book/first/ebook/node28.html).
An important goal is to provide compatibility between different reinforcement learning (RL) environment interfaces - for example, an algorithm that uses `YourRLInterface` should be able to use an environment from `MyRLInterface` *without* depending on `MyRLInterface` as long as they both support `CommonRLInterface`.
By design, this package is only concerned with environments and *not* with policies or agents.
## Documentation
A few simple examples can be found in the examples directory. Detailed documentation can be found here: [](https://JuliaReinforcementLearning.github.io/CommonRLInterface.jl/stable). A brief overview is given below:
### Required Interface
`AbstractEnv` is a base type for all environments.
The interface has five required functions for all `AbstractEnv`s:
```julia
reset!(env) # returns nothing
actions(env) # returns the set of all possible actions for the environment
observe(env) # returns an observation
act!(env, a) # steps the environment forward and returns a reward
terminated(env) # returns true or false indicating whether the environment has finished
```### Optional Interface
Additional behavior for an environment can be specified with the optional interface outlined in the documentation. The `provided` function can be used to check whether optional behavior is provided by the environment.
### Multiplayer Environments
Optional functions allow implementation of both sequential and simultaneous games and multi-agent (PO)MDPs
### Wrappers
A wrapper system described in the documentation allows for easy modification of environments.
### Compatible Packages
These packages are compatible with CommonRLInterface:
- [ReinforcementLearning.jl](https://github.com/JuliaReinforcementLearning/ReinforcementLearning.jl)
- [POMDPs.jl](https://github.com/JuliaPOMDP/POMDPs.jl)
- [AlphaZero.jl](https://github.com/jonathan-laurent/AlphaZero.jl)