View Single Post
  #20  
Old 12-24-2006, 02:55 PM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: 7 Card Hand Evaluators

[ QUOTE ]
oh ok. In terms of merely assigning a integer value to a hand ranking i'm getting slightly over 60 million per second. I have a AMD Dual FX-60, 2 Gigs of ram. For purposes of conductnig the evaluation I assigned a static flop and hands to 10 players and fed that repeatedly to my "determine winner" function which ranks all 10 hands.

The determine winner function contains no memory of the previous hand fed to it, so its like receiving a new hand, but it isolates the processing time, from the time it takes to generate new hands, etc....


[/ QUOTE ]

[ QUOTE ]
So, to clear things up, your program can work out the rank of a hand given to it in any order, IE given random unordered set of 7 integers it can work out 30 million of them per second? Or as a pre condition must they be ordered?

[/ QUOTE ]

[ QUOTE ]
Mine is 60million unordered. Keep in mind my function takes about 200MB of memory. I was trying to make the fastest algorithm my machine could support. The only faster algorithm I could think of would have taken multiple gigabytes of memory. Memory and speed are almost always tradeoffs.

[/ QUOTE ]

[ QUOTE ]
Oops, off by a factor of two. I'm closer to 30million on one core of a core duo 1.6ghz. This is JUST the compute ranking function.

[/ QUOTE ]

There's a HUGE difference between assigning static cards for the flop and the players, and the general purpose solution. Are you both actually comparing your algorithms using the same metric?

IE: Your function is passed an unordered vector of 7 integers in the range {0..51} and returns the hand rank for the input combination.

From what I just read it sounds like one of you is generating your timings with essentially 5 of the 7 cards statically pre-assigned, and the other is generating the timings with no static cards and possibly some are using a 52 element bitstring rather than 7 unordered integers (bachfan?).


[ QUOTE ]
I could write a function that is about 1000x faster but the memory requirements would increase 10 fold. Right now it uses about 200 Mbs of memory.

[/ QUOTE ]

[ QUOTE ]
So you are getting 60 million evaluations per second (that's 40 cpu cycles per hand) using VB?

[/ QUOTE ]

[ QUOTE ]
Yes Gull, thats what I said...

[/ QUOTE ]
A 1000 fold increase of the existing 40 cycles per hand would be 0.04 cycles per hand??? [img]/images/graemlins/confused.gif[/img]

Juk [img]/images/graemlins/smile.gif[/img]

PS: I'm supposed to be having a rest from poker/coding atm (until new year at least), but this thread got me interested now... [img]/images/graemlins/smirk.gif[/img]
Reply With Quote