• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Neural Network Evolution Playground with Backprop NEAT

backprop-neat-js

NEAT

Web Demo combining the NEAT genetic algorithm to evolve atypical neural networks, and the backpropagation algorithm to solve for the weights of the evolved networks for simple classification problem, inspired by tensorflow playground.

Our NEAT implementation evolves arbitrary computational graphs that can be processed by karpathy's recurrent.js for both forward and backward pass. WebCola and p5.js used for visualisation.

At this stage, it is more proof of concept, because classification problems can already be easily solved by throwing deeper and bigger networks and GPU's at the problem rather than carefully crafting small neural networks using NEAT. That doesn't stop me from playing around with these non-mainstream concepts though, as this stuff is what I want to work on.

Please read my blog post for more details, or try the Web Demo.

Node.js example code

The web demo is actually a nasty big hairball spaghetti-code tied together with jquery. The actual libraries are a bit better, and can also be used by node.js command line mode. I put together some example code to explain how it works line by line. The framework is messy, but it works. Please refer to example.js and dataset.js. Below is a brief overview of how the library works:

First we load the libraries and the dummy dataset generator, and generate a random dataset.

var R = require('./ml/recurrent.js');
var N = require('./ml/neat.js');
var DataSet = require('./dataset.js');
DataSet.generateRandomData(3); // 0 - Circle, 1 - XOR, 2 - Gaussians, 3 - Spiral

Then, we have to define a fitness function for a given genome, and calculate a fitness value for the machine learning problem at hand, which in this demo is a simple classification problem. For backprop to work, we can put in the optional flags for backprop mode, and the number of backprop cycles in this function. By default, backprop should be assumed to be false if nothing is passed in when you write this function.

var fitnessFunc = function(genome, backprop_mode, num_cycle) {
	var fitness = 0.0;
	// write some code to calculate the fitness
	// backprop here as well if backprop_mode is set to true
	return fitness;
}

We can then define a backprop function by returning a function that calls fitnessFunc but with backprop_mode set to true. This backprop function will be used later.

var backprop = function(trainer, num_cycle) {
  var f = function(g) {
    return fitnessFunc(g, true, nCycle);
  };
  trainer.applyFitnessFunc(f); // this will be explained later.
};

We can now define our NEAT environment, and a trainer object to store our population of genomes.

N.init({nInput: 2, nOutput: 1, // 2 inputs (x, y) coordinate, one output (class)
  initConfig: "all", // initially, each input is connected to each output when "all" is used
  activations : "default", // [SIGMOID, TANH, RELU, GAUSSIAN, SIN, ABS, MULT, SQUARE, ADD] for "default"
});

var trainer = new N.NEATTrainer({
  new_node_rate : 0.2,
  new_connection_rate : 0.5,
  num_populations: 5,
  sub_population_size : 20,
  init_weight_magnitude : 0.25,
  mutation_rate : 0.9,
  mutation_size : 0.005,
  extinction_rate : 0.5,
}); // a new randomly initialised population will be created

The following line applies our fitness function to all 100 genomes in the trainer class, ranks them, and clusters them into the 5 sub populations. If the fitness function performs backprop, then all 100 genomes will be backpropped'.

trainer.applyFitnessFunc(fitnessFunc); // by default, fitnessFunc doesn't perform backprop
var genome = trainer.getBestGenome(); // this line will extract the most capable genome from the populations

We can now try to evolve the population of networks, ie, add new nodes and connections, for 10 generations, and for each generation, we perform backpropagation of 600 cycles, using a minibatch of 10 samples. The results and progress is slowly dumped to the console using the helper function.

for (var i = 0; i < 10; i++) { // evolve and backprop 10 times
  printPerformanceMetrics(genome); // print out the performance metrics
  trainer.evolve(); // evolve the entire population.  new nodes, connections, mutations, crossovers.
  backprop(trainer, 600);
  genome = trainer.getBestGenome();
}
printPerformanceMetrics(genome, true); // print out the final performance metrics with more details

The final genome can be saved as a JSON string to be used in the future.

var data_string = genome.toJSON() // dump the genome to json format
console.log(data_string);

// another project in another file:
var genome = new N.Genome();
genome.fromJSON(data_string);

Output

> node example.js

After running example.js in the command line, NEAT starts evolving networks to fit the spiral dataset. It starts off with 4 nodes (output, bias, x0, x1), and 3 connections, and the number of nodes and connections grow after each generation. The fitness function is the negative of the logistic regression error with an extra penalty factor for the number of connections.

gen: 0, fitness: -0.694, train accuracy: 0.620, test accuracy: 0.610, nodes: 4, connections: 3
gen: 1, fitness: -0.693, train accuracy: 0.620, test accuracy: 0.605, nodes: 4, connections: 3
gen: 2, fitness: -0.693, train accuracy: 0.620, test accuracy: 0.605, nodes: 4, connections: 3
gen: 3, fitness: -0.693, train accuracy: 0.620, test accuracy: 0.605, nodes: 4, connections: 3
gen: 4, fitness: -0.653, train accuracy: 0.695, test accuracy: 0.670, nodes: 7, connections: 8
gen: 5, fitness: -0.630, train accuracy: 0.720, test accuracy: 0.680, nodes: 8, connections: 13
gen: 6, fitness: -0.618, train accuracy: 0.720, test accuracy: 0.700, nodes: 8, connections: 13
gen: 7, fitness: -0.568, train accuracy: 0.760, test accuracy: 0.740, nodes: 9, connections: 17
gen: 8, fitness: -0.555, train accuracy: 0.765, test accuracy: 0.755, nodes: 12, connections: 26
gen: 9, fitness: -0.510, train accuracy: 0.780, test accuracy: 0.745, nodes: 16, connections: 38
gen: 10, fitness: -0.510, train accuracy: 0.780, test accuracy: 0.745, nodes: 16, connections: 38
gen: 11, fitness: -0.414, train accuracy: 0.895, test accuracy: 0.845, nodes: 23, connections: 60
gen: 12, fitness: -0.409, train accuracy: 0.860, test accuracy: 0.835, nodes: 23, connections: 60
gen: 13, fitness: -0.363, train accuracy: 0.900, test accuracy: 0.825, nodes: 25, connections: 68
gen: 14, fitness: -0.344, train accuracy: 0.900, test accuracy: 0.815, nodes: 25, connections: 73
gen: 15, fitness: -0.322, train accuracy: 0.915, test accuracy: 0.860, nodes: 27, connections: 82
gen: 16, fitness: -0.317, train accuracy: 0.925, test accuracy: 0.830, nodes: 28, connections: 87
gen: 17, fitness: -0.317, train accuracy: 0.925, test accuracy: 0.830, nodes: 28, connections: 87
gen: 18, fitness: -0.317, train accuracy: 0.915, test accuracy: 0.840, nodes: 27, connections: 82
gen: 19, fitness: -0.313, train accuracy: 0.920, test accuracy: 0.830, nodes: 28, connections: 87
gen: 20, fitness: -0.294, train accuracy: 0.955, test accuracy: 0.895, nodes: 50, connections: 169

We can look at each training and test example and compare the ground truth label with our predicted result. Predictions will be rounded to calculate accuracy.

train set breakdown:
x0	x1	label	predict
0.35	0.25	0	0.21
2.3	-1.6	1	0.89
2.4	-0.92	1	0.84
-0.61	-5.4	0	0.086
-6.3	-0.77	0	0.056
-0.18	1.2	1	0.98
0.91	3.2	0	0.045
-0.56	0.39	1	0.95
-2.2	4.9	1	0.95
2.2	-2.4	1	0.98
-0.11	3.0	0	0.072
-5.8	-1.5	0	0.018
-0.65	-0.66	1	0.64
2.2	-0.86	1	0.75
0.37	0.22	0	0.18
-2.9	-4.9	0	0.093
-2.2	-0.67	0	0.075
-2.9	0.80	0	0.043
0.96	0.24	0	0.11
0.96	1.4	1	0.78
1.7	3.5	0	0.17
0.51	-0.20	0	0.092
-2.1	1.9	0	0.026
-1.3	0.36	1	0.95
4.2	-2.0	0	0.013
1.9	-2.0	1	0.98
-2.3	-3.1	1	0.60
3.4	4.7	1	0.83
0.40	-1.3	0	0.069
-1.9	-3.1	1	0.66
0.24	-5.0	0	0.10
-3.0	0.28	0	0.10
6.1	1.4	1	0.90
2.8	2.1	0	0.076
-0.85	-1.7	0	0.066
-1.3	4.6	1	0.93
-1.1	3.6	0	0.24
-4.6	0.52	1	0.78
-2.0	4.3	1	0.91
-1.6	-5.2	0	0.071
4.2	1.0	0	0.13
-0.13	-3.9	1	0.82
2.5	-0.46	1	0.86
3.0	-4.1	0	0.15
1.2	-0.048	0	0.094
-1.8	-1.4	0	0.097
2.6	0.54	1	0.89
-4.9	-2.8	0	0.93
0.32	1.5	1	0.97
-1.8	-0.40	0	0.30
2.2	0.19	1	0.85
-4.1	-3.9	0	0.28
-3.1	-4.5	0	0.090
0.99	-1.1	0	0.026
0.94	1.9	1	0.87
-3.4	-1.8	1	0.87
-1.1	-3.2	1	0.87
0.053	0.11	0	0.66
3.8	2.0	0	0.076
-1.4	0.12	1	0.91
3.6	1.8	0	0.23
-1.3	0.40	1	0.96
4.2	0.78	0	0.043
1.3	-0.68	0	0.15
2.8	-4.5	0	0.061
1.6	-2.8	1	0.99
-5.8	-1.9	0	0.0077
-0.46	-5.1	0	0.060
0.68	5.6	1	0.89
1.9	1.4	1	0.87
-0.34	-2.0	0	0.097
0.73	2.0	1	0.86
3.9	-0.77	0	0.32
-3.9	-2.0	1	0.95
-1.2	1.3	1	0.98
-1.8	2.2	0	0.046
-1.2	-1.8	0	0.055
3.6	-3.4	0	0.39
-0.30	-0.13	1	0.70
-2.5	1.4	0	0.075
3.5	-2.6	0	0.061
4.5	3.3	1	0.91
0.40	-0.27	0	0.12
-0.13	-0.68	1	0.70
2.0	0.28	1	0.83
0.060	-0.54	1	0.63
3.3	4.1	1	0.66
1.2	-4.6	0	0.067
-4.4	0.89	1	0.97
0.37	-0.011	0	0.13
0.44	-0.071	0	0.10
-4.2	0.20	1	0.72
-0.61	0.49	1	0.97
0.34	3.9	0	0.20
-2.5	1.8	0	0.065
-3.6	-4.2	0	0.079
-0.57	5.2	1	0.92
0.48	-3.3	1	0.86
-0.67	-1.7	0	0.062
-1.5	-1.5	0	0.10
2.2	-2.6	1	0.97
-0.12	-4.0	1	0.82
0.57	-2.0	0	0.23
5.6	2.1	1	0.96
2.3	4.5	1	0.62
-0.058	4.7	1	0.38
-2.1	1.9	0	0.028
-2.7	4.0	1	0.59
-1.4	2.5	0	0.029
-0.90	-0.11	1	0.80
4.5	-2.0	0	0.031
0.17	0.32	0	0.65
0.59	-0.0097	0	0.089
-2.6	-0.27	0	0.17
-2.3	-0.53	0	0.11
2.1	2.0	1	0.57
0.85	0.61	0	0.28
-0.30	-0.31	0	0.69
1.1	-0.18	0	0.076
-1.2	1.2	1	0.98
-0.36	0.72	1	0.97
2.0	-4.5	0	0.056
2.1	5.3	1	0.48
5.5	2.4	1	0.80
0.10	-0.58	1	0.59
-3.7	-1.9	1	0.90
1.3	0.48	0	0.25
0.27	-1.3	0	0.16
-1.7	-3.3	1	0.68
1.4	-0.91	0	0.22
-0.94	1.5	1	0.98
-0.95	3.1	0	0.12
-3.8	3.0	1	0.96
5.7	0.49	1	0.79
0.76	0.33	0	0.14
-2.8	-2.1	1	0.81
-1.2	-3.1	1	0.83
-2.7	-4.3	0	0.075
-1.2	-5.1	0	0.093
-4.0	-0.50	1	0.85
1.2	2.1	1	0.91
1.5	-2.7	1	0.99
2.7	-1.8	1	0.78
2.1	-0.54	1	0.76
-0.12	0.11	1	0.78
0.40	-0.049	1	0.11
3.7	0.61	0	0.18
-0.13	-2.0	0	0.11
4.4	-1.0	0	0.032
0.62	2.1	1	0.81
0.17	-1.4	0	0.19
-0.11	2.0	1	0.95
1.2	-0.44	0	0.073
1.0	5.2	1	0.60
4.9	2.5	1	0.29
0.72	-0.39	0	0.087
2.7	2.9	0	0.087
0.090	-0.17	1	0.53
1.9	3.0	0	0.19
-0.55	0.23	1	0.92
-2.2	-0.57	0	0.084
4.4	0.48	0	0.045
-3.9	-0.68	1	0.82
4.0	-0.069	0	0.15
-0.33	-0.37	1	0.69
0.43	5.5	1	0.90
-0.98	0.47	1	0.97
1.3	0.90	1	0.66
3.0	2.6	0	0.096
-4.5	1.9	1	1.0
1.9	-4.9	0	0.11
1.1	-3.3	1	0.91
-2.9	0.69	0	0.045
2.2	-0.44	1	0.80
-3.4	2.9	1	0.97
-3.8	2.7	1	0.99
-5.0	-2.0	0	0.064
-3.4	3.7	1	0.73
0.21	-1.8	0	0.092
-0.91	0.050	1	0.89
1.4	-0.29	0	0.19
-3.8	0.030	1	0.79
3.9	4.3	1	0.73
0.54	-1.5	0	0.018
0.15	0.22	1	0.58
-2.6	-2.3	1	0.80
0.51	-0.76	0	0.11
-1.0	-0.68	1	0.61
-1.4	-1.5	0	0.098
3.3	-2.8	0	0.12
0.31	3.5	0	0.25
0.37	0.23	0	0.18
0.96	1.3	1	0.75
-2.0	-1.6	0	0.068
0.34	0.29	1	0.25
-1.3	0.87	1	0.98
-0.074	1.9	1	0.97
-0.55	2.9	0	0.069
-1.2	2.9	0	0.069
1.8	1.2	1	0.88
test set breakdown:
x0	x1	label	predict
0.90	-3.4	1	0.86
-2.1	-0.43	0	0.096
-2.7	1.3	0	0.076
-0.30	1.6	1	0.99
-0.77	-3.4	1	0.87
1.5	-2.9	1	0.98
2.1	0.69	1	0.85
0.66	-1.1	0	0.035
-2.3	-2.5	1	0.66
-4.3	1.4	1	0.99
1.1	-0.82	0	0.049
-1.4	-2.0	0	0.083
-3.6	-4.7	0	0.14
-1.8	1.8	0	0.26
0.87	2.0	1	0.84
5.5	0.16	1	0.90
-0.22	1.6	1	0.99
1.2	1.4	1	0.86
-1.9	2.0	0	0.043
2.4	-4.3	0	0.062
1.7	-4.3	0	0.068
-0.0029	0.74	0	0.96
-4.2	0.91	1	0.94
2.0	-2.5	1	0.99
0.26	0.43	0	0.56
-5.3	-2.5	0	0.64
0.60	2.2	1	0.73
-2.3	-5.3	0	0.048
1.5	4.8	1	0.13
-3.1	3.7	1	0.77
1.5	-4.4	0	0.060
4.0	-1.1	0	0.041
0.13	-0.45	1	0.52
-0.051	5.2	1	0.91
-1.2	1.1	1	0.98
-2.1	-0.12	0	0.13
6.2	1.4	1	0.94
-0.42	0.25	1	0.92
-4.0	-0.78	1	0.78
0.78	-1.1	0	0.033
-0.45	-1.9	0	0.061
-0.54	-2.0	0	0.060
2.9	-0.94	1	0.90
-0.36	1.4	1	0.99
0.15	-5.4	0	0.26
0.066	-0.53	1	0.62
4.2	0.55	0	0.030
2.7	2.2	0	0.077
2.0	2.9	0	0.19
0.13	-0.76	1	0.57
-3.8	-3.6	0	0.66
-0.14	0.076	1	0.77
-2.6	-0.80	0	0.067
-2.4	5.0	1	0.93
2.2	-2.0	1	0.96
-2.1	0.81	0	0.22
-4.1	0.76	1	0.79
3.0	-0.070	1	0.85
-0.88	1.2	1	0.99
2.7	-1.4	1	0.84
0.19	-1.1	0	0.33
-0.18	-1.9	0	0.082
4.6	-1.5	0	0.11
0.091	-2.0	0	0.30
1.1	-3.1	1	0.93
-2.0	-3.4	1	0.54
0.75	-3.2	1	0.87
-0.26	0.70	0	0.97
-1.6	-5.2	0	0.067
-1.2	0.80	1	0.98
-0.91	-2.0	0	0.061
3.8	1.5	0	0.74
2.4	1.3	1	0.76
3.9	1.5	0	0.67
-1.2	-1.4	0	0.13
-2.9	-2.6	1	0.94
-6.1	-0.16	0	0.17
-3.2	3.4	1	0.82
0.062	1.1	1	0.98
-1.1	0.46	1	0.97
-2.6	-0.19	0	0.17
1.2	-0.71	0	0.072
-1.4	0.57	1	0.97
-1.9	3.1	0	0.086
-1.1	0.085	1	0.91
-1.5	3.2	0	0.13
1.7	1.2	1	0.91
-0.053	0.27	1	0.86
-1.5	-5.3	0	0.054
4.2	3.2	1	0.88
-0.41	0.15	1	0.87
-3.0	3.1	1	0.84
0.87	0.75	0	0.39
0.78	-0.89	0	0.058
2.1	0.77	1	0.85
0.52	-1.5	0	0.019
5.0	2.8	1	0.58
0.94	0.34	0	0.13
0.65	5.0	1	0.43
-1.1	-0.17	1	0.79
-1.6	-0.90	0	0.41
0.64	-0.61	0	0.095
-1.5	0.68	1	0.97
-1.2	-1.4	0	0.12
2.2	-2.0	1	0.96
-3.2	-4.3	0	0.080
1.1	3.7	0	0.15
-4.3	-3.7	0	0.62
3.7	1.7	0	0.56
0.94	3.6	0	0.14
-0.60	2.9	0	0.060
-4.3	-0.55	1	0.82
-1.5	0.11	1	0.90
3.4	-2.5	0	0.062
-0.26	0.073	1	0.80
-0.31	0.30	0	0.92
1.2	0.45	0	0.17
-0.72	0.53	1	0.97
0.48	-0.13	0	0.094
-0.27	5.1	1	0.92
2.1	4.8	1	0.47
0.45	-0.17	0	0.099
-2.7	0.027	0	0.15
-1.4	4.3	1	0.84
2.9	-3.5	0	0.28
-2.6	-3.0	1	0.77
2.4	2.6	0	0.093
1.3	0.25	0	0.16
4.4	-0.032	0	0.22
-3.3	3.1	1	0.94
-0.50	-0.42	1	0.68
-2.6	0.60	0	0.084
-2.3	-1.4	0	0.061
-0.67	0.026	1	0.85
-0.68	-3.9	1	0.80
1.7	3.0	0	0.19
-0.21	0.33	0	0.92
4.0	-3.2	0	0.21
-1.6	2.8	0	0.048
2.3	0.28	1	0.86
-1.1	2.9	0	0.063
0.76	-0.66	0	0.082
-0.98	-0.17	1	0.78
-2.9	-2.5	1	0.94
-0.90	0.47	1	0.97
5.7	2.3	1	0.92
0.75	1.5	1	0.84
-0.32	0.46	0	0.96
1.9	-2.6	1	0.99
-4.1	-0.17	1	0.83
4.6	0.67	0	0.14
3.6	4.0	1	0.53
-1.2	-1.0	0	0.38
-0.66	-3.5	1	0.83
-2.9	1.1	0	0.060
1.2	-0.62	0	0.090
-0.60	4.7	1	0.83
-0.38	3.6	0	0.30
0.54	-0.98	0	0.076
-4.7	0.41	1	0.72
3.9	4.7	1	0.80
1.8	1.8	1	0.87
1.9	3.2	0	0.18
2.7	0.22	1	0.87
2.8	-4.4	0	0.072
1.0	1.6	1	0.85
-3.1	-1.4	1	0.13
2.8	4.5	1	0.81
-1.6	2.4	0	0.035
3.0	-0.39	1	0.91
3.6	-2.5	0	0.033
0.35	0.020	0	0.14
-5.8	-1.3	0	0.049
2.9	2.7	0	0.088
0.051	3.5	0	0.29
-2.4	4.3	1	0.76
4.5	-1.1	0	0.039
5.2	2.4	1	0.54
-5.1	-3.0	0	0.87
-0.12	0.17	1	0.83
-5.7	-2.0	0	0.012
-1.3	-1.3	0	0.18
0.48	1.7	1	0.93
2.4	-1.1	1	0.84
-4.2	-1.4	1	0.090
-0.20	-0.29	0	0.68
3.4	4.8	1	0.82
-0.55	-0.23	1	0.70
0.62	-5.2	0	0.25
-2.0	-3.5	1	0.48
0.35	0.33	0	0.28
0.26	-5.0	0	0.11
-0.44	-3.0	1	0.95
-0.60	-4.7	0	0.24
-0.47	-0.41	1	0.69
0.13	0.44	0	0.83
2.0	-3.1	1	0.94
-3.5	2.2	1	0.99
-0.033	2.0	1	0.94
0.19	-1.7	0	0.077

We can also dump out the JSON representation of the best genome for future use.

json of best genome:
{"nodes":[0,0,2,1,4,10,7,5,7,6,5,13,5,13,9,3,5,7,7,6,9,13,11,13,4,6,13,6,10,9,7,13,11,9,10,11,3,6,4,13,7,3,4,11,13,3,9,4,9,9,5,5,3,4,9,10,4,10,3,13,10,9,5,7,9,9,7,10,5,4,4,11,6,9,4,13,11,5,13,3,3,6,9,10,13,11,7,5,4,6,10,7,6,5,10,5,6,13,9,7,9,5,4,11,7,6,5,9,10,3,10,4,9,3,6,5,13,6,4,9,13,13,11,11,11,7,13,6,6,3,7,3,4,3,6,5,4,13,7,6,10,6,9,6,10,7,9,9,7,7,7,6],"connections":[[0,3],[1,3],[2,3],[2,4],[4,3],[5,3],[1,6],[6,3],[2,7],[7,3],[1,8],[8,3],[1,4],[0,4],[2,9],[9,3],[2,10],[10,4],[3,4],[4,11],[11,3],[4,12],[12,3],[4,13],[13,3],[1,14],[14,5],[1,15],[15,3],[2,16],[16,4],[1,17],[17,3],[3,17],[3,18],[18,4],[0,10],[2,19],[19,3],[12,4],[2,20],[20,3],[3,15],[4,21],[21,3],[7,11],[1,16],[0,17],[1,7],[0,9],[0,11],[0,18],[11,19],[3,8],[7,22],[22,11],[18,23],[23,4],[23,19],[20,19],[18,10],[0,7],[2,24],[24,4],[20,9],[11,25],[25,3],[2,26],[26,4],[1,11],[3,12],[16,15],[3,16],[7,18],[11,4],[0,27],[27,10],[15,10],[25,17],[7,28],[28,3],[0,29],[29,4],[3,7],[3,19],[7,4],[7,24],[11,30],[30,3],[9,4],[4,31],[31,3],[7,31],[19,16],[21,19],[18,32],[32,4],[18,3],[28,8],[19,8],[12,7],[18,8],[20,16],[3,24],[2,33],[33,7],[19,13],[15,34],[34,3],[9,30],[17,4],[3,10],[13,12],[1,19],[11,35],[35,3],[11,17],[27,12],[25,10],[12,18],[2,36],[36,4],[17,37],[37,18],[19,7],[3,38],[38,4],[12,9],[2,39],[39,10],[39,30],[19,15],[10,9],[12,40],[40,4],[3,41],[41,4],[11,18],[2,12],[20,8],[4,42],[42,3],[20,26],[17,24],[2,43],[43,9],[20,15],[10,17],[2,44],[44,3],[15,8],[18,16],[35,45],[45,3],[12,10],[4,46],[46,12],[19,47],[47,3],[2,48],[48,19],[25,19],[15,24],[7,19],[16,19],[41,16],[24,32],[38,8],[25,9],[25,30],[1,12],[8,49],[49,3],[17,25],[11,9],[1,20],[18,19],[20,10],[0,50],[50,17],[9,51],[51,3],[30,52],[52,3],[11,53],[53,3],[38,12],[17,7],[18,54],[54,3],[4,55],[55,3],[3,56],[56,8],[41,7],[38,9],[12,20],[4,57],[57,31],[21,20],[24,9],[25,47],[2,58],[58,24],[27,59],[59,10],[19,60],[60,3],[3,32],[20,61],[61,30],[7,13],[16,62],[62,19],[43,62],[9,13],[7,38],[17,63],[63,3],[0,64],[64,3],[30,65],[65,3],[65,10],[17,11],[20,24],[1,43],[3,6],[0,66],[66,9],[16,21],[23,8],[12,67],[67,20],[3,63],[21,68],[68,3],[18,12],[13,16],[2,69],[69,4],[16,43],[0,70],[70,9],[18,71],[71,3],[2,72],[72,10],[3,37],[2,73],[73,24],[4,74],[74,13],[2,8],[15,25],[2,75],[75,43],[38,27],[11,13],[3,76],[76,38],[27,20],[15,41],[2,77],[77,3],[27,25],[41,9],[17,41],[2,78],[78,3],[20,79],[79,3],[41,38],[13,7],[20,27],[17,80],[80,3],[7,12],[34,10],[18,81],[81,3],[31,23],[43,82],[82,9],[10,7],[7,20],[18,83],[83,23],[1,42],[52,4],[43,49],[32,27],[55,24],[8,19],[7,84],[84,3],[50,4],[0,15],[37,36],[15,12],[20,12],[49,9],[3,85],[85,16],[17,10],[15,86],[86,3],[8,87],[87,49],[10,88],[88,4],[20,35],[36,50],[24,8],[3,72],[0,89],[89,27],[16,28],[2,90],[90,7],[1,91],[91,17],[18,92],[92,8],[19,18],[37,47],[37,11],[19,93],[93,8],[3,94],[94,15],[41,12],[59,24],[31,95],[95,3],[53,42],[23,29],[8,43],[0,96],[96,11],[3,83],[24,97],[97,4],[18,98],[98,4],[18,99],[99,19],[0,100],[100,11],[34,8],[1,13],[17,67],[33,15],[27,13],[18,25],[1,101],[101,8],[15,36],[1,102],[102,14],[0,20],[17,16],[60,20],[53,7],[15,103],[103,8],[10,103],[25,104],[104,3],[55,76],[19,27],[17,19],[70,41],[7,9],[27,9],[55,7],[43,61],[23,32],[11,29],[3,105],[105,94],[9,12],[30,8],[2,106],[106,26],[41,42],[2,23],[1,107],[107,16],[30,108],[108,65],[43,30],[31,16],[17,100],[16,109],[109,4],[109,7],[20,67],[65,38],[68,59],[12,22],[1,110],[110,8],[29,26],[18,68],[53,4],[19,111],[111,16],[16,30],[1,32],[78,41],[43,41],[25,24],[18,55],[3,112],[112,17],[25,38],[8,14],[36,33],[25,113],[113,19],[14,35],[88,40],[1,73],[0,114],[114,50],[81,32],[23,38],[23,11],[13,42],[15,18],[2,15],[20,115],[115,15],[43,3],[1,116],[116,20],[59,20],[19,117],[117,3],[17,8],[18,17],[3,118],[118,12],[76,58],[16,119],[119,4],[55,8],[10,120],[120,4],[56,49],[25,121],[121,3],[7,87],[79,18],[70,27],[10,71],[23,67],[19,122],[122,16],[3,67],[3,123],[123,15],[8,108],[16,8],[3,124],[124,4],[25,16],[39,25],[1,30],[9,125],[125,4],[17,15],[71,19],[43,4],[17,126],[126,3],[0,24],[15,127],[127,10],[16,13],[2,128],[128,19],[9,16],[41,55],[18,129],[129,23],[42,130],[130,3],[32,59],[2,131],[131,7],[25,26],[21,132],[132,3],[20,133],[133,26],[1,134],[134,16],[32,53],[15,22],[27,3],[51,15],[3,84],[16,135],[135,28],[10,135],[12,136],[136,40],[4,137],[137,13],[50,138],[138,4],[40,24],[10,13],[7,36],[4,139],[139,12],[4,140],[140,12],[37,33],[11,141],[141,4],[0,36],[18,142],[142,3],[17,143],[143,4],[53,12],[56,12],[8,27],[18,144],[144,71],[7,64],[19,11],[0,145],[145,11],[11,146],[146,4],[0,147],[147,4],[76,20],[18,43],[38,24],[20,148],[148,24],[62,13],[39,27],[7,149],[149,4],[22,21],[10,39],[63,27],[12,150],[150,9],[17,122],[24,63],[42,29],[23,151],[151,4],[25,53]],"nInput":2,"nOutput":1,"renderMode":1,"outputIndex":3,"genome":[{"0":0,"1":-0.1990809589624405,"2":1},{"0":1,"1":0.21869555115699768,"2":1},{"0":2,"1":0.2043716311454773,"2":1},{"0":3,"1":0.14809374511241913,"2":1},{"0":4,"1":-1.087314486503601,"2":1},{"0":8,"1":0.0205453522503376,"2":1},{"0":9,"1":-0.04641956835985184,"2":1},{"0":10,"1":1.4872020483016968,"2":1},{"0":11,"1":1.4378000497817993,"2":1},{"0":12,"1":0.6751543283462524,"2":1},{"0":13,"1":-0.30040982365608215,"2":1},{"0":14,"1":0.7950164675712585,"2":1},{"0":15,"1":-0.5342731475830078,"2":1},{"0":16,"1":-0.17131105065345764,"2":1},{"0":17,"1":-0.07076830416917801,"2":1},{"0":18,"1":0.7782223224639893,"2":1},{"0":19,"1":0.5447294116020203,"2":1},{"0":20,"1":-0.08170567452907562,"2":1},{"0":21,"1":0.3598742187023163,"2":1},{"0":22,"1":-0.31116485595703125,"2":1},{"0":23,"1":0.028425250202417374,"2":1},{"0":24,"1":-0.12196933478116989,"2":1},{"0":27,"1":0.8951428532600403,"2":1},{"0":28,"1":-0.555556058883667,"2":1},{"0":29,"1":0.26718467473983765,"2":1},{"0":30,"1":0.5671877861022949,"2":1},{"0":31,"1":1.263924241065979,"2":1},{"0":32,"1":1.2043015956878662,"2":1},{"0":33,"1":0.032340358942747116,"2":1},{"0":34,"1":1.1230087280273438,"2":1},{"0":35,"1":0.6186588406562805,"2":1},{"0":36,"1":0.013891514390707016,"2":1},{"0":37,"1":0.7881823182106018,"2":1},{"0":38,"1":0.2572149634361267,"2":1},{"0":39,"1":-0.042540960013866425,"2":1},{"0":40,"1":-0.1318652629852295,"2":1},{"0":41,"1":0.037087950855493546,"2":1},{"0":42,"1":1.2894037961959839,"2":1},{"0":43,"1":0.12854845821857452,"2":1},{"0":44,"1":0.06678406894207001,"2":1},{"0":45,"1":-0.2994729280471802,"2":1},{"0":46,"1":0.23728179931640625,"2":1},{"0":47,"1":-1.1762526035308838,"2":1},{"0":48,"1":0.22974562644958496,"2":1},{"0":49,"1":0.15653926134109497,"2":1},{"0":50,"1":0.15156395733356476,"2":1},{"0":51,"1":0.1427304446697235,"2":1},{"0":52,"1":-0.12434153258800507,"2":1},{"0":53,"1":-0.6717133522033691,"2":1},{"0":54,"1":0.47756823897361755,"2":1},{"0":55,"1":-0.1569730043411255,"2":1},{"0":56,"1":0.4789273142814636,"2":1},{"0":57,"1":-0.00844470877200365,"2":1},{"0":58,"1":0.04868080094456673,"2":1},{"0":59,"1":-2.0696122646331787,"2":1},{"0":60,"1":-0.1410132497549057,"2":1},{"0":61,"1":0.23149150609970093,"2":1},{"0":62,"1":0.01941116899251938,"2":1},{"0":63,"1":0.005565163679420948,"2":1},{"0":64,"1":0.6710184216499329,"2":1},{"0":65,"1":0.9918897747993469,"2":1},{"0":66,"1":0.17996558547019958,"2":1},{"0":67,"1":0.2343207448720932,"2":1},{"0":68,"1":0.40644747018814087,"2":1},{"0":69,"1":0.30471983551979065,"2":1},{"0":70,"1":-0.592862606048584,"2":1},{"0":71,"1":-0.025512976571917534,"2":1},{"0":72,"1":1.056725263595581,"2":1},{"0":73,"1":0.2726452648639679,"2":1},{"0":74,"1":-0.06482979655265808,"2":1},{"0":75,"1":0.5163955092430115,"2":1},{"0":76,"1":-0.057671159505844116,"2":1},{"0":77,"1":-0.13981005549430847,"2":1},{"0":81,"1":0.005874045193195343,"2":1},{"0":82,"1":-0.004793676547706127,"2":1},{"0":83,"1":0.08360494673252106,"2":1},{"0":84,"1":-0.06839484721422195,"2":1},{"0":85,"1":-0.4483039975166321,"2":1},{"0":87,"1":-0.14657175540924072,"2":1},{"0":88,"1":1.5776666402816772,"2":1},{"0":89,"1":0.08456038683652878,"2":1},{"0":90,"1":-0.5571848750114441,"2":1},{"0":91,"1":0.5082486867904663,"2":1},{"0":92,"1":0.5586816668510437,"2":1},{"0":93,"1":-0.011906222440302372,"2":1},{"0":94,"1":0.1740315556526184,"2":1},{"0":95,"1":0.32169249653816223,"2":1},{"0":96,"1":-0.0017324863001704216,"2":1},{"0":97,"1":0.9935621619224548,"2":1},{"0":99,"1":-0.36725908517837524,"2":1},{"0":102,"1":-0.037549372762441635,"2":1},{"0":107,"1":0.9271854758262634,"2":1},{"0":108,"1":0.39601290225982666,"2":1},{"0":109,"1":-1.8833800554275513,"2":1},{"0":111,"1":0.044900599867105484,"2":1},{"0":113,"1":-0.18416939675807953,"2":1},{"0":119,"1":-0.3248673975467682,"2":1},{"0":125,"1":0.362201988697052,"2":1},{"0":126,"1":0.09393918514251709,"2":1},{"0":127,"1":-0.09178516268730164,"2":1},{"0":128,"1":0.06234718859195709,"2":1},{"0":129,"1":0.5985479950904846,"2":1},{"0":130,"1":0.021276699379086494,"2":1},{"0":131,"1":-0.29562750458717346,"2":1},{"0":132,"1":0.11486413329839706,"2":1},{"0":138,"1":0.0030194332357496023,"2":1},{"0":140,"1":0.09719421714544296,"2":1},{"0":141,"1":-0.08085612952709198,"2":1},{"0":142,"1":-0.6262797117233276,"2":1},{"0":144,"1":1.1242427825927734,"2":1},{"0":145,"1":1.1261123418807983,"2":1},{"0":146,"1":0.23019663989543915,"2":1},{"0":147,"1":-0.21249212324619293,"2":1},{"0":150,"1":0.4426085650920868,"2":1},{"0":151,"1":-0.012566478922963142,"2":1},{"0":166,"1":0.10216055810451508,"2":1},{"0":167,"1":0.002114666160196066,"2":1},{"0":168,"1":0.06952373683452606,"2":1},{"0":169,"1":0.73763507604599,"2":1},{"0":174,"1":0.686951756477356,"2":1},{"0":175,"1":0.33801186084747314,"2":1},{"0":176,"1":1.625544548034668,"2":1},{"0":182,"1":0.5441470146179199,"2":1},{"0":183,"1":0.01081212516874075,"2":1},{"0":184,"1":1.6667057275772095,"2":1},{"0":185,"1":0.21002483367919922,"2":1},{"0":186,"1":-0.13505469262599945,"2":1},{"0":197,"1":0.6035367250442505,"2":1},{"0":198,"1":-0.02499118261039257,"2":1},{"0":199,"1":0.07102607190608978,"2":1},{"0":204,"1":0.6983110904693604,"2":1},{"0":205,"1":-0.20966453850269318,"2":1},{"0":209,"1":0.5569878220558167,"2":1},{"0":210,"1":0.09131519496440887,"2":1},{"0":212,"1":0.7038783431053162,"2":1},{"0":213,"1":0.5292423963546753,"2":1},{"0":214,"1":-0.18413729965686798,"2":1},{"0":217,"1":-0.20495472848415375,"2":1},{"0":218,"1":0.6364243626594543,"2":1},{"0":221,"1":0.6294803619384766,"2":1},{"0":222,"1":-0.01098803523927927,"2":1},{"0":223,"1":-0.08159161359071732,"2":1},{"0":228,"1":1.9151662588119507,"2":1},{"0":229,"1":-2.4764862060546875,"2":1},{"0":232,"1":0.6716621518135071,"2":1},{"0":233,"1":-0.038179345428943634,"2":1},{"0":234,"1":0.8860968947410583,"2":1},{"0":235,"1":0.5665239691734314,"2":1},{"0":236,"1":0.049489881843328476,"2":1},{"0":277,"1":-0.10214890539646149,"2":1},{"0":278,"1":-0.056237202137708664,"2":1},{"0":285,"1":0.2142965942621231,"2":1},{"0":289,"1":-0.2137589305639267,"2":1},{"0":343,"1":0.6094931364059448,"2":1},{"0":344,"1":0.23881424963474274,"2":1},{"0":345,"1":0.6699376702308655,"2":1},{"0":346,"1":0.42057374119758606,"2":1},{"0":347,"1":0.376840204000473,"2":1},{"0":348,"1":-0.2885461151599884,"2":1},{"0":350,"1":0.006199584808200598,"2":1},{"0":394,"1":0.6985927224159241,"2":1},{"0":395,"1":0.37702104449272156,"2":1},{"0":396,"1":0.052182964980602264,"2":1},{"0":397,"1":-0.35693320631980896,"2":1},{"0":400,"1":0.0739152655005455,"2":1},{"0":468,"1":0.05920691788196564,"2":1},{"0":470,"1":0.7456434369087219,"2":1},{"0":471,"1":-0.28268930315971375,"2":1},{"0":550,"1":-0.1338222771883011,"2":1}]}

License

MIT

More Repositories

1

estool

Evolution Strategies Tool
Jupyter Notebook
901
star
2

sketch-rnn

Multilayer LSTM and Mixture Density Network for modelling path-level SVG Vector Graphics data in TensorFlow
Python
793
star
3

write-rnn-tensorflow

Generative Handwriting using LSTM Mixture Density Network with TensorFlow
Python
692
star
4

slimevolleygym

A simple OpenAI Gym environment for single and multi-agent reinforcement learning
Python
633
star
5

WorldModelsExperiments

World Models Experiments
Jupyter Notebook
545
star
6

pytorch_notebooks

tutorial notebooks
Jupyter Notebook
371
star
7

cppn-gan-vae-tensorflow

Train CPPNs as a Generative Model, using Generative Adversarial Networks and Variational Autoencoder techniques to produce high resolution images.
Python
346
star
8

cppn-tensorflow

Very Simple and Basic Implementation of Compositional Pattern Producing Network in TensorFlow
Python
311
star
9

sketch-rnn-datasets

optional extra vector image datasets for sketch-rnn
Python
215
star
10

neuralslimevolley

Neural Slime Volleyball
JavaScript
201
star
11

supercell

supercell
Jupyter Notebook
188
star
12

rnn-tutorial

RNN Tutorial for Artists
JavaScript
183
star
13

resnet-cppn-gan-tensorflow

Using Residual Generative Adversarial Networks and Variational Auto-encoder techniques to produce high resolution images.
Python
123
star
14

astool

Augmented environments with RL
Jupyter Notebook
102
star
15

image-notebook

image-notebook
Jupyter Notebook
87
star
16

gecco-tutorial-2019

2019 talk at GECCO
67
star
17

neurogram

neurogram
JavaScript
64
star
18

mdn_jax_tutorial

Mixture Density Networks (Bishop, 1994) tutorial in JAX
Jupyter Notebook
56
star
19

presentations

presentations
44
star
20

cppn-gan-vae-cifar-tensorflow

First attempt to use the previous CPPN-GAN-VAE model to train on CIFAR-10 images.
Python
39
star
21

netart-js

quick hacked together js demo to implement fixed-topology cppn in the web browser for interactive usage
JavaScript
39
star
22

sketch-rnn-flowchart

trained sketch-rnn / deployed with sketch-rnn-js on flowchart dataset
JavaScript
33
star
23

kanji2kanji

Reproduce domain transfer results in Deep Learning for Classical Japanese Literature
Jupyter Notebook
31
star
24

paperjs_box2d

demo of working with box2d and paper.js
JavaScript
31
star
25

RainbowSlimeVolley

Using Rainbow implementation in Chainer RL for Slime Volleyball Pixel Environment
Python
24
star
26

sketch-rnn-poster

Poster for "A Neural Representation for Sketch Drawings" for ICLR 2018 Conference
22
star
27

rlzoo

fork of rl-baseline-zoo
Python
21
star
28

quickdraw-ndjson-to-npz

Convert RAW Quickdraw datafiles into stroke-based .npz format with RDP at variable epsilon for sketch-rnn
Jupyter Notebook
15
star
29

sema-demo

sketch-rnn demo for seoul mediacity biennale 2018
JavaScript
13
star
30

diff-vae-tensorflow

skeleton variation encoder code in tensorflow
Python
12
star
31

pybullet_animations

pybullet_animations
12
star
32

cma

Fork of cma-es library by Nikolaus Hansen
Python
11
star
33

cantonese-list

List of 4000 Chinese characters sorted by historical usage frequency, with Cantonese yale romanization and definition
11
star
34

creatures

autonomous creatures written in processing / processing.js
Processing
7
star
35

zombie

A* search algorithm example, zombie chasing humans
Python
4
star
36

tshirtai

3
star
37

batchnorm-convnet-mnist-tensorflow

self contained skeleton script for testing and training mnist convnet+batchnorm based classifier in tensorflow
Python
2
star