Git Product home page Git Product logo

declanoller / hyper_ne_gd Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.63 MB

Using Neuroevolution with gradient descent to construct and train logic circuits

Home Page: https://www.declanoller.com/2019/05/24/descending-into-modular-neuroevolution-for-logic-circuits/

Python 100.00%
neuroevolution pytorch logic evolutionary-algorithms genetic-algorithm python python3 sympy deep-learning neat gradient-descent neural-network ai artificial-intelligence

hyper_ne_gd's Introduction

Using Neuroevolution with gradient descent to construct and train logic circuits

Overview

This was an extension of a previous project I did where I used neuroevolution to build neural network (NN) agents to play OpenAI games. However, here, I made it so the weights aren't searched for randomly, they're trained via gradient descent, which speeds things up a ton.

In addition, I made it so a successful NN can be packaged into an "atom", to be inserted in other, higher level NNs. This part was less successful, but still has promise.

A long summary of the results can be found on my blog here.

Main run scripts

These are the main .py scripts that I use, in the main directory for simplicity. They are:

  • hyper_evo.py - For running scripts.

Classes

These are the classes that the run scripts use, which live in the classes directory. Here, they're listed in order from low to high level.

Software:

  • Atom.py - Represents a single discrete entity, either a simple classic NN node, or a more complex, functional module atom.
  • HyperEPANN.py - Assembles Atom objects, handles propagation through the NN, and other stuff.
  • EvoAgent.py - Handles the NN, and interfaces with whatever environment you want to use it with (OpenAI gym, or your own).
  • Population.py - For building a populatinon of EvoAgent objects. Also has multi_run_hist() for running the same evolution scenario multiple times, to generate statistics.

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.