Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Could we use predictive physics in Space Engineers?

Discussion in 'General' started by SirConnery, Oct 29, 2019.

  1. SirConnery Apprentice Engineer

    Messages:
    182
    Referring to this video/technology.


    Basically training an AI to calculate rudimentary physics in a physics engine by neural networks.

    I don't have any technical know how. But since CPU is the bottleneck in this game, that could theoretically save up a lot of cpu calculations. Implementing it would most likely not be an easy feat but is this even possible in theory?

    Since physics in Space Engineers are basically cubes and triangles hitting each other it should be easier than in games with skeletal structures being involved.
     
    • Agree Agree x 1
  2. Amerikanovich Apprentice Engineer

    Messages:
    322
    SE uses the havok physics engine, it's the core the whole system is built around, it would be very difficult to implement anything else this late in the game, that's why we're still fighting with a 100m/s speed limit and people flying through walls in an era where other games let people walk around on spaceships flying at warp speed with no problems.
     
    • Agree Agree x 1
  3. Malware Master Engineer

    Messages:
    9,572
    Indeed. Replacing the physics engine now is quite simply not an option. To be clear though, the physics engine itself (Havok) is not really the problem for the speed thing. All those other games use various types of cheats to simulate the speeds, they don't actually walk around at warp speed. The problem is that this wasn't coded in at the very core of the game from the start (because the game wasn't supposed to be this large), so putting it in now would be a significant task.
     
    • Agree Agree x 1
  4. SirConnery Apprentice Engineer

    Messages:
    182
    As I understand what was described in the video was not a new physics engine, but instead a neural network AI. The AI learns the physics engine (any engine) by doing lots of simulated collisions thereby training it's ability to predict what would happen in case of a collision. That prediction can then be used in game instead of calculating the actual collision, saving on calculations needed.
     
    Last edited: Oct 30, 2019
    • Like Like x 1
  5. Stardriver907 Master Engineer

    Messages:
    3,042
    But... but that's... that's... CHEATING! Using the prediction instead of the actual collision?







    Actually, that's BRILLiANT.
     
    • Like Like x 1
  6. Ronin1973 Master Engineer

    Messages:
    4,763

    Sounds like a great idea. But how it relates to SE is ???? I'd be curious if the actual physics of the game is the choke-point OR if all the calculations based on the RESULTS of the physics is the problem. What an object should be doing is one thing. What that object does once forces are applied... well that would seem to be the kicker. Though, I can see this making a difference in collisions where several new grids are being created within a brief instant. But is it worth the overhaul for a few less moments of lag?
     
  7. SirConnery Apprentice Engineer

    Messages:
    182
    But the calculations on the results of the physics is the same thing as another collision right? So it's just another prediction for the AI.
     
  8. mleise Trainee Engineer

    Messages:
    26
    Three things I notice in the video without understanding how the method works in detail: 1) no destruction 2) two predefined objects collide in all scenes 3) focus on motion of soft objects
     
    Last edited: Oct 31, 2019
  9. Ronin1973 Master Engineer

    Messages:
    4,763
    Well no.... collisions are one aspect of the physics engine. Another would be a flying grid in natural gravity. If I'm using hydrogen thrusters and producing hydrogen at the same time, the mass of my grid is going to be changing continuously as well as the grid's center of gravity. The examples in the video aren't dynamic. They have static masses and static dimensions.
     
  10. SirConnery Apprentice Engineer

    Messages:
    182
    Aye. It's not a catch all solution. It would probably help big battles immensely though. The game runs mostly fine for me other than when there are huge collisions going on.

    I know it's not going to actually be implemented but it's fun to theorize.
    --- Automerge ---
    Reading their paper, it can be used for multiple objects. Although, as noted, inaccurately.

    "In Fig 11we stress tests our method on scenes with hundreds of bunniesFigure.... Although it produces compelling elastic defor-mation, this method struggles to produce accurate deforma-tions resulting from collisions.(left) and 16 characters (right), each simulated independently atframerates of 120 FPS and 240 FPS."

    There was also the Flagpole interacting with different windspeeds and directions, so it can also predict that. So one would assume it could be used to predict engine thrust > grid movement.

    I hope this or similar technology makes it ways into games.
     
  11. Ronin1973 Master Engineer

    Messages:
    4,763
    Where I see this being BIG is atmospheric effects like turbulence, wind, rain, snow... as well as fluid dynamics like tides. It would be kind of awesome to hit turbulence in the higher atmospheres... and in the lower atmosphere, dust storms, wind storms, etc.
     
    • Like Like x 1
  12. Tenzo Apprentice Engineer

    Messages:
    267
    I'm not buying into this new age "artificial intelligence" BS.

    All this "predictive learning" is just a form of better optimized code with less stringent cases. Fast simulations without the focus on accuracy. I would be all for that, but it would have to be possible in Havok.

    Which it isn't... Sadly.
     
  13. SirConnery Apprentice Engineer

    Messages:
    182
    It's actually quite different to just having better optimized code. It's actually skipping the code for calculations alltogether and using the learned behaviors instead of them. I mean; I guess you could call that better optimized code but it would make no sense. It would be like calling an aeroplane a better optimized bird. Which is a somewhat accurate desciption, but not really.

    "New age artificial intelligence" , first time I ever heard that.
     
  14. Tenzo Apprentice Engineer

    Messages:
    267
    There is no "new age artificial intelligence".

    That's a misquote. :)

    New age. That's one classification. Artificial Intelligence is another classification, focus being on machine learning. That's a second classification.

    This is the first time I have heard of "new age artificial intelligence" myself. There is a certain amount of irony in that.

    Also, I called machine learning BS. The trend of building machines that talk back to you, like Amazon's "Alexa" and all sorts of these simulation programs, is just that. BS. They are not actual persons, they cannot do and answer things on par with a real person, they have no actual "intelligence", per say. It's just a looser association of functions. So in essence, it's actually dumber. Reminds me of the original craze with artificial intelligence in the 90s, and all those simulated chat programs that tried to replicate a real brain. Behind that, there was a substantial monetary reward to the first "AI" program. As far as I know, it still has not been handed out.

    It's an illusion.
    --- Automerge ---
    Besides, we have predictive physics already. It's called Clang. Or "Phantom Forces." So in a way, you can say that Space Engineers is way ahead of its time. :)

    Alexa has nothing on our pistons and rotors. Nothing.
     
    • Agree Agree x 1
  15. Stardriver907 Master Engineer

    Messages:
    3,042
    I believe you are referring to the Turing Test, although there was no monetary award that I am aware of.

    It's only called "artificial" intelligence because we're not talking about any biological components (until recently). The "intelligent" results could just as well come from gears and pulleys. What we call "intelligent" has more to do with calculation speed and accuracy. The machine you are reading this response on is only "smart" enough to add, and only "knows" two numbers, 0 and 1. It can do it so fast, though, that it seems intelligent. An illusion? Absolutely. Doesn't matter. The point is that it's not a person doing the adding. We generally call anyone that can solve mathematical equations quickly "smart". Sure, I could give you the answer to the equation 5,827,643,654,109.947364592 / 42,648,792.835447 if you give me a couple of days, but your calculator app on your phone will give you the answer the instant you click the "enter" button. Is your phone "smart?" or just smarter than you ;)

    A lot of other computer games solve physics problems by simply faking the physics. SE uses Havok. Havok tries to get it "right" and in order for us to have it "right" Havok needs to be able to do over one billion calculations per second. Constantly. If there's a way to "skip" some of that there's a real good chance us stupid humans wouldn't notice.

    We'd be grateful, though ;)
     
    • Like Like x 1