HI everyone!
Im working on a small billard/8-pool game project. I want to make 'AI' opponent which will play with player. For now the 'AI' is just heuristic search which means that it shoots lots of possible shots, and checks which performed the best. I will be using it later on to train real AI. However the issue is that, the physics simulation takes way to long. If i for example make simulation that makes 360 shots, every shot will take at least 20-30 seconds to simulate and its waaaay too long.
I have tried changing Time.timeScale, but it does not seem like right option, because then simulation had lots of bugs (balls flying throught pool table or just disappearing). My second tought was to use Physics.Simulate() function, and in every FixedUpdate call make some sort of loop and invoke it 10, 100, 1000 times or something. And this also does not seem like its doing anything faster.
So how would you approach this? is there any way i can simulate shots on pool table faster? Thanks for responding!