https://github.com/odegnome/rlexample
A simple RL example implemented using python
https://github.com/odegnome/rlexample
Last synced: 9 months ago
JSON representation
A simple RL example implemented using python
- Host: GitHub
- URL: https://github.com/odegnome/rlexample
- Owner: odegnome
- Created: 2021-12-15T11:03:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-19T14:59:12.000Z (almost 4 years ago)
- Last Synced: 2025-04-01T07:59:03.515Z (over 1 year ago)
- Language: Python
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RLexample
This is a simple example of reinforcement learning. Hope this encourages you
to build something interesting yourself.
Change from iter2.
Change from iter1.
## Environment

The environment is a 1x7 grid. The agent starts at **S**, with each
episode ending at **G** and the
available actions are **left** or **right**. There are three different
rewards systems used. Each `.py` file implements different
reward.
## Test yourself!
All the available code is in SliderReward[1-3].py files. Each file
contains complete and independant code.
**Note:** *numpy* should be installed.
To run any of the files:
```shell
python3 SliderReward[1-3].py
```
Here `` is the amount of iterations for training
the agent. If no argument is provided, then the default is 50.
**Example**
```shell
$ python3 SliderReward1.py
$ python3 SliderReward1.py 100
```