const { Network } = require("@liquidcarrot/carrot");
const dataset = [
{ input: [0,0], output: [0] },
{ input: [0,1], output: [1] },
{ input: [1,0], output: [1] },
{ input: [1,1], output: [0] }
];
const net = new Network(2,1);
console.log(net.activate([0,0]));
console.log(net.activate([0,1]));
console.log(net.activate([1,0]));
console.log(net.activate([1,1]));
net.train(dataset);
console.log(net.activate([0,0]));
console.log(net.activate([0,1]));
console.log(net.activate([1,0]));
console.log(net.activate([1,1]));