This is an architecture-free neural network library, which uses the instinct algorithm to evolve the best possible neural network.
Add it as Maven dependency:
<dependency>
<groupId>com.github.raimannma</groupId>
<artifactId>NEAT4J</artifactId>
<version>1.14</version>
</dependency>
Or use the jar file from the latest release. How you can build your own jar file is described below.
Network network = new Network(numInputs, numOutputs);
final double[][] inputs = new double[][]{
new double[]{0, 0},
new double[]{0, 1},
new double[]{1, 0},
new double[]{1, 1},
};
final double[][] outputs = new double[][]{
new double[]{0},
new double[]{0},
new double[]{0},
new double[]{1},
};
final Network network = new Network(2, 1); // create minimal network
final EvolveOptions options = new EvolveOptions();
options.setError(0.05); // set target error for evolution
// more options see here: https://raimannma.github.io/NEAT4J/com/github/raimannma/architecture/EvolveOptions.html
network.evolve(inputs, outputs, options); // evolve the network
git clone https://github.com/raimannma/NEAT4J.git
cd NEAT4J
mvn test
git clone https://github.com/raimannma/NEAT4J.git
cd NEAT4J
mvn clean package
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Manuel Raimann Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
Heavily inspired by carrot