All Projects → TLmaK0 → rustneat

TLmaK0 / rustneat

Licence: MIT license
Rust Neat - NeuroEvolution of Augmenting Topologies

Programming Languages

rust
11053 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to rustneat

denser-models
cdv.dei.uc.pt/denser/
Stars: ✭ 49 (-22.22%)
Mutual labels:  neuroevolution
Super Mario Neat
This program evolves an AI using the NEAT algorithm to play Super Mario Bros.
Stars: ✭ 64 (+1.59%)
Mutual labels:  neuroevolution
Evolutionsimulator
Evolution Simulator with Box2D
Stars: ✭ 143 (+126.98%)
Mutual labels:  neuroevolution
NEATEST
NEATEST: Evolving Neural Networks Through Augmenting Topologies with Evolution Strategy Training
Stars: ✭ 13 (-79.37%)
Mutual labels:  neuroevolution
Neat Python
Python implementation of the NEAT neuroevolution algorithm
Stars: ✭ 895 (+1320.63%)
Mutual labels:  neuroevolution
Darwin
Evolutionary Algorithms Framework
Stars: ✭ 72 (+14.29%)
Mutual labels:  neuroevolution
DeepHyperNEAT
A public python implementation of the DeepHyperNEAT system for evolving neural networks. Developed by Felix Sosa and Kenneth Stanley. See paper here: https://eplex.cs.ucf.edu/papers/sosa_ugrad_report18.pdf
Stars: ✭ 42 (-33.33%)
Mutual labels:  neuroevolution
Aimandshoot
A neuroevolution game experiment.
Stars: ✭ 201 (+219.05%)
Mutual labels:  neuroevolution
Evolutionary Algorithm
Evolutionary Algorithm using Python, 莫烦Python 中文AI教学
Stars: ✭ 881 (+1298.41%)
Mutual labels:  neuroevolution
Machine Learning Flappy Bird
Machine Learning for Flappy Bird using Neural Network and Genetic Algorithm
Stars: ✭ 1,683 (+2571.43%)
Mutual labels:  neuroevolution
Sharpneat
SharpNEAT - Evolution of Neural Networks. A C# .NET Framework.
Stars: ✭ 273 (+333.33%)
Mutual labels:  neuroevolution
Factor Network
A simple factor network implementation written by JavaScript
Stars: ✭ 530 (+741.27%)
Mutual labels:  neuroevolution
Exnn
An Elixir Evolutive Neural Network framework à la G.Sher
Stars: ✭ 93 (+47.62%)
Mutual labels:  neuroevolution
Cerebrum
Cerebrum.js is a neural network library created in pure JavaScript.
Stars: ✭ 25 (-60.32%)
Mutual labels:  neuroevolution
Awesome Deep Neuroevolution
A collection of Deep Neuroevolution resources or evolutionary algorithms applying in Deep Learning (constantly updating)
Stars: ✭ 150 (+138.1%)
Mutual labels:  neuroevolution
NeuroEvolution-Flappy-Bird
A comparison between humans, neuroevolution and multilayer perceptrons playing Flapy Bird implemented in Python
Stars: ✭ 17 (-73.02%)
Mutual labels:  neuroevolution
Radiate
Radiate is a parallel genetic programming engine capable of evolving solutions to many problems as well as training learning algorithms.
Stars: ✭ 65 (+3.17%)
Mutual labels:  neuroevolution
Neural Network P5
Deprecated! See:
Stars: ✭ 218 (+246.03%)
Mutual labels:  neuroevolution
Sparse Evolutionary Artificial Neural Networks
Always sparse. Never dense. But never say never. A repository for the Adaptive Sparse Connectivity concept and its algorithmic instantiation, i.e. Sparse Evolutionary Training, to boost Deep Learning scalability on various aspects (e.g. memory and computational time efficiency, representation and generalization power).
Stars: ✭ 182 (+188.89%)
Mutual labels:  neuroevolution
Cephalopods
Evolving squids through neuroevolution
Stars: ✭ 122 (+93.65%)
Mutual labels:  neuroevolution

Working-in-progress

Rust NEAT

travis-ci Gitter

Implementation of NeuroEvolution of Augmenting Topologies NEAT http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf

This implementations uses a CTRNN based onOn the Dynamics of Small Continuous-Time Recurrent Neural Network (Beer, 1995) http://www.cs.uvm.edu/~jbongard/2014_CS206/Beer_CTRNNs.pdf

telemetry

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env

Run test

To speed up tests, run them with --release (XOR classification/simple_sample should take less than a minute)

cargo test --release

Run example

cargo run --release --example simple_sample --features=telemetry

then go to http://localhost:3000 to see how neural network evolves

telemetry

Run openai tests

telemetry

Install python dependencies

sudo apt install python3
sudo apt install python3-pip
sudo apt install libpython3.8-dev
sudo apt-get remove swig
sudo apt-get install swig3.0
sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
sudo pip3 install gym
sudo pip3 install gym[box2d]
sudo apt install python3-opengl

Run test

cargo run --release --example openai --features=openai,telemetry

Windows Openai

openai/gym#11 (comment)

Update to the latest version of Windows (>version 1607, "Anniversary Update")
Enable Windows Subsystem for Linux (WSL)
Open cmd, run bash
Install python & gym (using sudo, and NOT PIP to install gym). So by now you should probably be able to run things and get really nasty graphics related errors. This is because WSL doesn't support any displays, so we need to fake it.
Install vcXsrv, and run it (you should just have a little tray icon)
In bash run "export DISPLAY=:0" Now when you run it you should get a display to pop-up, there may be issues related to graphics drivers. Sadly, this is where the instructions diverge if you don't have an NVIDIA graphics card.
Get the drivers: "sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime"
Run!

Sample usage

Create a new cargo project:

Add rustneat to Cargo.toml

[dependencies]
rustneat = "0.2.1"

Then use the library i.e. to implement the above example, use the library as follows:

extern crate rustneat;
use rustneat::Environment;
use rustneat::Organism;
use rustneat::Population;

struct XORClassification;

impl Environment for XORClassification {
    fn test(&self, organism: &mut Organism) -> f64 {
        let mut output = vec![0f64];
        let mut distance: f64;
        organism.activate(&vec![0f64, 0f64], &mut output);
        distance = (0f64 - output[0]).abs();
        organism.activate(&vec![0f64, 1f64], &mut output);
        distance += (1f64 - output[0]).abs();
        organism.activate(&vec![1f64, 0f64], &mut output);
        distance += (1f64 - output[0]).abs();
        organism.activate(&vec![1f64, 1f64], &mut output);
        distance += (0f64 - output[0]).abs();
        (4f64 - distance).powi(2)
    }
}

fn main() {
    let mut population = Population::create_population(150);
    let mut environment = XORClassification;
    let mut champion: Option<Organism> = None;
    while champion.is_none() {
        population.evolve();
        population.evaluate_in(&mut environment);
        for organism in &population.get_organisms() {
            if organism.fitness > 15.9f64 {
                champion = Some(organism.clone());
            }
        }
    }
    println!("{:?}", champion.unwrap().genome);
}

Develop

Check style guidelines with:

rustup component add rustfmt-preview cargo fmt

Thanks

Thanks for the icon nerves by Delwar Hossain from the Noun Project

References:

NeuroEvolution of Augmenting Topologies NEAT http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf

On the Dynamics of Small Continuous-Time Recurrent Neural Network (Beer, 1995) http://www.cs.uvm.edu/~jbongard/2014_CS206/Beer_CTRNNs.pdf

An Investigation into the Dynamics of a Continuous Time Recurrent Neural Network Node http://www.tinyblueplanet.com/easy/FCSReport.pdf

http://indy9000.github.io/posts/analysis-of-a-simple-ctrnn.html http://indy9000.github.io/posts/analysis-of-a-simple-ctrnn.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].