Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
/ pong Public

Multi-threaded Pong environment for testing different RL methods.

Notifications You must be signed in to change notification settings

davidb2/pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pong

This is a small game of Pong created in C++ with the intent of mimicking genuine interactions with the game environment. Because of this goal, the players of the game are run on different threads than the game itself. I recently watched a couple of Reinforcement Learning lectures by David Silver and wanted apply my knowledge by implementing some of the methods described in the lectures.

Prerequisites

Building and running

From the src/ directory, run:

CC=clang bazel build -c opt //main:main

to build an optimized build of the program.

Or, it is possible to build and run in one step:

CC=clang bazel run -c opt //main:main

Visualization

There is a small Python visualizer in src/tools/visualize.py which reads text from stdin and draws the corresponding state of the pong game. In the future, this is going to be replaced by a native C++ framework. For now, here is one example of running the visualizer to update at 60Hz:

CC=clang bazel run //main:main | ./tools/visualize.py \
    --speed 60 \
    --width 1000 \
    --height 1000

Contact

Email: davidb2@illinois.edu

About

Multi-threaded Pong environment for testing different RL methods.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published