Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jinyeom/neat
NEAT (NeuroEvolution of Augmenting Topologies) implemented in Go
https://github.com/jinyeom/neat
genetic-algorithm go neat neural-network neuroevolution recurrent-neural-networks reinforcement-learning topologies
Last synced: about 2 months ago
JSON representation
NEAT (NeuroEvolution of Augmenting Topologies) implemented in Go
- Host: GitHub
- URL: https://github.com/jinyeom/neat
- Owner: jinyeom
- License: gpl-3.0
- Archived: true
- Created: 2016-11-17T04:23:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T20:45:55.000Z (over 6 years ago)
- Last Synced: 2024-07-31T20:52:16.751Z (4 months ago)
- Topics: genetic-algorithm, go, neat, neural-network, neuroevolution, recurrent-neural-networks, reinforcement-learning, topologies
- Language: Go
- Homepage:
- Size: 505 KB
- Stars: 71
- Watchers: 14
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - neat - Plug-and-play, parallel Go framework for NeuroEvolution of Augmenting Topologies (NEAT). (Machine Learning / Search and Analytic Databases)
- zero-alloc-awesome-go - neat - Plug-and-play, parallel Go framework for NeuroEvolution of Augmenting Topologies (NEAT). (Machine Learning / Search and Analytic Databases)
- awesome-go - neat - NEAT (NeuroEvolution of Augmenting Topologies) implemented in Go - ★ 47 (Machine Learning)
- awesome-go-extra - ARCHIVED - 11-17T04:23:14Z|2018-07-04T20:45:55Z| (Machine Learning / Advanced Console UIs)
- awesome-go-zh - neat
README
![alt text](https://github.com/jinyeom/neat/blob/master/banner.png "neat")
[![GoDoc](https://godoc.org/github.com/jinyeom/neat?status.svg)](https://godoc.org/github.com/jinyeom/neat)
[![Go Report Card](https://goreportcard.com/badge/github.com/jinyeom/neat)](https://goreportcard.com/report/github.com/jinyeom/neat)
[![cover.run go](https://cover.run/go/github.com/jinyeom/neat.svg)](https://cover.run/go/github.com/jinyeom/neat)CURRENTLY NOT WORKING! There will be a further notice when it's updated.
NEAT (NeuroEvolution of Augmenting Topologies) is a neuroevolution algorithm by
Dr. Kenneth O. Stanley which evolves not only neural networks' weights but also their
topologies. This method starts the evolution process with genomes with minimal structure,
then complexifies the structure of each genome as it progresses. You can read the original
paper from [here](http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf).## Installation
To install `neat` run the following:```bash
$ go get -u github.com/jinyeom/neat
```## Usage
This NEAT package is as simple as plug and play. All you have to do is to create
a new instance of NEAT, given the configuration from a JSON file, for which the
template is provided below, and an evaluation method of a neural network, and
run.```json
{
"experimentName": "XOR Test",
"verbose": true,
"numInputs": 3,
"numOutputs": 1,
"fullyConnected": false,
"numGenerations": 50,
"populationSize": 100,
"initFitness": 9999.0,
"minimizeFitness": true,
"survivalRate": 0.5,
"stagnationLimit": 5,
"ratePerturb": 0.2,
"rateAddNode": 0.2,
"rateAddConn": 0.2,
"rateMutateChild": 0.5,
"distanceThreshold": 20.0,
"coeffUnmatching": 1.0,
"coeffMatching": 1.0,
"cppnActivations": [],
}
```Now that you have the configuration JSON file is ready as `config.json`, we can
start experiment with NEAT. Below is an example XOR experiment.```go
package mainimport (
"log"
"math"// Import NEAT package after installing the package through
// the instruction provided above.
"github.com/jinyeom/neat"
)func main() {
// First, create a new instance of Config from the JSON file created above.
// If there's a file import error, the program will crash.
config, err := neat.NewConfigJSON("config.json")
if err != nil{
log.Fatal(err)
}// Then, we can define the evaluation function, which is a type of function
// which takes a neural network, evaluates its performance, and returns some
// score that indicates its performance. This score is essentially a genome's
// fitness score. With the configuration and the evaluation function we
// defined, we can create a new instance of NEAT and start the evolution
// process.
neat.New(config, neat.XORTest()).Run()
}```
## License
This package is under GNU General Public License.