GetACoder.com

 
 

Home | My Account | Post Project | Browse Projects | RSS Feeds New!

 

Simulation In Low Level Language

 
 
Download the Free Step-by-Step Guide
     
Budget: $ 300-1000
Status: Closed for Bidding (selected user csaftoiu)
Project Creator:
gamealgorithms  
  1.00/101.00/101.00/101.00/101.00/101.00/101.00/101.00/101.00/101.00/10 1 reviews
Required Skills: Assembly / Machine language, C++ / C, Programming
Attached Files: (None)
 
post new project
email this project
discuss this project
send private message to project creator
more options

NEW

SEND

DISCUSS

CONTACT

OPTIONS

Description
The goal of this project is to be able to run simuluations and compare hands of poker to other hands of poker, in a game called "omaha"

By a player's point of view a player holds 4 cards, and the "board" holds 5 cards. A player must choose exactly 2 cards from his hand and 3 cards from the board to make his strongest hand.

From a programmers standpoint in calculating the best hand, each player represents 4c2 * 5c3 possibilities of hands (60 possibilities) in which the computer needs to find the combination with the highest hand ranking.

to calculate a hand strength a hand must be sorted, then ranked in one of 4197 hand strengths. A hand strengh can be calculated as the rank of the hand in poker for the first digit .. and then the subsequent card ranks for each additional digit. For example ..

[2 13 5 4] would represent "two pair kings over 5s with a 4 kicker"
[6 10 6] would represent "full house tens over 6s"

in total there are 4197 possible hand ranks

8 straight flush [5-14] (10 combinations)
7 four of a kind [2-14] [2-14 xpn] (156 combinations)
6 full house [2-14] [2-14 xpn] (156 combinations)
5 flush [2-14] [2-14 xpn] [2-14 xpns] [2-14 xpns] [2-14 xpns] (13C5 - 10 for exclusion of straight flushes 1277 combinations)
4 straight [5-14] (10 combinations)
3 three of a kind 13C3 (286 combinations)
2 two-pair 13C3 (286 combinations)
1 one pair 13C4 (715 combinations)
0 no pair 13C5 less straights (1277 combinations)




The program would take in 2-9 player's hands and either 0-4 cards on the "board", and a list of "dead cards" which are removed from the 52 card deck.
Each card is from a deck of 52 unique player cards such that no two players can have the same exact card. It also means that once a player has a card it is not possible for it to come out on the board.
For each run of the simulation the program would randomly assign card for the missing cards on the "board" The random cards are chosen from the remaining cards in the deck. The program then figures out which player has won the hand, or which players have tied for the win and keeps a tally.

To program first must generate a list of the 4197 possible hand ranks.
The list would look something like this

8 14 (straight flush to the ace)
8 13 (straight flush to the king)
8 12
8 11
8 10
8 9
8 8
8 7
8 6
8 5 (straight flush to the five)
7 14 13 (four of a kind aces with a king kicker)
7 14 12 (four of a kind aces with a queen kicker)
etc ..


each card is represented by a suit and a value. An ace is generally high so its value is 14, king 13, queen 12, jack 11 and the rest of the cards the number on the card. There are four suits (0 = clubs, 1 = diamonds, 2 = hearts, 3 = spades)
the logic for classifying a hand is as follows (this assumes hands are sorted by value high to low):

8 all five cards have the same suit, and the ranks are equal to one of the following [[14,13,12,11,10],[13,12,11,10,9],[12,11,10,9,8],[11,10,9,8,7],[10,9,8,7,6],[9,8,7,6,5],[8,7,6,5,4],[7,6,5,4,3],[6,5,4,3,2],[5,4,3,2,14]]
7 four cards have the same value
6 three cards have the same value, and the other two cards have the same value
5 all five cards have the same suit
4 the ranks of the cards are equal to one of the following [[14,13,12,11,10],[13,12,11,10,9],[12,11,10,9,8],[11,10,9,8,7],[10,9,8,7,6],[9,8,7,6,5],[8,7,6,5,4],[7,6,5,4,3],[6,5,4,3,2],[5,4,3,2,14]]
3 exactly three of the cards are the same and the other two cards are not the same as each other
2 two instances of exactly two cards are the same with one card being different
1 no two values are the same, and NOT (all suits are same)

In the rank order .. the hand strength is first digit, and values of the hand rank are the next digits until a unique combination is reached .. such that for a straight to the 5 all that is necessary to identify a hand is "4 5" because all straights to the 5 are equal, for a flush you'll need more digits as there are more unique hands so a flush would need 6 digits, 5 followed by the ranks of the five cards in the hand


The program would need to take each player's hand and break it down into the 60 combinations. For each combination it needs to classify the hand as one of the 4197. Each player's hand is represented by the best ranking of the 60. Finally all of the player's best rankings are compared with each other's. If a player is the sole winner he gets the whole "pot" which can be represented as 1 point. If he shares the win he gets a fraction of that point. After 10,000 runs the statistics of how often each player's hands wins is returned as the result of the program.
This program needs to be written in a low level language (probably assembler or maybe C) in order to achieve the proper speed. The necessary goal is to have the program run a simulation of 10,000 hands between 3 players and get a result within 1 second. This would be done on a Dual Quad-Core Xeon P4 2GHz machine. If you can somehow manage to use all the processors then fantastic, in the end it needs to give the result within one second.

I have written this logic in python it just doesnt run fast enough, but I can send you this code if you want it.

Reminder
You may not start working in this and any project before your bid is accepted. Any user who violates this policy may have their account permanently suspended.

 Bids Received (11)   Shortlist (11)   Declined Bids (0)   
Average bid amount:   $513.64   Average delivery time:   12 Day(s)
Place Bid | Post Similar Project | Send Project | Message Board(0) | Contact gamealgorithms

Order by:

 

Remember that contacting the other party outside the site (by email, phone, etc.) on all business projects (before the project is awarded) is a violation of our terms of use. We supervise all site activity for such infringements and can immediately expel transgressors on the spot, so we thank you in advance for your cooperation. If you notice a violation please help out the site and report it. Thank you for your help.
 

          nbsp;    
send private message
De-Shortlist
Decline Bid
Premium User  
roybuet  
Dhaka, BD
location
US$600
bid amount

9.85/109.85/109.85/109.85/109.85/109.85/109.85/109.85/109.85/109.85/10
(132 reviews)

feedback

7 day(s)
delivery time

 
 
Please check PM. regards
Bid Time: 01-02-2008 06:38
 
send private message
De-Shortlist
Decline Bid
mkp  
Nancy, FR
location
US$400
bid amount

9.67/109.67/109.67/109.67/109.67/109.67/109.67/109.67/109.67/109.67/10
(6 reviews)

feedback

5 day(s)
delivery time

 
 
(please check pm)
Bid Time: 01-03-2008 07:07
 
send private message
De-Shortlist
Decline Bid
soscpd  
Rondonopolis, BR
location
US$700
bid amount

7.75/107.75/107.75/107.75/107.75/107.75/107.75/107.75/107.75/107.75/10
(4 reviews)

feedback

5 day(s)
delivery time

 
 
ANSI C, C++ or assembly, as you wish. Call me back on PMB. Regards Rafael
Bid Time: 01-01-2008 21:40
 
send private message
De-Shortlist
Decline Bid
dralexccf  
Singapore, SG
location
US$300
bid amount

10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(2 reviews)

feedback

10 day(s)
delivery time

 
 
please see PM.
Bid Time: 01-03-2008 20:28
 
send private message
De-Shortlist
Decline Bid
Logical65  
Tifton, US
location
US$450
bid amount

1.00/101.00/101.00/101.00/101.00/101.00/101.00/101.00/101.00/101.00/10
(2 reviews)

feedback

15 day(s)
delivery time

 
 
Hi, I can do this for you without a problem. Please review your PM
Bid Time: 01-01-2008 13:23
 
send private message
De-Shortlist
Decline Bid
swml  
Dhaka, BD
location
US$500
bid amount

(No Feedback Yet)
feedback

10 day(s)
delivery time

 
 
We have a very strong C/C++ And MASM Team
Bid Time: 01-02-2008 00:23
 
send private message
De-Shortlist
Decline Bid
ilikefreelance  
shanghai, CN
location
US$500
bid amount

(No Feedback Yet)
feedback

10 day(s)
delivery time

 
 
hi ,plz check pmb
Bid Time: 01-02-2008 04:37
 
send private message
De-Shortlist
Decline Bid
dachary  
Paris, FR
location
US$500
bid amount

(No Feedback Yet)
feedback

7 day(s)
delivery time

 
 
I'm the author of pokersource . info which you probably already know. Let me know if you're interested to work with me.
Bid Time: 01-02-2008 07:41
 
send private message
De-Shortlist
Decline Bid
brucewang  
xian, CN
location
US$400
bid amount

(No Feedback Yet)
feedback

10 day(s)
delivery time

 
 
I can do it well. Trust me, please!
Bid Time: 01-02-2008 10:03
 
send private message
De-Shortlist
Decline Bid
ejazinfo  
pune, IN
location
US$700
bid amount

(No Feedback Yet)
feedback

30 day(s)
delivery time

 
 
i can do this .
Bid Time: 01-02-2008 12:54
 
send private message
 
csaftoiu  
Providence, US
location
US$600
bid amount

(No Feedback Yet)
feedback

20 day(s)
delivery time

 
 
I'll do the project top-notch for you!
Bid Time: 01-04-2008 03:25
 

 


 
Get the Free Step-by-Step Guide on How to Use GetACoder
The act of outsourcing projects has become easy in the past few years thanks to GetACoder. However, our team aims at making the whole process even easier. So, it has now come the time to provide you with a step-by-step guidance on how to use this service and succeed in the outsourcing world totally for FREE.

It doesn’t matter if you are a more experienced user or a novice; using GetACoder will become even simpler with the help of this E-book. There are two major sections: a Buyers section and a Coders section.

Buyers will learn:
  • How to outsource safely
  • How to pick the best freelancers
  • How to manage time and money

Coders will learn:

  • How to get the best projects
  • How to secure their payments
  • How to build a long-lasting relationship with buyers

    …and  MUCH MORE
Clear examples and pictures illustrating key situations, great tips and real testimonies of some of our best users… all in this Outsourcing Guide.  So don’t loose the outstanding opportunity to download GetACoder FREE E-book.
The Outsourcing Revolution: Why It Makes Sense and How to Do It Right
The Outsourcing Revolution: Why It Makes Sense and How to Do It Right
What is GetACoder?

GetACoder.comGetACoder is a leading Global Services Marketplace doing business in more than 200 countries. Our unique system accelerates your time to market and provides your business with key competitive advantages. When you use GetACoder you are stretching your budget and saving as much as 60% over traditional outsourcing. GetACoder is changing business, now it's no longer about what you own or build but which resources and talent you can access. With GetACoder you reduce expenses, increase efficiencies, aggressively grow your business, and create a sustainable competitive advantage. GetACoder makes outsourcing to any part of the world an easy task! With GetACoder it's simple to outsource any business project, gain access to global talent and manage projects online.

One of the main advantages of GetACoder is the low labor cost. The typically rates are about seven times lower than the ones in the US or Europe. Posting a project at GetACoder allows the right professional or company to find you and to bid for your work. We are building a reputation for exceeding our customers' expectations and for becoming an extremely cost effective way to outsource work. Use GetACoder when you want to save money, increase efficiency or accelerate the development of your project. With GetACoder you focus on growing your business and let others do the tedious work. Post your project on GetACoder for free. Find out why people outsource projects with us day after day.

Thousands of Satisfied Customers - Submit/View Quotes


-Unlike other freelance sites who are more interested in earning money both from the buyer and seller than giving genuine service, GetACoder is an entirely innovative approach and really cares for their customers and allows every one to grow to the greater heights.. - jinu
-Good online resource to earn a considerable income. - dhwani
-Getacoder is an excellent source for earning good money. We are very happy to work through Getacoder. Thank you for providing such a service for us. - phspace
Report Violation    Privacy Policy     Affiliate Program    Terms of Use    Contact Us    Help      GetACoder.com Latest Projects RSS Feed
© 2004-2008 GetACoder. All rights reserved.