项目作者: dawsonbooth

项目描述 :
A clone of the classic game of Pong with artificially intelligent opponents
高级语言: Python
项目地址: git://github.com/dawsonbooth/pong-ai.git
创建时间: 2018-08-14T19:51:55Z
项目社区:https://github.com/dawsonbooth/pong-ai

开源协议:MIT License

下载


pong-ai

Description

This program is a clone for the classic Pong game. With a CLI activation, the user has the option of playing against another user, a specialized AI agent or a basic computer player that follows the ball. Currently, the only agent is a Q-learning AI. Further plans include additional agents that use other various decision-making structures, such as a neural network or a Markov decision process.

Installation

With Git, Python, and Poetry installed, simply run the following command to get the project on your machine.

  1. git clone https://github.com/dawsonbooth/pong-ai

The game may additionally run slowly on macOS as opposed to a Windows PC. Solutions to this are not well documented, and given the scope of the project a PC may be better suited for the program anyway.

Usage

This is a command-line program. The main file, pong.py can be executed as follows:

  1. python pong.py [-h] [-a1 [{player,basic,q-learning}]] [-a2 [{player,basic,q-learning}]]

Optional arguments:

  1. -h, --help Show the help message and exit
  2. -a1, --agent1 {player,basic,q-learning}
  3. Type of agent for the left paddle
  4. -a2, --agent2 {player,basic,q-learning}
  5. Type of agent for the right paddle

License

This software is released under the terms of MIT license.