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