Theoretically speaking if you could predict the algorithm in an online casino wouldn't you be able to predict the game and win a lot let's just say you had access to the algorithm and you were able to replicate it you would practically be able to win all the games
It's written all over your point, the word prediction is still prediction, which means that you can be wrong, safe yourself the stress, you can't beat the casinos at their games, they are programmed to always be the winner, even if they are using third party game providers, its wired to benefits the casinos more than the gamblers.
Why should anyone embark on this journey anyway? You can't know it unless you are into casino games building, only such people will have a clue and be able to predict what could be the next when gambling, for me it's not healthy at all, thinking that you can beat casinos at their game.
I accepted that gambling is all about getting lucky, that's why I won't gamble unless I have money I am willing to see gone, as a gambler if you can control yourself you have acquired power over many things.