The javascript architecture-free neural network library for node.js and the browser

creature.js

var synaptic = require('synaptic');
this.network = new synaptic.Architect.Perceptron(40, 25, 3);

world.js

creatures.forEach(function(creature)
{
    // move
    var input = [];
    for (var i in creatures)
    {
      input.push(creatures[i].location.x);
      input.push(creatures[i].location.y);
      input.push(creatures[i].velocity.x);
      input.push(creatures[i].velocity.y);
    }
    var output = creature.network.activate(input);
    creature.moveTo(output);
    
    // learn
    var learningRate = .3;
    var target = [
      targetX(creature), 
      targetY(creature), 
      targetAngle(creature)];
    creature.network.propagate(learningRate, target);
});
In this demo the creatures learn how to explore the screen together

Neurons

Neurons are the basic unit of the neural network. They can be connected to another neuron or gate connections between other neurons. This allows you to create complex and flexible architectures.

Learn More

Networks

Networks can be imported/exported to JSON, converted to workers or standalone functions. They can be connected to other networks or gate connections.

Learn More

Trainer

Trainers can take any given network regardless of its architecture and use any training set. It includes built-in tasks to test networks, like learning an XOR, completing a Discrete Sequence Recall task or an Embeded Reber Grammar test.

Learn More

Architect

The Architect includes built-in useful architectures such as multilayer perceptrons, multilayer long short-term memory networks (LSTM), liquid state machines and Hopfield networks.

Learn More

Demos

Learn XOR

Learn XOR

Discrete Sequence Recall

Discrete Sequence Recall

Learn Image Filters

Learn Image Filters

Paint An Image

Paint An Image

Paint An Image

Self Organizing Map

Read From Wikipedia

Read From Wikipedia