News for hackers. Stuff that matters.
Re:Brain.js by hliyan on Friday December 28, 2018 @12:03PM (#18777925)
I'm aware of tensorflow.js, but what really struck me with brain.js was this snippet from the very beginning of the readme file:

how to approximate the XOR function using brain.js

  const net = new brain.NeuralNetwork(config);

  net.train([{input: [0, 0], output: [0]},
           {input: [0, 1], output: [1]},
           {input: [1, 0], output: [1]},
           {input: [1, 1], output: [0]}]);

  const output = net.run([1, 0]);  // [0.987]

This is how you win over newcomers -- quick, accessible demonstrations of the product/library's capabilities. A sample is worth a thousand words. Tensorflow may have a lot of great, detailed examples, but its documentation fails in this regard.
Re:Brain.js by hombre_fatal on Friday December 28, 2018 @02:09PM (#18778748)
Great point.

This is why I used p2.js for javascript game physics over franken-emscripten Box2d ports.

The readme and source code are extremely accessible (https://github.com/schteppe/p2.js#sample-code).

When I was trying to optimize my collision detection, I stepped in to p2.js source to read narrowphase vs broadphase implementations. Last I used Box2d, I was reading c++ pdf documentation.

Re:Brain.js by axel180 on Friday December 28, 2018 @02:14PM (#18778773)
Really cool example!
Re:Brain.js by spullara on Friday December 28, 2018 @10:19PM (#18781584)
What is the equivalent in tensorflow.js? Can someone translate?