Coder Social home page Coder Social logo

evo-learning's Introduction

Evo-learning

This is a local, non-distributed, Go implementation of the Evolution Strategies as a Scalable Alternative to Reinforcement Learning. The original work from the paper can be found at openai/evolution-strategies-starter.

It uses the openai/gym-http-api, binding-go, and unixpickle/anynet and unixpickle/anyvec for efficient high-level vector computation.

Instructions

The project is aimed to solve CartPole-v0, which requires 195 epochs/reward over 100 episodes.

First, clone or download the repo:

$ go get github.com/KnowmeGPT/evolution

In a separate terminal, open gym from the github.com/openai/gym-http-api directory in your file system.

$ python gym_http_server.py

Now, run the trainer and evaluator with the specifications of your choice.

$ # 200 episodes of training by 2 agents and 100 episodes of evaluation with a single agent
$ # Saving results to a directory "~/agents2eps200"
$ evolution --outmonitor ~/agents2eps200 --finalepisodes 100 --episodes 200 --agents 2

Results

After a trial and error phase of 42 episodes, the agents evolve enough to dominate the game independently. We apply a cutoff average reward of 195 or more for both agents, implying that the parameters should typically be capable of solving the game independently. The average reward achieved is 198.5 over 100 episodes!

Future Plans

  • Parallelize where needed
  • Add 32/64 bit support
  • Support multiple environments
  • Allow network serialization/deserialization
  • Optimize code further
  • Include plotting, statistics, performance profiling, and uploading capabilities

Disclaimer

This is a project initially created for a Complex Systems and Networks class. It is not intended to compare with the original work. Rather, it is an execution with results and interpretation.

evo-learning's People

Contributors

knowmegpt avatar

Stargazers

Feng Liyang (Monk) avatar 苏穗宗 avatar 陆赛赛 avatar  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.