0T34 / hydroneat

Implementation of "Evolving Neural Networks through Augmenting Topologies" in java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HydroNEAT

Follow development on YouTube.

This is an implementation of NEAT. It is experimental for now, but it does solve XOR satisfactorily. I've tried to keep this implementation as true to the original paper as possible.

Features

  • Genomes
    • Add connection mutation
    • Add node mutation
    • Small perturbing mutations
    • Crossover
  • Networks can be calculated, with sigmoid activation function
  • Configuration can be easily tweaked
  • Evaluator with easily pluggable fitness scoring
  • Visualization of genomes as graphs

The project also features tools for speciation (calculation of genomic distance), although speciation is not incorporated into the Evaluator yet. Instead, the Evaluator employs a more conventional evolutionary algorithm where:

  1. The most fit genome is carried into next generation unchanged
  2. The lowest performing members of the population are killed
  3. The remaining genomes are paired randomly as parents to create the new generation
    1. A percentage of the next generation is created using sexual reproduction (crossover)
    2. A percentage of the next generation is created using asexual reproduction (mutation without crossover)
    3. All new genomes are either perturbed in their weights, or assigned new weights - both happen randomly

Visualization

HydroNEAT comes with a visualizer, that shows you what a given genome will look like as a network. graph_image For more info, look at GenomePrinter.java.

You can also keep track of any variable when training, using LiveXYChart.java. chart_image

Running it on your own

Be sure to tweak the Evaluator to suit your needs. If you want to run this for yourself, the tests are a good place to start.

Contact

I can be contacted on hydrozoa.rs [at] gmail [dot] com.

If you use this code, please credit me.

About

Implementation of "Evolving Neural Networks through Augmenting Topologies" in java


Languages

Language:Java 100.0%