How much does precomputation (matching a series of strings and their permutations with a set number

Posted by nipun on Stack Overflow See other posts from Stack Overflow or by nipun
Published on 2010-03-31T05:23:56Z Indexed on 2010/04/15 23:03 UTC
Read the original article Hit count: 85

Consider a typical slots machine with n reels(say reel1: a,b,c,d,w1,d,b, ..etc).
On play we generate a concatenated string of n objects (like for above, chars) We have a paytable which lists winning strings with payout amounts.

The problem is a wild character (list of wilds: w1,w2) which can replace {w1:a,b,c},{w2:a} ..etc. Is it really worthwhile to have all possible winning strings permutations with the wilds precomputed and used or simply at the time of occurance, generate all combinations with the pattern in hand accordingly.

I did'nt really see much difference initially, but now if I need to scale the machine to handle 11+ reels with a much higher concentration of wilds than previously, I need to figure out the exact approach for this particular bit.

Any ideas will be really appreciated :)

© Stack Overflow or respective owner

Related posts about performance-comparison

Related posts about permutation