Skip to content

This code repository contains the implementation of Q-Learning agent for Mountain Car game. It is part of the lab exercise for the COSC-604 Artificial Intelligence course for masters students at Khalifa University.

Notifications You must be signed in to change notification settings

MohamedNagyMostafa/MountainCar-discretization-reinforcement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

This repository provides a q-learning implementation for Mountain Car problem using OpenAI Gym.

MountainCar Discretization Reinforcement: AI Course Lab 🤖

This code repository contains the implementation of Q-Learning agent for Mountain Car game. It is part of the lab exercise for the COSC-604 Artificial Intelligence course for masters students at Khalifa University.

📁 Functions & Classes

QLearningAgent: Contains the QLearningAgent class for Q-Learning algorithm.

run: To run the training of the agent.

🎮 Game

The agent is trained to play Mountain Car game which is a classic reinforcement learning problem where the agent has to learn to drive a car up a hill.

🚀 Getting Started

To get started, clone the repository and run the main.py file.

🧠 Algorithm

The Q-Learning algorithm is used to train the agent. The algorithm uses a Q-table to store the values of state-action pairs.

🎯 Objective

The objective of the agent is to drive the car up the hill and reach the goal position in the minimum number of steps possible.

🏋️‍♀️ Training

The agent is trained for 10,000 episodes with a decay in the exploration rate after each episode.

👀 Visualization

Visualization of the game can be enabled by setting the visual parameter to True in the run function in the main.py file.

🤖 Future Work

The code can be extended to implement other reinforcement learning algorithms such as SARSA and DQN.

About

This code repository contains the implementation of Q-Learning agent for Mountain Car game. It is part of the lab exercise for the COSC-604 Artificial Intelligence course for masters students at Khalifa University.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages