JavaScript is required to use Bungie.net

Service Alert
Destiny 2 will be temporarily offline tomorrow for scheduled maintenance. Click here to view latest Destiny Server and Update Status.

Forums

12/17/2013 4:47:26 PM
1
I'll see if I can wrap my head around it, but I'm a little confused. Does the hand dealt always have a set of 4 of a kind, 3 of a kind, 2 of a kind, and singles, or is it that you're dealt a set number of cards and there is a possibility of having 4 of a kind, 3 of a kind, etc.?
English

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by Hylebos: 12/17/2013 5:38:10 PM
    The latter. I was attempting to make an AI that could play the card game [url=http://en.wikipedia.org/wiki/Asshole_(card_game)]Presidents and Assholes[/url] for extra credit in my Networking Class. We designed a Client and a Server that could play the game using a Networking Protocol we designed as a class you see, and while our clients were required to have an automated mode that could play the basic game, we were offered extra credit if we could program it with some strategies that would increase that client's chances of winning. In Presidents and Assholes, the goal is to get rid of your entire hand, and everybody is roughly dealt the same number of cards at the beginning of the game, so from an outsider's first impression you might be able to estimate who is about to win based on the number of cards left in their hand. This is well and good for most instances of small hands, but realistically it doesn't matter how many cards you have in your hand, but how many different types of face values you have amongst all your cards. The dominant strategy of the game is to play all the cards of a given face value that you own when you are given the chance to do so (aside from 2's, they're important to save). So if I'm dealt a hand of 13 cards and I have 3 threes, 2 fives, 3 sevens, 1 Jack, 2 kings, 1 ace, and 1 two. I have 7 types of face values amongst the cards I have, so the quickest I can win the game is in 7 turns. Technically 6, as the two automatically resets the round and lets me play again immediately. So now that you have the full background information, you might see where solving the problem I presented might be useful. I wanted some data on the average "Plays to win" for a particular hand size, and I had already written an algorithm that could generate every combination of 4 of a kind, 3 of a kind, 2 of a kind, and singletons for a particular hand size, I had hoped to then weight each combination by it's respective probabillity of appearing for that hand size and then come up with a nice table of "Average Plays to win" given a hand size. Unfortunately while I found some help on the [url=http://en.wikipedia.org/wiki/List_of_poker_hands]List of Poker Hands[/url] wikipedia page because some beautiful person wrote out the math used to find each probabillity and I tried to repurpose that for my problem, there was still something wrong with my solution. The combined probabillities of all the combinations I found weren't adding up to 1, so I probably messed something up with the frequency function. It doesn't matter either way, the project is turned in and I don't think it was a tool that my AI would have used directly (though there's a fun modification you make where you take into account all the cards played and all the cards in your hand in order to try to calculate the most accurate estimation of the average plays to win for a given hand size), this was more so for my information so decisions like "My AI should hold onto his 2's until players have 6 or less cards" would be more informed. Unfortunately the card game does not have a ton of interaction between players, so it's hard to write an AI with a strategy for such a random game with such a straight forward dominant playstyle which is incidentally the easiest to implement for an automated mode.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon