Card games sevens

broken image
broken image

For example to see what the 1st card played by the 4th player, you could enter the following, pgs. The cards_played value is a n by 4 numpy array with each row corresponding to players 1-4 each playing a card or passing. The partial game state (pgs or partial_gs) is a dictionary with the following keys: cards_played, player_turn, player_hand, playable_cards, and table. Just write a new human_turn.py file that takes the partial game state as an input and returns one of the playable cards. In the version of the game that we'll play, you must play if you have a playable card on your turn.

broken image

You can download a sevens game for iOS at ' ' Note that some versions of the game allow you to pass 3 times even if you could play. You can download a sevens game for android at ' '. A good explanation of how to play can be found at ' ' but I suggest actually playing a few rounds to get a good sense of strategies you might want to try. Many of you have never played sevens, but rest assured it is a very simple game and you will get the hang of it in no time. 3 AI players using a simple random card selection strategy. This project was a competition amongst my friends and me to see who could write an algorithm to produce the highest win percentage in the card game Sevens.

broken image