An example of cluster slot game.
It has cluster detection algorithm using backtracking and Monte carlo simulations for getting the probability of forming a cluster of 5 or more elements. Using Taylor series you can get a very good approximation of the probability function so if you adjust the probabilities you dont have to make 10 million simulations every time.