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


Apartment Hunting and Questionable Designs

 


Ally and I are looking for an apartment. Getting an 2 bedroom apartment within walking distance of the Red Line is expensive, nearly 4 times as expensive as a mortgage on a 5 bedroom, 3 bath home in rural Michigan. So we are taking our time and scoping out various options. We have been on a handful of tours now. Nothing in particular has been striking thus far. Most of the places we have seen are floors of multi-family homes nestled tightly together on 1/16 acre plots. Somerville is a dense neighborhood. In one case we visited an actual 'apartment building', it was a bit old and showed its age in places. The broker from Coldwell hurried us through an apartment in the building in which a resident was present (illegal if the tenant object according to COVID regulations, I did not know prior someone would be there and/or if they wanted the broker to stop by). As I asked the broker if a particular component in the apartment worked, the resident looked me in the eye and nodded 'no'... the broker did not see this... the search continues.


As a general principle, I think it's good to ask questions even when things seem normal and satisfactory. Things can always be a bit better right? Or a bit safer? Perhaps the way we used to do that was inefficient? Dangerous?

I was looking at this building while on a run through Somerville. It's been around for decades. I was struck by the diameter of the supporting pillars underneath the building. Something in my head told me that the supports seemed inadequately built. I sat down at the dinner table later and calculated the critical load for buckling using some ol' statics knowledge from college. I made some assumptions and my 'back of the envelope' calculation showed me the building's supports have at least a safety factor of 5, which is not great but perhaps acceptable for static buildings that do not change in mass often. 



Another building I saw on my run had these signs outside. I feel like they probably got tired of updating the sign after a while...

COVID won't end immediately, it'll be weird first

 


Poster outside the MIT Z center
It'll be weird at first

Sometime in summer 2021

There's someone in the store without a mask. You think to yourself, "Oh bother, one of those people, I bet they're an antimasker... tsk"... you think for a moment about what you heard on the news last night. The governor announced that the vaccination rate in the state is at 65% and rising. And while public health officials state plainly and openly that mask use is still incredibly important and helps reduce spread, you find that many individuals choose to only wear masks when inside public buildings. Some people wear buttons that announce they are vaccinated. You wonder briefly if you still need to wear your mask, you received your last dose of the vaccine two weeks ago.

A few weeks later, you find yourself in the same store. You're picking up some apples when someone reaches past you to grab an orange. They aren't wearing a mask! But again you remember hearing the vaccination rate is at 73% in the state and rising. Public health officials are still stating the importance of mask use to reduce spread of all respiratory diseases. You live in a more well-off part of town. You're fairly certain this person reaching across you has received the vaccine by now. All your friends have gotten it. You still wear your mask. It's easy and the right thing to do right? It's not really a hassle and it keeps your face warm.

A few more weeks pass, you start getting invited to join old friends out to dinner at some of the restaurants that are still open in the nearby commercial area. Half of the businesses are closed and empty. You still wear your mask but it's hard finding another person at the store who wears one nowadays. CNN has stopped posting daily case rates and death numbers on the TV. People start talking about 'the end of COVID' when it's still very much a problem in other parts of the country and the world. You want to talk about COVID sometimes with friends but it just makes you so sad and cyanical. What else is there to talk about? You and your friends haven't seen each other in such a long time, that when you arrive at the restaurant you almost bump into them before you recognize each other. You laugh about it behind a facade of different emotions. You take off the mask to eat.

A couple more weeks pass, you forget your mask in the house as you leave. As you turn to retrieve it, you reconsider. "It'll be okay, I don't really need it right?". You go to the grocery store without it. There is some guilt and anxiety but it fades slowly away as you check out and leave.

COVID won't end immediately, it'll be weird at first

Niche Gym Idea


Bread made last night, served with some olive oil and honey butter

To my surprise, there are a lot of videos out there on YouTube of big, strong folks talking about the difference between a regime of manual labor (think chopping wood, digging holes, breaking rocks) versus a conventional workout routine at a gymnasium (dumbbell curls, bench press, squats). Here is an example . The speaker, Johnny, talks about the fact that human ancestors lived a much more manual and physical life 100 years or further back. Spending one hour a day or less on physical exertion of any kind is a far cry from these past times of human existence. Inasmuch, I was wondering if someone like myself who does a lot of desk work, computer work, etc. could make the time to get some form of manual labor into my week. One example is kneading dough, which I did a bit of last night when I made some focaccia bread. However, making dough is not that hard compared to other manual labor. It was fun and tasty though. 

My brain wandered onto the idea of a niche gym in which, instead of conventional gym equipment, there was an array of tools and materials setup for individuals to engage in bouts of manual labor for the sake of it. Now, I fully acknowledge how silly this image is. Having someone give money to a company to let them do manual labor is sort of crazy; especially in the context of how little prisoners are paid to fight fires in California ( :-( ). However, I think this could catch on in heavily urbanized areas (think LA, NYC, SF, Boston, etc.). In those locations, there's a plentiful supply of desk jockeys who are interested in new experiences that also benefit them physically. I'm certain some band of yuppies would shell out cold hard cash to churn butter or carry goats around for an hour each week. In fact, if the so-called 'manual labor gym' was able to sell the products of the labor (i.e. butter, gravel, chopped wood) to the general public as 'artisanal products', I think this whole concept could really take off; as funny as it all sounds. On the high level, if this niche gym idea became an actual thing, it would say a lot about the problematic valuations that our society has placed on various manual labor professions like garbage collectors and farmers (high manual labor jobs that often pay near poverty wages). Maybe after COVID I'll try and get a loan to get this gym idea off the ground. (lol)



Month of Self Care


Some latkes I made this morning for brunch

The beginning of 2021 was a mediocre time. I was worried about things and people and at times found myself going through the motions without my long term hopes and dreams. COVID sucks as we all know too well. I believe this contributed to my dismay. Now, a month and a half into the year, I find myself feeling much better and much more myself. I have begun attempts at meditation following a good book that brought it up. I have been a bit better at keeping an exercise regime. And I have been cooking nicer meals for myself while getting all those important, pesky food groups in my diet (like veggies). In total, I recognized a lack of self care and responded to this issue.

Today is Valentine's day. A holiday centered on the subject of relationships. Tomorrow, my girlfriend Ally is coming back to Boston. Her senior spring semester is starting on Tuesday. I am looking forward to having her around to share some of this food I've been cooking. Maybe we'll go on some trips that don't involve being close enough to strangers who may or may not have COVID.

In my past, I didn't really have 'self care'. I feel that I was always pushing myself into some new endeavor. I was a brainiac child that was lucky enough to not have to study that hard to 'succeed'.  Now, with the pressures of being a full on adult, I am personally responsible to the fullest on whether I am 'burning out' or not. In retrospection, I got really burnt out at the end of my senior spring. The meditations attempts have been giving me crucial time to self-reflect and take a few deep breaths. The world is a messy, flailing place but I do have control over a few things. I am going to focus on what I have control over.



Book Review: Love in The Time of Cholera

 

I finished this novel a few weeks ago. It is now one of a handful of books that has pulled an emotional response out of me so strong as to elicit tears. This is not because of the realism in the book. Marquez uses a some magical realism in this story. I would say the story is not particularly realistic. The characters are lifelike but interact in a strange way occasionally. I was captivated by the deep detail with which the author paints the stories of so many deep emotional connections between the characters. 

I'd say 9/10, you should read this novel with context on the setting and author's background

Spoilers below

--

The beginning of the story is simple. Juvenal and Fermina are an old married couple. He is a well respected doctor in town. They have a nice life together and their relationship has a number of humorous notes here and there. Suddenly, Juvenal dies and an old man appears at the door to try and win Fermina's love (a shaken new widow). Things get complicated fast and the setting of the story jumps back decades to the past.

Fermina and Florentino are two young adults in town. Fermina is the daughter of a businessman and Florentino is working at a telegraph station. I don't particularly like Florentino or Fermina, the two main characters of this novel. They are stubborn people. They have a whole cadre of issues linked to mental health that stems from traumatic situations they encountered in their respective youth. I pity these two characters. I don't find myself rooting for them in any particular way. However, the depth of their emotion and the extent to which they are able to share their mind with others is something that I occasionally envied while reading. In the beginning, the fledgling romance between Florentino and Fermina is cute and simple. Both are interested and take fairly parochial stances in the way the relationship would progress. But alas, after the turning point of Fermina's father interjecting in their courtship we learn more about how younger Fermina thinks about an ideal romantic partner. The story gets more complicated

As these two individuals move through life, they don't resolve many of the problems they forged in their teenage and young adult years. After Juvenal's death, things get messy. The emotions once bottled up for so many years are now made center stage. It can be easy at this point to feel bad for Florentino or Fermina; however, I still couldn't muster that feeling. Yet, I still want to urge them forward to seek out something they can both agree on. They both love life to some extent and both fear death to some extent. In the end, they find some ability to forgive both themselves and each other. They feel strange about embracing feelings they have held hidden for so many years and appear resolved to live out the short remainder of their lives in a bliss state laden with a deep sadness. A sadness that they have wasted so much of their lives to unnecessary and unhappy relationships. Yet profoundly happy that they were able to make something right in the end.


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 inte...