Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omaraflak/reinforcement-learning-cpp
Reinforcement Learning algorithm from scratch in C++.
https://github.com/omaraflak/reinforcement-learning-cpp
cpp from-scratch neural-network qlearning reinforcement-learning
Last synced: 2 months ago
JSON representation
Reinforcement Learning algorithm from scratch in C++.
- Host: GitHub
- URL: https://github.com/omaraflak/reinforcement-learning-cpp
- Owner: omaraflak
- Created: 2018-07-19T11:18:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T11:29:00.000Z (over 6 years ago)
- Last Synced: 2024-03-18T00:35:43.616Z (10 months ago)
- Topics: cpp, from-scratch, neural-network, qlearning, reinforcement-learning
- Language: C++
- Size: 6.84 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reinforcement Learning
This code demonstrates how to make a reinforcement learning algorithm from scratch in C++.
# Download, Compile & Run
```
git clone https://github.com/OmarAflak/Reinforcement-Learning-CPP
cd Reinforcement-Learning-CPP
make
./main
```
# EnvironmentThe agent has to go from point A to point B.
A..........B
He has two available commands : `left` and `righ`.The reward policy is the following :
* if (agent reaches point **B**) { reward=1 }
* else { reward=0 }# Network
Although the problem is very simple, I used a Neural Network to approach the **Q(s,a)** function.
The network takes the current state of the game as an input, and it outputs the **Q-value** for each possible action.