View Single Post
  #94  
Old 12-29-2006, 01:35 PM
mykey1961 mykey1961 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 249
Default Re: 7 Card Hand Evaluators

[ QUOTE ]
Hey mykey question on your evaluator

[ QUOTE ]

Totals[Table[Table[Table[Table[Table[Table[Table[c1+52]+c2]+c3]+c4]+c5]+c6]+c7] shr 20]);

[/ QUOTE ]

not good with C++, but what are you representing hand strength as? a digit between 1 and 9? I notice your counters are highly efficient, because you can just use the hand rank as an index to your array. But to do that, is your hand rank just a number 1 through 9? as opposed to say, defining wich "2 pair" beat another "2 pair." Perhaps i'm just misunderstand, cause I don't know c++

P.s. how fast was your mapped array when incrementing counters, and when not? i think you flipped your times around..reporting a higher time with counters?

At anyrate, i'm 2/3 of the way done making your mapped table array for comparison purposes. Mapping one 4MB array to another takes like trillions of calculations (maybe you had some shortcut)...my computers grinding away.... Only one more array to map.

[/ QUOTE ]


I'm not using the rank as an index.

Think of my 1 big table as broken down into 7 smaller tables.

I start at state 0, where I have no knowledge about the cards to be ranked.

When I get my first card to be ranked, I use my current state, and the 1st card as a vector to my new state.

State_1 = Table0[State_0,Card_1]
State_2 = Table1[State_1,Card_2]
State_3 = Table2[State_2,Card_3]
State_4 = Table3[State_3,Card_4]
State_5 = Table4[State_4,Card_5]
State_6 = Table5[State_5,Card_6]

This last step is a little different

Rank = Table6[State_6,Card_7]


The values in Table6 are not states like in Table0 thru Table5, they are actual rankings.

My ranking is a 24 bit value. it's best viewed in Hex format.

If my 7 cards are

AcQh3c8hTcTd5d = 0x2AEC80

A = Ten
B = Jack
C = Queen
D = King
E = Ace

6s5s4h3sJs2dTc = 0x465432
Reply With Quote