An open API service indexing awesome lists of open source software.

https://github.com/najlae01/pong-rl-agent

A classic Pong game with an AI agent powered by reinforcement learning (Q-learning) algorithm. The game is built with Python and Pygame, and the AI agent uses a Q-learning algorithm to learn how to play the game.
https://github.com/najlae01/pong-rl-agent

agent college-project machine-learning qlearning rl

Last synced: 8 months ago
JSON representation

A classic Pong game with an AI agent powered by reinforcement learning (Q-learning) algorithm. The game is built with Python and Pygame, and the AI agent uses a Q-learning algorithm to learn how to play the game.

Awesome Lists containing this project

README

          

# Pong Game with Q-learning Agent
This is a Python implementation of the classic Pong game, featuring a Q-learning agent that learns to play against an AI player or a human player.

## Installation
To install the required libraries, run the following command:

`pip install pygame`

`pip install matplotlib`

`pip install numpy`

## Usage
To start the game, run the following command:

`python main.py`

## Game Modes

Modes

### Agent RL vs Agent AI
In this mode, the Q-learning agent plays against an AI player. The agent uses the Q-learning algorithm to learn from its actions and improve its performance over time.

Modes

Modes

### Agent RL vs Human
In this mode, the Q-learning agent plays against a human player. The agent learns from its actions and tries to beat the human player.

Modes

Modes

### Agent RL vs Agent RL
In this mode, two Q-learning agents play against each other. Both agents learn from their actions and try to beat each other.

Modes

Modes

## Conclusion
In conclusion, this Pong game with Q-learning agent is a fun and interactive way to learn about reinforcement learning and the Q-learning algorithm. The game allows you to play against an AI player or a human player, or even watch two agents play against each other. The agent's performance can be analyzed using the reward plot, which shows how the agent improves over time.

Enjoy playing!