Made some adjustments to my code, am currently getting 279 Million games per second. Although I still think your algorithm may have greater potential (possibly if I can combine it with mine).
Still not ready to share my algorithm...but i'll provide the following sketch of it...i ommitted some parts, changed descriptive names, etc...so that it can't just be copied (at least not easily).
As you can see its speed is primarily due to being able to solve for many hands in one lookup, skipping to more complex analysis as needed. Whether more complex analysis is needed is also determined by a lookup table.
For c1 = 1 To 46 nFTR(1) = CN(c1) For c2 = c1 + 1 To 47 nFTR(2) = CN(c2) For c3 = c2 + 1 To 48 nFTR(3) = CN(c3) For c4 = c3 + 1 To 49 nFTR(4) = CN(c4) For c5 = c4 + 1 To 50 nFTR(5) = CN(c5)
rec_number = vRec_Num(non-lexographic indexing algorithm...nftr 1 through 5 as input)
With vType(nftr(1 through 5) as input)
If .Type = 0 Then
For c6 = c5 + 1 To 51 For c7 = c6 + 1 To 52
rank = DW_Array(rec_number + sub_index(c6,c7))
' Select Case rank ' Case 0 To 3000 ' h1 = h1 + 1 ' Case 3001 To 7000 ' h2 = h2 + 1 ' Case 7001 To 9000 ' h3 = h3 + 1 ' Case 9001 To 11000 ' h4 = h4 + 1 ' Case 11001 To 12000 ' h5 = h5 + 1 ' Case 12001 To 15000 ' h6 = h6 + 1 ' Case 15001 To 16000 ' h7 = h7 + 1 ' Case 16001 To 17000 ' h8 = h8 + 1 ' Case Else ' h9 = h9 + 1 ' End Select
Next c7 Next c6
Else
...omitted...
For c6 = c5 + 1 To 51 For c7 = c6 + 1 To 52
vType = .Type vnumber = .tnumber
If SN(c6) = vType Then vnumber = vnumber + 1: adjust(vnumber) = CN(c6) If SN(c7) = vType Then vnumber = vnumber + 1: adjust(vnumber) = CN(c7)
Select Case vnumber Case Is condition1 rank = DW_Array(rec_number + cindex(c6, c7)) Case condition2 rank = SW_Array(Rec_number2 (another non-lexographic indexing algorithm) * XX) Case condition3 rank = SW_Array(Rec_number2 * XX + fn1(adjust(6))) Case Else rank = SW_Array(Rec_number2 * XX + cindex(c6, c7)) End Select
' Select Case rank ' Case 0 To 3000 ' h1 = h1 + 1 ' Case 3001 To 7000 ' h2 = h2 + 1 ' Case 7001 To 9000 ' h3 = h3 + 1 ' Case 9001 To 11000 ' h4 = h4 + 1 ' Case 11001 To 12000 ' h5 = h5 + 1 ' Case 12001 To 15000 ' h6 = h6 + 1 ' Case 15001 To 16000 ' h7 = h7 + 1 ' Case 16001 To 17000 ' h8 = h8 + 1 ' Case Else ' h9 = h9 + 1 ' End Select