Hi everybody. I have a question that is more like a curiosity than a problem.
I wrote an algorithm that uses a recursive function to analitically solve my game’s levels (it’s a sort of puzzle game) in order to see if there’s any better solution than the one I thought of when I made the level.
This algorithm is heavy, as it tries to calculate any possible sequence of moves from the player, and for some levels it can take a few seconds to complete; during this time the program does not respond on windows.
This is not a problem as I made it just for myself and I have no need to speed it up.
But when I saw it working, I noticed that even if the program is doing heavy work to solve the problem and it’s stuck on it, it uses only a very small portion of my PC’s resources. For small portion I mean around 10% of CPU and just around 30MB of RAM.
Why does it do it? Shouldn’t it use all the available resources to solve the problem as fast as it can?