harthur/brain

How to run this project

onmyway133 opened this issue · 1 comments

So I try to run this project, here is the steps I take, not sure if it is correct

yarn install

When it asks

Couldn't find any versions for "esprima-six" that matches "0.0.3"
? Please choose a version from this list: (Use arrow keys)

Choose 1.0.1

Then, create a file like basic.js

var assert = require("assert"),
    brain = require("./lib/brain");

var net = new brain.NeuralNetwork();

net.train([{input: { r: 0.03, g: 0.7, b: 0.5 }, output: { black: 1 }},
           {input: { r: 0.16, g: 0.09, b: 0.2 }, output: { white: 1 }},
           {input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 }}]);

var output = net.run({ r: 1, g: 

Run node basic.js to see the result. Hope it help

It's unmaintained. Please go to https://github.com/harthur-org/brain.js.