Giter VIP home page Giter VIP logo

ping-pong-prodigy's Introduction

ping-pong-prodigy

2D Simulation of a Ping-Pong Match! This repo contains 3 Models each containing weights for a Reinforcement Learning agent trained on a different nubmer of games (5000, 6000, and 7000 games). The 7000 game model performs best and outperforms an AI Agent (hard-coded opponent, with a 5% error rate in its moves).

RLAgent.-.7000.Game.Model.mov

AI Agent

Hard Coded Agent that can forward simulate the action in order to calculate the best move. Theoretically this agent is perfect but an epsilon is introduced as noise which allows for mistakes.

RL Agent

An Agent trained using Actor-Critic methods (through Keras & Tensorflow). This agent is then trained on x amount of games in order to learn how to play the game against a much more capable opponent.

File Structure

\_accessories is for any utility/helper functions used across all files (e.g. save image, file IO, etc.)

Components contains class definitions for everything used in the game (e.g. players, board, etc.)

Extracontent are just file(s) that we made but are no longer used, or code snippets that are no longer used (but might be useful)

Logs stores positions of moving Components w.r.t. time for debugging purpose (and maybe visualization)

Visualizer Components contains class definitions + functions that visualizes a match/interaction

run_match.py is the "glue": it actually...runs...the match. Pulls from Components + \_accessories to do its thing.

visualizer.py is the code that generates visualizations and saves them to the file. Pulls from Visualizer Components and Logs (?)

ping-pong-prodigy's People

Contributors

shounakray avatar sirhauler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.