Secrets behind the algorithms of slot machines