*****DISCLAIMER: The following will be boring as fuck for the majority of you to even read, and most won't even understand, so I wouldn't recommend you proceed, I am just placing this here for archiving purposes incase my computer crash and burns since I need somewhere to store it*********
So I'm going to try to go about coding this to dust off my skills, but I figured I'd toss this to other coders to see how you guys would approach this problem and in what language (though language probably doesn't matter much).
Challenge 0:
So your job is to create a program, that when run, will output 5 random cards out of a 52 card deck,
Challenge 1:
After outputting the 5 cards, then prompt the user for input asking, "out of the remaining 47 cards, what is the best hand?'
This is based on hold'em rules so the 5 dealt out would be the community cards and your program would have to determine what the best hand is then check the user's input, if right, it says so, if wrong, it tells the user and gives the option to try again or give up and get the answer.
The program checks for redundant/duplicate hands (so entering any combination of the winning hands suffices see Example 1), split pot due to community win (example 2), and other various scenarios.
Example 1:
Computer deals out: 7s 2c Kh 10h 9d
What is the best hand?
(At this point, the user is to enter the answer in Xy Xy format [X being card, y being suit])
Answer computer wants to see/checks for: Qy Jy (y indicating that any suit the user enters is valid i.e. Qc Jc, Qc Jh, Qh Js, etc...)
Example 2:
Computer deals out: 10s 10c 10d 10h As
What is the best hand?
In this case, no hand would be a winning hand as the community would win every case and it would be a split pot.
So the user could enter something such as: Xy Xy (that is, anything is a 'winning' hand) or 0 (indicating that there is no 'best' hand).
---------------
Challenge 2:
Now taking the program, modify it such that the computer deals out in the hold'em fashion that is,
Burn 1 card
3 random cards, (flop)
Burn 1 card
then 1 random card, (4th st/turn)
Burn 1 card.
then another random card. (5th st/river)
and during each stage, the user is prompted to guess what the best hand is and the computer checks/recalculates.
----------------------
Challenge 3:
Now add to the program such that each simulation is written to a text file and stored in a database for stat keeping, the stats which you keep are up to you, but a few basic ones you might want to try to add:
% guessed correctly (also represent this % as a fraction of x/X)
% of best hands determined by the flop (that is, 4th and 5th st had no effect on the outcome)
% changed by 4th
% changed by 5th
You might also want to break down which hands are the nuts most often such as full house, straight flush, etc...
--------------------------------------
Challenge 4:
Now, modify the program to properly deal out in 3 modes: Heads-up, 5-man, and 9-man.
So the program will deal out 2 cards to each player, then burn 1 card, lay out a flop, and then the game will progress as in challenge 2.
Now you are to guess the nuts every step and at the end, it will be revealed if any of the players were dealt the hand.
--------------------------
Challenge 5:
Modify the database to stat track how often the 'nuts' are dealt out, and track the most common winning hands in all 3 scenarios, how often 4th and 5th impact the game in each mode (that is, change which of the players has the 'nuts' of the cards dealt out), and which combination of hands holds the greatest advantage during: preflop, flop, turn, river (example 3).
Example 3: (these numbers are made up just to demonstrate)
AA (in 9 man table with no folds) Preflop - 100%, Flop - 80%, Turn, 60%, River, 30%
--------------
Challenge 6 (bonus):
Now modify the program (example 4) or do some statistical/stochastic analysis (example 5) which is original from that listed in this challenge (pretty easy).
Example 4:
Modify the program in such a way that you remove the entire user-input step and the entire process becomes fully automatic and then all you're doing is just running a simulation non-stop of a 9-man table constantly dealing out hands to stat track and get an idea of how poker hands are played out.
(this is just an example, you don't have to do this, but any other original idea is welcomed)
Example 5:
Change the database in such a way that you are able to track how often a person receives a winning hand related to their position on the table (dealer, big blind, small blind, etc...) to see if there is any relationship,
OR use the database to create separate charts relating the strength of hands based on the size of the table, like for example, Ac 9c is a much stronger hand in a heads up match than it is in a 9-man table, infact, in the latter, depending on what type of poker you are playing (cash, SNG, MTT) the hand should never even be played (figure 1).
Figure 1:
http://i.imgur.com/tttcf.jpg
--------------
Anyone that wants to work on this with me or ask me for help (in how to approach the problem or clarify any parts of challenges that you don't fully understand, but not debug code) is free to join, I'm going to be coding this in C++ and porting over the data onto a text file and reading it in with SQL.
Challenge 0 can be done by a beginner, but after that, it gets kind of advanced. Good luck.
Notes:
This program would be pretty useless overall as far as helping you in no-limit, but would drastically give you a much better understanding of the game in limit hold'em (though I'm mainly doing this for fun since I rarely play limit anyway).
No-limit hold'em requires a strong analysis of position + raising (how much, how often, at what stage, etc...) however, such analysis is also much more complex as it cannot be simulated by an AI and the stats need to be collected by observing hundreds of thousands of tables in thousands of different settings.
Recent Comments