poker

Scoring Poker Hands with Deuces Wild

I'm looking for code or a description of an algorithm for determining the score of a poker hand when deuces are wild. I'd like code that is not encumbered by license fees, GPL, patents, etc. I know a couple of ways to approach this, but I'd prefer to not write the code if it is already available somewhere. So I'd appreciate it if the ...

How do I programmatically calculate Poker Odds?

Hello, I'm trying to write a simple game/utility to calculate poker odds. I know there's plenty of resources that talk about the formulas to do so, but I guess I'm having trouble translating that to code. Particularly, I'm interested in Texas Hold-em ... I understand that there are several different approaches, one being that you can ...

Using RegEx to get Poker Hand score

I'm developing a poker game in C#. At the moment I'm trying to get the players hand score using RegEx. I search the string (composed of the cards suit and number) and look for suits or numbers to match the RegEx. If i get 2 matches then the player has a pair, 3 matches he has 3 of a kind. I have 3 classes at the moment, a Card class (w...

Design Pattern: Parsing similar, but differing schemas in text files.

Hi there, thanks in advance for your help. I am wondering if there is a (design) pattern that can be applied to this problem. I am looking to parse, process, and extract out values from text files with similar, but differing formats. More specifically, I am building a processing engine that accepts Online Poker Hand History files fr...

Building a Texas Hold'em playing AI..from scratch.

I'm interested in building a Texas Hold 'Em AI engine in Java. This is a long term project, one in which I plan to invest at least two years. I'm still at college, haven't build anything ambitious yet and wanting to tackle a problem that will hold my interest in the long term. I'm new to the field of AI. From my data structures class at ...

JAVA- Function to determine whether a poker hand is a straight?

Hello, for a homework assignment I was given a Card class that has enumerated types for the Rank and Suit. I am required to compare two pokerhands (each hand is an ArrayList of 5 cards) and decide the winner. The isStraight() function is really bothering me, because I have to start over the count after the Ace. For example, QUEEN, KING...

Need Help Determining Poker Hand (One Pair)

This is just part of the code, so never mind if you can't see the arrays or anything else. The idea is that I have 5 cards and I want to determine which ones are pairs. Does anyone understand what I mean? boolean IsOnePair=true; int [] cont = new int [6]; for (int i=0;i<Game.length;i++) { cont[Game[i].getValue()] ++; } for (int i...

Parsing in Ruby (on Rails)

I want to write a Rails app to assist me with my online Poker. I play on PokerStars, and there is text data available for each hand that is played. The format it comes in is this: PokerStars Game #27457662450: Tournament #157033867, Freeroll Hold'em No Limit - Level IV (50/100) - 2009/04/24 20:39:44 ET Table '157033867 830' 9-max Seat ...

NP-Hard? Algorithmic complexity of online poker collusion detection?

What's the best way to describe the algorithmic complexity of collusion detection for a ten-million-player online poker site? Assume (I don't think these assumptions make much difference so feel free to ignore them, but just to clarify): That the site has 10,000,000 registered users. That these players have played a total of 5 billion...

Optimizing Lookups: Dictionary key lookups vs. Array index lookups

I'm writing a 7 card poker hand evaluator as one of my pet projects. While trying to optimize its speed (I like the challenge), I was shocked to find that the performance of Dictionary key lookups was quite slow compared to array index lookups. For example, I ran this sample code that enumerates over all 52 choose 7 = 133,784,560 possib...

Where can I operate a PokerBot (and other games) legitimately?

Hi everyone. I'd like to build a PokerBot (and a few other games) for the intellectual challenge. However, I only want to do this in an ethical and legal way. So, I need a game server where all players and the game operator know that I'm running a pokerbot. Where that's not cheating but the norm. Perhaps even where being a human is agai...

How can I teach a computer system how to play poker?

At first I have 5 cards by random, of course. Only one time I can change and also l have already taught [the program] the poker rules in my system. My problem is how can I choose "I don't need this card or there are cards?". I can change by myself but computer doesn't know. I think maybe it is difficult but have you guys any help to offe...

Omaha Hi Hand Evaluator

Hi, currently im trying to port Keith Rule's Texas Holdem Hand Evaluator to Omaha Hi: Texas Holdem Evaluator and Analysis More Analysis Part1 More Analysis Part 2 After thinking more about the algorithm, I found a solution which gives me the right percentages for the hands and everyhting is fine.. But it's really really slow. How c...

finished writing a poker hand evaluator looking for a new project

just finished writing a five card poker hand evaluator in C++. now im looking for a new project about the same level of difficulty. maybe a very simple DOS command parser? ...

Does an open-source poker-related math library exist?

I would like to develop a poker odds application that can give the probability of various game situations. Since the application will be mostly statistical analysis, I figured I would see if someone else had already written a library that implements the required mathematics. I would prefer cross-platform open-source in C++, but that's n...

Object representation of betting rounds at poker

Hi, I'm writing a HandConverter of a poker hand. This is my first project and I'm trying to do it right from the beginning. I got already the most parts, like lists of players, their position, stack sizes, cards for different boards, what game is being played and so on, but I struggle with the representation of the betting, especially t...

get every two card combination from subset of standard deck

Hi, I have a standard deck of cards and then have removed a few, from the remaining cards I want to calculate all of the possible two card combinations. For example with 47 cards there is 47 choose 2 combinations. Can anyone think of an efficient way to do this other than foreach(card){ combinations.add(card, card +1) } Thanks ...

Computing unique index for every poker starting hand

As there are 52 cards in a deck we know there are 52 choose 2 = 1326 distinct matchups, however in preflop poker this can be bucketed into 169 different hands such as AK offsuit and AK suited as whether it is A hearts K hearts or A spade K spades it makes no difference preflop. My question is, is there a nice mathematical property in whi...

Is Collections.shuffle suitable for a poker algorithm?

Hi, there is a poker-system in java, that uses Collections.shuffle() on all available cards before the cards are dealt. So a collection of 52 cards 2-9, J, Q, K, A in 4 types. After that we Collections.shuffle(). The problem is, that it seems (until now we didn't have big statistic, it's possible that we only see a lot of statistic i...

Defeating a Poker Bot.

There is a new Open Source poker bot called PokerPirate. I am interested in any creative ways in which a web application could detect/thwart/defeat a poker bot. (This is a purely academic discussion, in the same spirit that PokerPirate was written.) ...