| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository contains a C++ implementation of the Q-Learning algorithm applied to a simple grid world problem. The grid world consists of states represented by rows and actions represented by columns. The goal is to reach a specific state denoted by F from any staring point.
Here is the representation of the environment:
Here is the Reward Table:
The q_learning.cpp file contains the main implementation of the Q-Learning algorithm. Here's an overview of the key components:
You can modify the parameters such as the number of episodes (episode) and the learning rate (y) in the main function to experiment with different settings.
// The # of trials for computer to learn, usually the # is big
int episode = 1000;
// Constant for learning rate
double y = 0.8;Here is the Q matrix after 1000 episodes:
| Back | FazBrowse Home | New Git URL |