Jump to content
  • Advertisement
Sign in to follow this  
arithma

Probability Question in Games

This topic is 5056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I created this DOS Based game where the user inputs one of the numbers between 1 and 3 inclusive. 1, 2, 3 denote Ace, King, Queen respectively. There are initially 3 of each. The user continues to pull cards until there is no more than one kind. The score is added upon by the odds of being a correct bet. (Ace, King, Queen) Example: The Distribution is (3,3,2) The user bets on Ace which indeed gets pulled. The score is added upon by (3+2)/(3) I am interested in the maximum score that can be achieved (which both relies on the cards the computer draws and the user bets on) I will assume the player bets on the correct card in all cases, so I, heuristically, thought that the maximum would be if the drawn card was the one with lowest probability So the sequence would be: (2,3,3) Ace Cumulative Sum = 2 (1,3,3) Ace 5 (0,3,3) Ace 11 (0,2,3) King 12 (0,1,3) King 14 (0,0,3) King 17 End But when I ran a random card better ( about 10,000 iterations there were some 5 to 10 peculiar situations where it score more than 20!) Any Idea?

Share this post


Link to post
Share on other sites
Advertisement
I might be wrong here, but I think you've made a mistake in how you calculate the probability of a card being picked.

Using your example of picking an Ace from the (3,3,2) distribution, you said that the probability of a card being an Ace is 3/(3+2) or 3 out of 5. But that's wrong. There are 3 Aces available and there are a total of 8 (3+3+2) cards in the pack. Thus the probability of a card being an Ace is 3/8. So your scoring algorithm is flawed.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!