Giter Site home page Giter Site logo

policy-based-rl-with-catch's Introduction

Policy-based-RL-with-Catch

Overview

This repository contains a reinforcement learning algorithm training and playing on an environment of Customizable Catch Environment. The environment is an extension of the Catch environment from the Behavioural Suite, where the objective is to control a paddle to catch falling balls.

Environment Description

  • State Space: The size of the environment grid can be adjusted with 'rows' and 'columns' arguments. The observation space can be a vector of xy-locations of the paddle and the lowest ball or a two-channel pixel array with the paddle location in the first channel and all balls in the second.
  • Action Space: The paddle can move left, right, or stay idle each timestep.
  • Reward Function:
    • +1 reward for catching a ball at the bottom row.
    • -1 penalty for missing a ball at the bottom row.
    • 0 reward in all other situations.
  • Dynamics Function: Balls drop randomly from the top of the screen. The dropping speed can be adjusted.
  • Termination: The task ends when a set number of total steps (max_steps) is reached or a certain number of total balls (max_misses) is missed.

Initialization Parameters

  • rows: Number of rows in the environment grid.
  • columns: Number of columns in the environment grid.
  • speed: Speed of dropping new balls.
  • max_steps: Maximum steps after which the environment terminates.
  • max_misses: Number of missed balls after which the environment terminates.

Running the Code

To run the environment, use the following command-line arguments:

  • --tune: For tuning hyperparameters like 'entro_param', 'gamma', 'lr', 'hidden_size'.
  • --optimal: To plot the optimal training progress.
  • --env: To execute optimal environment variation based on arguments.

Example:

python Main.py --tune gamma

Dependencies

  • Python 3.x
  • numpy
  • matplotlib
  • gym
  • torch
  • other dependencies as required by the above

policy-based-rl-with-catch's People

Contributors

rylinnm avatar

Watchers

 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.