News for hackers. Stuff that matters.
Re:Letting neural networks be weird by clickok on Thursday May 24, 2018 @05:11PM (#17148454)
It's interesting that so much neural net weirdness emerges from exploiting errors in physics simulators or floating point math. I am now expecting the next generation of perpetual motion machines to include AI to try to take advantage of physics bugs in our own universe.

On a related note, does anyone know how you might go about fixing a simulator that allows collisions to generate more energy/momentum than was initially supplied? Or otherwise violates known invariants?

Re:Letting neural networks be weird by comicjk on Thursday May 24, 2018 @10:01PM (#17150070)
You want a symplectic integrator (https://en.m.wikipedia.org/wiki/Symplectic_integrator) such as Verlet Integration (https://en.m.wikipedia.org/wiki/Verlet_integration). Such integrators naturally conserve energy and momentum as long as your forces and energies are self-consistent and you don't use gigantic timesteps.

A classic mistake is to use something like "velocity += acceleration*time" (this is called Euler integration). It looks reasonable, and it's good enough for a toy project, but it doesn't conserve energy unless the timesteps are infinitely small.

A more sophisticated mistake is to use something like Runge-Kutta Integration: highly accurate in terms of position, but it is not symplectic so the total energy will drift over time. Think of your simulated world as a stack of graph paper sheets, where each sheet represents a surface of constant energy. Runge-Kutta will take you very close to the ideal (x,y) point - but not necessarily on the same sheet. Verlet Integration may be a little further from the right point each time, but by its mathematical form it will always stay on the same sheet.

Re:Letting neural networks be weird by macoovacany on Thursday May 24, 2018 @09:36PM (#17149973)