learnwell
Easy reinforcement learning framework, allowing you to quickly create Environments and test them.
Aims to be simple
Minimal external dependencies
Currently only Q-Learning is implemented
The state of this project is in alpha. Use at your own risk.
Getting started
See the taxi example and walk through the comments
You can also run the examples for hike
, taxi
, mouse
with:
cargo run --release --example taxi
Imports:
use ;
We then ask the Runner
to run the agent for x
number of epochs
Allows 2 modes:
Runner::run
for normal operationRunner::run_with_display
to create a window and display image which gets updated as it runs
For example:
;
run
or
;
run_with_display
We need:
- Environment - this is the game/scenario we want to learn
- Agent - this is what interacts with the environment
We implement a few things to run
Environment
State
Struct - this is what we base our actions onAction
(normally enum) - these are the actions we perform- Environment Struct that implements the
Environment<S,A>
trait and depends on theState
andAction
. The Environment struct should hold the state, because we will refer to it later
Agent
- the Agent algorithm (e.g. QLearning),
Implementation:
Note we derive Hash, Eq, PartialEq and Clone for both State
and Action
State
Action
Environment
Status
- implement Qlearning
- implement deep qlearning
- move optional functionality to features (e.g. display, fxhasher)