Coder Social home page Coder Social logo

benjaminbush / skeletor Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 336.91 MB

AI for Prosthetics NIPS 2018 Challenge. Repo created from helper: https://github.com/seungjaeryanlee/osim-rl-helper

License: MIT License

Jupyter Notebook 79.27% Python 20.73%
deep-reinforcement-learning nips-2018 dqn a3c ddpg ppo

skeletor's Introduction

Helper for NIPS 2018: AI for Prosthetics

This is a helper package designed to help you start the AI for Prosthetics challenge.

How to Start

The package contains run.py that can train, test or submit any agent in /helper/baselines or /agent directory. For example, to train TensorforcePPOAgent for 1000 steps, run

./run.py TensorforcePPOAgent --train 1000

After you trained the agent sufficiently, test the agent locally.

./run.py TensorforcePPOAgent

You can also test the agent with visualization with the -v/--visualize flag.

./run.py TensorforcePPOAgent -v

If you are satisfied with the result, you can submit the agent to CrowdAI with the -s/--submit flag.

./run.py RandomAgent -s

Note that you need to first add your API token to CONFIG.py to submit any agents. Also note that you can only submit 5 times each 24 hours (Issue #141).

Baseline Agents

Basic Agents

To understand the environment, consider running the most basic agents. There are two non-learning baseline agents: RandomAgent and FixedActionAgent. The RandomAgent chooses a random action at every timestep, and the FixedActionAgent chooses the same action at every timestep. Try running the agent locally to gain some intuition about the environment and the competition.

KerasDDPGAgent

The KerasDDPGAgent uses the Deep Deterministic Policy Gradient algorithm by Lillicrap et al. (2015). To use this agent, you need the keras-rl package.

TensorforcePPOAgent

The TensorforcePPOAgent uses the Proximal Policy Optimization algorithm by Schulman et al. (2017). To use this agent, you need the tensorforce package.

Create a Custom Agent

You can add custom agents to the /agent directory. The directory contains DoNothingAgent to serve as an example for custom agents. All agents in the /agents directory is imported in ./run.py, so you can use the same commands as above. If you would like to change the network architecture or hyperparameters of the keras-rl or tensorforce agents, you can also copy the baseline agent class to this directory and modify it.

from helper.templates import Agent


class DoNothingAgent(Agent):
    """
    An agent that chooses NOOP action at every timestep.
    """
    def __init__(self, observation_space, action_space):
        self.action = [0] * action_space.shape[0]

    def act(self, observation):
        return self.action

Where can I find more information?

I am writing a post every week about the competition in my blog.

Of course, you should always check the official page for updates.

If you have any questions about the competition, ask them in Gitter or CrowdAI discussion page!

FAQ

Where can I find my CrowdAI token?

Go to this link with [username] replaced with your actual CrowdAI username:

https://www.crowdai.org/participants/[username]

You should see the text API key: XXXX. That is your token!

I'm getting an 400 Server Error saying that I have no submission slots remaining.

According to Issue #141, you are limited to 5 submissions in a 24-hour window. It seems like the counter is incremented in the beginning when you call client.env_create(), so make sure your code is working before attempting to submit!

skeletor's People

Contributors

benjaminbush avatar seungjaeryanlee avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

castkitty

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.