{"id":19637557,"url":"https://github.com/najlae01/pong-rl-agent","last_synced_at":"2026-05-12T08:41:07.658Z","repository":{"id":153356124,"uuid":"628839378","full_name":"najlae01/pong-RL-agent","owner":"najlae01","description":"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.","archived":false,"fork":false,"pushed_at":"2023-04-17T16:36:00.000Z","size":1186,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T17:05:35.728Z","etag":null,"topics":["agent","college-project","machine-learning","qlearning","rl"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/najlae01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-17T04:59:32.000Z","updated_at":"2024-03-31T05:23:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2d1ba91-e403-4237-be85-6819a4153579","html_url":"https://github.com/najlae01/pong-RL-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fpong-RL-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fpong-RL-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fpong-RL-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fpong-RL-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/najlae01","download_url":"https://codeload.github.com/najlae01/pong-RL-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941541,"owners_count":19882063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","college-project","machine-learning","qlearning","rl"],"created_at":"2024-11-11T12:35:17.698Z","updated_at":"2026-05-12T08:41:02.619Z","avatar_url":"https://github.com/najlae01.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pong Game with Q-learning Agent\nThis 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.\n\n## Installation\nTo install the required libraries, run the following command:\n\n`pip install pygame`\n\n`pip install matplotlib`\n\n`pip install numpy`\n\n## Usage\nTo start the game, run the following command:\n\n`python main.py`\n\n## Game Modes\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/modes.png\" /\u003e\n\n### Agent RL vs Agent AI\nIn 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.\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/RLvsAI.png\" /\u003e\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/RLvsAI_plot.png\" /\u003e\n\n### Agent RL vs Human\nIn this mode, the Q-learning agent plays against a human player. The agent learns from its actions and tries to beat the human player.\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/RLvsHUMAN.png\" /\u003e\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/RLvsHUMAN_plot.png\" /\u003e\n\n### Agent RL vs Agent RL\nIn this mode, two Q-learning agents play against each other. Both agents learn from their actions and try to beat each other.\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/RLvsRL.png\" /\u003e\n\n\u003cimg align=\"center\" alt=\"Modes\" width=\"600px\" src=\"readme_images/RLvsRL_plot.png\" /\u003e\n\n## Conclusion\nIn 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.\n\nEnjoy playing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnajlae01%2Fpong-rl-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnajlae01%2Fpong-rl-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnajlae01%2Fpong-rl-agent/lists"}