Tuesday, June 21, 2016

Don't Be Greedy?

During a visit to Michigan with my son Ryan, we swung into a local toy store to purchase something for my daughter Emily.  I fought off Ryan's very eloquent attempts to convince me that Emily would really like Star Wars Legos or Spiderman Action Figures, and settled into the section of the store with educational children's games.  One in particular caught my eye... a simple game, with a good lesson in its title, and (most importantly) only $20... sold!  I walked out the store with a fun little game called "Don't Be Greedy".

The game is very simple.  There is a bag of jewels.  23 of the jewels are unmarked, 9 of the jewels have a sad-face on them, and 1 jewel has a star.  Each player takes their turn taking one jewel at a time out of the jewel bag without looking.  If the player obtains an unmarked jewel, they have a choice... place the jewel into your treasure chest, ending your turn and ensuring you keep the jewel, or grab another jewel from the bag.  You can repeat this process as many times as you want in one turn, but once you pull out a sad-face jewel, all jewels you obtained that turn go back into the bag.  If you get the star, the next jewel you pull is a 'free-pass', so even if you pull a sad-face, you can keep your jewels.


So the strategy in the game is balancing risk versus reward and trying to accumulate a critical amount of jewels to give you the win (which is 8 jewels if you are playing with 3 people).
Unmarked, sad-face and star jewels.  We like to call the sad-faces "Frownies".

Don't Be Greedy?

After playing with Ryan and Emily quite a few times, I've made some observations.  Ryan goes for glory every time... he doesn't stop until he gets at least 4 in a turn, and sometimes goes for it beyond that.  In contrast, Emily can't seem to bear the disappointment of having jewels pulled from her hands and will be happy to stop after 1 jewel.  And I guess my approach lands somewhere in the middle... with a little more aggression when the games starts and the unmarked to sad-face ratio is higher, and then playing conservative toward the end.

So with a name like "Don't Be Greedy", Emily has to be in good shape... right?  And Ryan is on crash-course for surefire disappointment... right?  My experience so far doesn't line up.  Ryan has won a convincing majority of the games we have played (and reminds us of this regularly).  Ryan's success made me start to wonder whether this game was actually won more often by playing agressive... by being greedy.

Nerding Out

I set out to determine whether there was an advantage to drawing more or less per turn.  To do this, I created a simulation of the game in R.  I simplified the game a bit by requiring each person to always draw the same amount of jewels per turn no matter the game status (unless someone gets the star on their last turn, in which they get the 'free-pass' and then stop).  This simplification distances the simulation from reality a little bit, but not too much considering I'm playing with a 3 year old and 5 year old who seem to have their mind set on a desired amount to draw.   I set the game up as a function with variables for how many cards each player would draw and what the win-condition is.

I'm a R novice, so I'm sure this could all be done with one line of code and/or way more efficiently.  The function outputs what player won, and I convert that to how many cards that person drew outside the function.

I simulated 10 million games of Don't Be Greedy, with each player being randomly assigned a required draw amount between 1 and 8 jewels.  Out of the 10 million games played, I tallied up the wins for each required draw amount and plotted them in terms of their overall win percentage.  (I also confirmed the distribution of required draw amounts was uniform from 1 to 8... not shown).

The results show that Emily's strategy of staying at 1 isn't going to fare to well.  The maximum success rate is at 3 draws per turn, which I guess is still on the side of not being greedy.  But there sure isn't much of a penalty for getting reasonably greedy.. there's very little drop off in success rate for 4, 5 and 6 draws per turn.  Ryan's strategy for winning seems to have some legitimacy.

I confirmed that this trend doesn't change if a game was constructed where only conservative people were invited (i.e. eliminate people who always draw 6, 7 or 8 times)

Be A Little Greedy

"Don't Be Greedy" could be justified as the name of the game... most people wouldn't consider going for 2 or 3 as being greedy, and this gives you the best chance at winning.  But I would propose the following as more accurate names for the game: 

Don't Get Too Greedy
Probably a bit more accurate of a name.  Still a good life lesson.

Definitely Don't Be Too Conservative
A good life lesson.  No one ever gets anywhere without taking a small amount of risk.

One More Probably Won't Hurt You
My college slogan.  And generally not great advise.

Regardless of what it's called, it's a really fun game that the kids love.  And now you know the best ways to win (if you decide you can only draw the same amount of times every turn).

Let me know if you have other names or if you have other suggestions for things to add.






Saturday, August 9, 2014

Verlander's Future?

I’m a Tigers fan, and what I am seeing out of Justin Verlander this year is breaking my heart.  I always have considered him as the re-incarnation of Nolan Ryan, but this year has shed some major doubt on his future. 

I wanted to try and assess if any of the great pitchers have ever had a terrible season in what would usually be considered the prime of their career (Verlander is 31 y/o).  Disclaimer: I started this search a few weeks ago when his WAR was 0.4 and it has slide up to 1.0 since then, probably making this irrelevant soon.

I did 2 season searches on baseball-reference play index.
  1. From 1969 (pitching rules changes) to now, List of pitchers who had ever been an all-star (targeting pitching greats), qualified for the ERA title (to help eliminate injury seasons), < 35 years old (so I don’t grab all the end of career years + half of Jamie Moyer’s career), WAR < or = to 1.0.  n = 291 results
  2. From 1969 to now, list of pitchers who have ever been all-stars, with 60% of appearances as starts (to eliminate relievers),  and career WAR > 24 (not a super high bar).  n = 122 results (ending with Mike Scott)

Verlander ends up 57 on the list of Career War.  By comparing the two lists, I was able to find players with higher career WAR than Verlander who had mid-career seasons with ≤ 1.0 WAR.  

In the TOP 25 of career war since 1969, Tom Glavine and John Smoltz had years of < 1.0 before they were 35 y/o.  However,
  • Tom Glavine was 22 and 23 in the seasons where he had a WAR, so he’s not exactly what I was looking for. 
  • John Smoltz had a WAR of 0.9 in 1994 when he was 27 y/o.  This was the strike shortened season and he only pitched 134 innings.

In the next flight of pitcher WAR (26-57), the list gets much longer, but the pitchers get less “great”.  Frank Tanana, Dave Steib, CC Sabathia, Jerry Koosman, Jamie Moyer, Dennis Martinez, Steve Rogers, Vida Blue, Jack Morris, Bob Welch, Cliff Lee, Javier Vasquez.  Only Dave Stieb, CC Sabathia, Dennis Martinez, Jerry Koosman and Vida Blue really had their ≤ 1.0 WAR year mid-career.
  • Dave Stieb pitched 205 innings in 1986 at age 28 and had a WAR of 0.0.  In the 6 years prior he had a cumulative WAR 38.8 (6.5 WAR/yr).  In the 4 years after, he had a cumulative WAR of 15.5 (3.9 WAR/yr)
  • CC Sabathia fell off in 2013 at age 32 and hasn’t returned to prominence.
  • After accumulating 17.4 WAR between 1968-1971, Jerry Koosman had a WAR of 0.2 in 1972 at the age of 29.  He rebounded well after that year, and accumulated another 32 WAR over the following 8 years.
  • Dennis Martinez makes the list at age 23 and 32, but the weird thing is… he wasn’t really good until age 33… 39.4 of his 49.5 career WAR is after age 33.
  • Vida Blue had a WAR of -0.9 in 1979 at age 29 despite throwing 234 innings.  He recovered with a WAR of 5.0, 2.9 and 2.7 in the following 3 years before a replacement level final 3 years of his long career.

In summary, no ‘elite’, top-25 WAR pitchers had ≤ 1.0 WAR mid-career seasons.  Even in the list of pitchers I would probably deem as ‘great but not elite’, only had a handful had mid-career ≤ 1.0 WAR seasons.  None of this gives me a warm and fuzzy feeling about Verlander's prospects for a bounce back to dominance.

Sunday, February 20, 2011

Albert Pujols

Sports Geeks,

Nothing profound here, but with so much talk about how the Cardinals messed this up by not signing Pujols by his "deadline", I've been wanting to say a few words.

In my over simplification, there are two main reasons that a team would sign a player prior to him going to free agency:

1) Not signing the player would cause him to not consider his current team during free agency because he feels disrespected
2) There is a high probability that the free market price for the player will be more than what he is willing to settle for prior to free agency.

In the Albert Pujols case, I assume that the option number 1 is not an issue.  All general relayed information though the (espn) media says that Pujols is a loyal person with a love for St. Louis.  He just wants the most money he can get (which he should).  My assumption is that if St. Louis gives him the most amount of money in free agency, then he will be happy to sign back with St. Louis.  But hey, what do I actually know.

With this assumption, the question for the Cardinals comes down to: is the 10 year, 300 million dollar contract Pujols is asking for going to be below the free market price during free agency?  I think the answer for that is absolutely not.

First off, 10 years, 300 million is only a possible number is Pujols produces this year as he did last year.  Say he plays less than 100 games, and has a reduction in batting average and hrs.  Can you imagine any team thinking that he is worth that type of investment when he is showing signs of decline or injury?  The Cardinals allowing him go to free agency could pay off huge, because a poor year from Pujols this year will drastically decrease his market value.

Even if he performs at the triple crown level of last year, I don't think his market value will be 10 years, 300 million.  10 years, 300 million dollars is a moon shot number that is based upon the terrible contract that A-Rod received.  The problem is that history has shown us, and will likely continue to show us, that A-Rod's contract is a mistake.  Is there a team that is not going to realize this and is going to go down the same road when Pujols hits the market?  The mass media keeps making the assumption that someone will sign him for that kind of money, but I completely disagree.  Especially with the Red Sox and Yankees set with large 1B contracts already.

Anyway, good job Cardinals for holding your ground and not "Yankee-ing" this one.
~Andy

Let's see how this goes!

Hello All,

I've been thinking about setting up a blog for a while now... just for those times I really feel like sharing something that is useless, but eating at my mind.  I think I will have a few topics in the blog:  

1) Restaurant Reviews 
2) Baseball or Sports Thoughts 
3) Video Game Thoughts 

Honestly, I'm not expecting anyone to read any of this.

~Andy