Questions tagged [poker]

Questions relating to development on the subject of all variants of poker.

Questions in this category contains all aspects of development relating to poker - ie. hand evaluation, game engine, statistics, etc.

464 questions
6
votes
3 answers

A Better C# Poker Framework Design?

I'm writing a poker framework in C# and I don't like the design I currently have. My goal is to have a game engine that can play multiple AI agents against each other in batch mode very quickly, and play multiple AI agents vs. multiple humans…
Wesley Tansey
  • 4,555
  • 10
  • 42
  • 69
5
votes
1 answer

Porting existing C++ code to R

I would like to port the SpecialK Poker Hand evaluator to R. I think this should be relatively easy using the Rcpp package, but I have no idea where to begin. The existing tutorials seem to focus on developing new C++ code for use in R. In this…
Zach
  • 29,791
  • 35
  • 142
  • 201
5
votes
0 answers

How to create a map of settlement for a game of poker algorithmically containing the least number of transactions?

Poker is a zero-sum game. This means that the amount of money going out of the table is equal to the amount going in. I mentioned poker here because that is what I need the solution for, but the question applies to any zero-sum game. Let's say that…
dominikduda
  • 325
  • 3
  • 16
5
votes
3 answers

Designing a hand history class for Texas Hold'em in Java

I am trying to come up with a Java hand history class for Texas Hold'em and wanted to bounce an idea off here. Requirements are that every action is stored and there is an efficient way to traverse each HandHistory object (which would represent a…
rndapology
  • 142
  • 6
5
votes
7 answers

Poker Hands in Java

Is there any easy method to compare two poker hands? I'm going about this pretty naively, so if anybody has experience doing this, it could be helpful.
Ben B.
  • 3,706
  • 5
  • 26
  • 27
5
votes
3 answers

Cards representation in Prolog

I'm trying to learn Prolog. This are my first steps with this language. As exercise I want to write program which can recognize some poker hands (Straight flush, Four of a kind, Full house etc.). I'm looking for good card representation in Prolog. I…
Adam
  • 2,254
  • 3
  • 24
  • 42
5
votes
3 answers

Comparing the rank of cards in a hand

I have a homework assignment that was two parts. The first part was to make a program that puts a vector of 52 card objects when you create an object for the class Deck. I did this by making the deck first give each card the number 1-4 for suit and…
David Bernal
  • 61
  • 1
  • 5
5
votes
7 answers

Is there a simpler way than this to calculate a straight in poker?

I have an algorithm for calculating whether a player's hand holds a straight in Texas Hold'em. It works fine, but I wonder if there is a simpler way to do it that does not involve array/string conversions, etc. Here's a simplified version of what I…
Robusto
  • 31,447
  • 8
  • 56
  • 77
5
votes
11 answers

Why does my isFullHouse() method also accept a simple three-of-a-kind?

I am having problems with my full house method. I thought it was as simple as checking for three of a kind and a pair. But with my current code i am getting a full house with only a three of a kind. Code for isFullHouse() isThreeOfAKind() and…
LKANL
  • 69
  • 1
  • 2
5
votes
2 answers

Regex to calculate straight poker hand?

Is there a regex to calculate straight poker hand? I'm using strings to represent the sorted cards, like: AAAAK#sssss = 4 aces and a king, all of spades. A2345#ddddd = straight flush, all of diamonds. In Java, I'm using these regexes: regexPair =…
Topera
  • 12,223
  • 15
  • 67
  • 104
5
votes
2 answers

Monte Carlo method for calculating poker equities

I started to learn C language on my own and decided to build a program that calculates poker equities. I'm trying to calculate equity with Monte Carlo, but I get wrong results. So here is an example: I'm holding JsTs (Jack of spades and 10 of…
deville
  • 53
  • 1
  • 5
5
votes
7 answers

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…
tony
  • 59
  • 1
  • 2
4
votes
2 answers

Poker lobby architecture

I have created an online poker system using WCF net.tcp and WPF for the front end. It works great, but I feel there are some things I can improve upon when I convert the front end to Silverlight. One of the questions I have for fellow architects is…
NickV
  • 549
  • 7
  • 17
4
votes
2 answers

Can I do better than binary search here?

I want to pick the top "range" of cards based upon a percentage. I have all my possible 2 card hands organized in an array in order of the strength of the hand, like so: AA, KK, AKsuited, QQ, AKoff-suit ... I had been picking the top 10% of hands…
Joe
  • 4,852
  • 10
  • 63
  • 82
4
votes
4 answers

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 …
alamodey
  • 14,320
  • 24
  • 86
  • 112
1 2
3
30 31