Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jihoonerd/rl-maze
Simple maze solver by reinforcement learning
https://github.com/jihoonerd/rl-maze
maze policy-gradient q-learning reinforce reinforcement-learning sarsa tutorial
Last synced: 2 months ago
JSON representation
Simple maze solver by reinforcement learning
- Host: GitHub
- URL: https://github.com/jihoonerd/rl-maze
- Owner: jihoonerd
- Created: 2019-05-19T03:29:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-27T15:28:38.000Z (9 months ago)
- Last Synced: 2024-05-22T00:05:08.653Z (8 months ago)
- Topics: maze, policy-gradient, q-learning, reinforce, reinforcement-learning, sarsa, tutorial
- Language: Python
- Homepage:
- Size: 1.54 MB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rl-maze
## Description
Repository for learning basic concept of reinforcement learning.
This provides following approaches to solve maze.
* Random walk
* Policy gradient (REINFORCE)
* Sarsa
* Q-learning## How to use
* Instantiate Q-learning agent and train:
```python
agent = Agent('q') # should be one of ['randwalk', 'pg', 'sarsa', 'q']
agent.train()
```* Draw agent's move by using `agent.state_history`:
```python
maze = Maze()
maze.save_animation('maze.gif', agent.state_history) # it requires imagemagick
```