Coder Social home page Coder Social logo

colurw / snake_ppo Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 45 KB

Nokia's classic 'snake' game, written in NumPy and converted into a Gymnasium Environment() for use with gradient-based reinforcement learning algorithms

License: MIT License

Python 100.00%
numpy gymnasium-environment pygame stable-baselines3 proximal-policy-optimization

snake_ppo's Introduction

snake_PPO

A work in progess....

Proximal Policy Optimisation is a state-of-the-art reinforcement learning algorithm designed to allow gradient learning methods to be applied to situations where an 'intelligent' agent makes autonomous decisions in an environment. This permits a back-propogation of the environment's gradients through the network (effectively) after each decision.

This (theoretically) should speed up the learning process when compared to gradient-free methods, such as flight_sim_GNN, which suffer through a randomised exploration of the environment's reward manifold.

snake_cli.py

Is an ascii version of the classic Nokia mobile game, playable in the command line using keyboard controls, that captures screen and keypress datastreams. Intended for a supervised learning project, that was abandoned after realising that I didn't want to spend hours playing it to create the data. Hence...

snake_pyg_num.py

Deprecates the data capture, and transforms the output into a RGB image array, and uses PyGame to generate a more attractive display window.

snake_gym.py

Refactors the game into a Gymnasium Environment() to simplify integration with reinforcement learning algorithms.

PPO.py

Initialises a convolutional neural network that learns how to use the control inputs, based on its interpretation the RGB screen array.

To Do

  • Customise CNN policy to suit smaller screen.
  • Integrate with 'Weights And Biases' or Tensorboard to aid with determining proper hyperparameters
  • Capture PyGame screens to show learning progress over many epochs.

snake_ppo's People

Contributors

colurw avatar

Watchers

Kostas Georgiou avatar  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.