Michigander: A Euchre Engine

 


I have started a Github repo for a set of functions to carry out the game of Euchre. Please check it out if this is something you are interested in.

I'm mainly doing this to stay sharp on my Python skills and flush out any holes in my programming.

My strategy is to get a working game going in the terminal and then work on a OOP implimentation.

https://github.com/JacobMiske/michigander

Euchre or eucre (/ˈjuːkər/) is a trick-taking card game commonly played in Australia, Canada, New Zealand, Great Britain, and the United States. It is played with a deck of 24, 28, or 32 standard playing cards. Normally there are four players, two on each team, although there are variations that range from two to nine players.

Euchre was responsible for introducing the joker into the modern deck of cards. The Joker Deck was introduced to Americanized Euchre around 1860 with the joker acting as a top trump or best Bower (from the German word Bauer, "farmer", denoting also the Jack – see Bester Bube).[1] Euchre is believed to be closely related to the French game Écarté,[2] the seventeenth-century game Loo, and the 19th-century game Juckerspiel. It may be sometimes referred to as Knock Euchre to distinguish it from Bid Euchre.

https://en.wikipedia.org/wiki/Euchre

Poker Solver

 


Made dinner for Ally and I last week, linguine with vodka sauce, broccoli, chicken, and cake for desert

In the spare evenings and weekend hours, I continue to do problems posted on projecteuler.com. It's a wonderful website I think I've mentioned before on this blog. The fifty fourth problem involves determining the winner of a hand of poker given two player's hands of five cards each. In person, this would involve both players laying down their cards, announcing their best arrangement (two pair, flush, high card, etc.), and then accepting or not accepting victory based on the other player.

When handling this computationally, every possible outcome must be accounted for in the program. The most difficult part is determining the winner of a tie, It is comparatively simple to say whether five cards can achieve a straight, a flush, or simply a high card; but to determine every tiebreaker is difficult.

The worst way to handle ties is to create a case in the program for every sort of tie. This would be exhaustive and inefficient. Instead, I opted to evaluate ties based on the type of tie reached. If the two players were tied for three of a kind for example, the tie breaker code would determine which value of card each player had three of a kind (queen, 3, jack, etc.), and then immediately determine the winner of the hand of cards. This was a much faster implementation.


The cake I made before being cut


Baptist church near Davis square has this sign up. 


Playing euchre with housemates, my hand had a four of a kind, unfortunately not that great


Time out in RI

  I visited the state of Rhode Island for the first time two weeks ago. It was a great time and I was able to hit up a beach. The weather wa...