Ubisoft's AI Learns To Compute Game Physics In Microseconds! ⚛️

Károly Zsolnai-Fehér presents a neural network approach that predicts game physics 300 to 5,000 times faster than traditional simulators, running at thousands of frames per second while using only a few megabytes of memory. The method compresses simulation data before training, though it struggles to extrapolate beyond its training scenarios.
Chapters
Dear fellow scholars, this is two minute papers with in almost any kind of real time computer games where different objects interact with each other, having some sort of physics engine is a requirement. Flags waving in the wind, stroking bunnies with circular objects are among these cases. And of course not all heroes wear capes, but the ones that do require the presence of such a physics engine. However, a full physical simulation of these interactions is often not possible because it is orders of magnitude slower than what we are looking for in real time applications. Now hold on to your papers because this project proposes a new learning based method that can speed up the standard physical simulations and make them 300 to 5,000 times faster. And then we can give it all the positions, forces and other information and it will be able to tell us the outcome and do all this faster than real time. Since this is a neural network based project, our seasoned fellow scholars know that we'll need many hours of simulation data to train on. Fortunately, this information can be produced with one of those more accurate but slower methods. We can wait arbitrarily long for a full physical simulation for this training set because it is only needed once for the training. One of the key decisions in this project is that it also supports interaction with objects and we can even specify external forces like wind direction and speed controls. In some papers, the results are difficult to evaluate. For instance, when we produce any kind of deepfake, we need to call in people and create a user study where we measure how often do people believe forged videos to be real. The process has many pitfalls, like choosing a good distribution of people, asking the right questions, and so on. Another great part of the design of this project is that evaluating this is a breeze. We can just give it another situation, let it guess the result, then simulate the same thing with a full physical simulator and compare the two against each other, and they are really close. But wait, do you see what I see? If you are worried about how computationally intensive the neural network based solution is, don't be. It only takes a few megabytes of memory, which is nothing. And it runs in the order of microseconds, which is also nothing. So much so that if you look here, you see that the full simulation can be done at two frames per second, while this new solution produces thousands and thousands of frames per second. I think it is justified to say that this thing costs absolutely nothing. I think I will take this one, thank you very much. We can even scale up the number of interactions as you see here, and even in this case it can produce more than a hundred frames per second. Incredible. We can also up or downscale the quality of the results and get different tradeoffs. If a core simulation looks good enough for our applications, we can even get up to tens of thousands of frames per second. That costs nothing even compared to the previous nothing. The key part of the solution is that it compresses the simulated data through a method called Principal Component Analysis and the training takes place on this compressed representation, which only needs to be unpacked when something new is happening in the game, which leads to a significant speed up. And it is also very gentle with memory use. And working with this compressed representation is the reason why you see this method referred to as subspace neural physics. However, as always, some limitations apply. For instance, it can kind of extrapolate beyond the examples that it has been trained on, but as you see here, if the training data is lacking a given kind of application, don't expect miracles. Yet if you have a look at the paper, you'll actually find a user study, but it is about the usefulness of the individual components of the system. Make sure to check it out in the video description this episode has been supported by Weights and Biases. Weights and Biases provides tools to track your experiments in your deep learning projects. It can save you a ton of time and money in these projects and is being used by OpenAI, Toyota Research, Stanford and Berkeley have a look at this project they launched to make computer code semantically searchable. Where, for example, we could ask for show me the best model on this data set with the fewest parameters and get a piece of code that does exactly that. Absolutely amazing. Make sure to Visit them through wandb.com papers wandb.com papers or just click the link in the video description and you can get a free demo today. Our thanks to WeightsAndBiases for helping us make better videos for you. Thanks for watching and for your generous support and I'll see you next time.










