Posts tagged “random”
 
Kip How to win at tic-tac-toe

Recently, Randall Munroe of xkcd1 diagrammed a complete map of optimal tic-tac-toe moves. I thought I would see how the high-resolution version looked through the Seadragon scripts I’ve integrated into my blog (seen previously in high-resolution panoramas).

So below I’ve reproduced the original high-res image from xkcd in a zoomable format. I split the map for X and the map for O into two separate graphs. At any given zoom level, the optimal move is in red, then wherever your opponent goes you would zoom in on that space and it would show you the optimal move again. It’s pretty simple. It should be noted that it’s not very hard to ensure you never lose at tic-tac-toe. The only way to win is to play someone who doesn’t realize this and wait for them to make a mistake.

1 Am I the only one that pronounces that “zaxid”? Probably!
No Comments
Kip While I’m at it: How to win at the Cracker Barrel peg game

In my last post I discussed the game of hangman, aided by an algorithmic analysis of the winningest words. A few months ago I did something similar with the peg game they have on the tables at Cracker Barrel.  The one where you have a triangle with 15 pegs, with one missing. You remove a peg by jumping over it. The goal is to leave only one peg remaining. I think I won the game the very first time I ever played it, and I don’t think I’ve won since then.

It occurred to me that the game would be easily solved with brute force, and after an hour or two of coding I had done so. However, I never went much farther than that. I had hoped to look for patterns or simple rules that lead to a victory, but never really got very far. But I decided to post what I have here just for the sake of doing so.

         0
       1   2
     3   4   5
   6   7   8   9
10  11  12  13  14

Given the above peg positions, there are four unique starting configurations: you can start with peg 0, 1, 3, or 4 removed. Any other position is a mirror and/or rotation of those four. So I looked at which starting positions were the most likely to win.

Peg 0: 29,760 ways to win of   568,630 games (5.23%)
Peg 1: 14,880 ways to win of   294,543 games (5.05%)
Peg 3: 85,258 ways to win of 1,149,568 games (7.42%)
Peg 4:  1,550 ways to win of   137,846 games (1.12%)

So the moral of the story is: start with a middle edge peg removed, not the traditional configuration of top peg removed. Beyond that, I got nuthin.

No Comments
Kip How to win at hangman

Last week Stephanie and I were discussing the game of hangman. I commented that “rhythm” and “myth” are good words because the only vowel is y, and most people try to find the vowel first. I wondered what might be the best possible words.  When I remembered that I’m a programmer, I said “hey, I can write a program to figure this out!” And since I haven’t posted on this blog in quite a while, I thought I’d share.

I found a list of 58,112 words and got to work. I decided to first count the frequency of each letter in the word list.1 I figured that the probability that a letter would be guessed is approximately equal to the frequency of that letter in the language. This could be a bad assumption, but it’s all I had to work with. Then I computed a score for each word by averaging the frequency of each letter in the word. I don’t know that this is the best way of measuring the difficulty of the word, but it’s the best one I could come up with.

Here are the words with the lowest scores (and therefore the most difficult hangman words, according to my algorithm):

fuzz     1.28%
fuzzy    1.37%
buzz     1.39%
why      1.57%
by       1.79%
jazzy    1.95%
jazz     2.01%
huffy    2.02%
buff     2.03%
huff     2.10%
jug      2.17%
jumpy    2.18%
puffy    2.18%
my       2.20%
hubby    2.20%
muff     2.23%
jump     2.29%
puff     2.29%
buy      2.33%
foxy     2.36%

And here are the easiest:

see     10.55%
eerie   10.15%
ere     10.13%
nee     10.08%
sees    10.05%
tee     10.04%
ease     9.81%
eire     9.79%
seer     9.73%
seen     9.69%
eerier   9.67%
tees     9.67%
serene   9.60%
eases    9.56%
settee   9.54%
lessee   9.54%
eel      9.52%
seine    9.52%
seers    9.50%
eeriest  9.47%

While I was at it, I did some other searches on the word list.  Here are the 49 words that have no vowels besides Y:

by
cry
crypt
crypts
cyst
cysts
dry
dryly
fly
fry
glyph
glyphs
gym
gyms
gypsy
hymn
hymns
lymph
lynch
lynx
my
myrrh
myth
myths
nymph
nymphs
ply
pry
pygmy
rhythm
rhythms
shy
shyly
sky
sly
slyly
spry
spy
sty
styx
sylph
sylphs
sync
thy
try
why
whys
wry
wryly

Seventeen words contain all the vowels, including Y:

consequentially
counterrevolutionary
disadvantageously
facetiously
gregariously
heterosexuality
homosexuality
neurologically
neurotically
pertinaciously
precariously
precautionary
questionably
revolutionary
simultaneously
supersonically
tenaciously

And only two words contain all the vowels, including Y, in order:

abstemiously
facetiously

1 This is slightly different from the frequency of each letter in the English language. For example, “t”, “h”, and “e” probably have higher probabilities in the English language than in the word list, since “the” is used over and over in the language, but it is only represented once in the word list.
No Comments
Stephanie Five Years

To think that five years ago, Kip and I came together and promised our lives to one another.  Many of the people that follow this blog were in attendance that day.  It was a warm and blustery day that ended rather cool.  But I had a good time, and I hope that Kip did too! :)

I wanted to make this post as a retrospective on the past five years that I have spent with my husband.  A lot has happened over the years.  I didn’t link back to all previous posts I’ve made on this site, because there would have been a lot of them, so I’m just going to list the major events that have transpired as I remember them.  Please be advised: there is a lot of text here!

We spent our first week together visiting Hawaii, and had a marvelous time in the sun, sand, and sea.  We also enjoyed it from the air in a helicopter ride, that neither of us could fully enjoy due to motion sickness. Kip came home with a wounded foot after a snorkeling accident on the second day.

The next month Kip got to experience helping my family with a yard sale at my parents’ house, and was amazed at the crazies that come out at five in the morning and don’t allow you to fully set up the sale before they totally decimate the merchandise.

In June of 2005 we nearly got in a fight at Carowinds while waiting in line for the Borg.  It was quite terrifying at the time, but now, to look back on it is pretty funny.  I’m proud of my brother-in-law, who was brave enough to stand up for us when people tried to jump the line, when it wasn’t moving.

The month of July didn’t bring many exciting events, just a lot of reviews by my husband.  Things like movies, video games, and radio stations.  Not very exciting stuff.

August, however, was a pretty big month because we found out that our family would be increasing in number by 1.  We were going to be gaining a puppy that was left on Kip’s mom’s front door step.  We lost her a month later to a heart condition that was terminal.  It was a very sad thing to go through.  We then were able to adopt another dog, Punky, that we still have today, she turns five sometime this month.

Sometime in November Kip decided that he needed to reconnect with his stick figure days, and pulled out all his old drawings.  I’m not sure I approve, but they are kinda funny.  I also took up heavy-duty baking in all my free time, and created the infamous cupcake turkey army.  I still can’t believe nobody wanted to eat them.

In 2006 Kip learned how to file our taxes, which was a little stressful, but a necessary evil.  We had a winter Olympics in February, which made recording what we watched on tv interesting.  And I went on a job interview in March.

April brought around our first wedding anniversary.  We celebrated by going to the mountain house up on Roan Mountain.  We enjoyed warm fires, and year old wedding cake.  And I got the job that I interviewed for back in March.  Kip bought a new car, the Solara.

The next couple of months are pretty mundane, with Kip talking about computer stuff, and me being excited about getting the complete collection of Shelley Duvall’s Faerie Tale Theatre.  Kip then made a really long review of games and showed off his cubicle at Dassault.  And, we became Aunt Stephanie and Uncle Kip (but it wasn’t mentioned until October).

In September we celebrated Labor Day with my parents at Chimney Rock, and Kip talked some more about computer stuff.  (Have you sensed a pattern on what he talks about a lot!)

October had quite a bit going on with Kip getting excited about the upcoming release of the Nintendo Wii, I made a top 5 list of movies I would want with me if I were stranded on a desert island (in which I waxed romantic at the end), Kip created a MySpace page for some unknown reason, and we made a jack-o-lantern ghost.

The remainder of 2006 went as follows: we went to the Renaissance Fair with my parents, Kip led game time for AWANA at church one Wednesday night when there were apparently no other people available, Kip turned 25, he lost his cell phone while furniture shopping at the Hickory Furniture Mart (and later found it, Thank God), my car was broken into while I was at work and my purse with my cell phone was taken, the police called us late that night to tell us they caught the guys that did it and had my purse and cell phone in custody (again, Thank God), and Kip got a Wii for Christmas!!

2007 came in with nothing too exciting happening.  Kip talked a lot about programming stuff, and video game stuff.  I complained about mandatory work, that isn’t work, but menial labor.  Then we went to Florida for spring break to visit the newest addition to our extended family.

Our second anniversary was spent at home that year, but I got Kip the most awesome gift ever.  He was graced with his very own Kip Bobble Head.

May started with Kip complaining about filters on different programs, and me telling everybody about falling down the stairs on Easter Sunday and ruining two pairs of shoes.  The month ended with Kip warning people to watch what they say in airports.

The summer had several gaming highlights including us beating Super Paper Mario, and a 5 year old impressing Kip with his gaming skills.  I quit my job, and we bought our first house.  Kip continued blogging about LOST (which he had done several times previously on the blog).  Kip then had a crazy week in which our air conditioning went out in our new home and he got rear-ended on his way home from work.  The summer ended with us announcing our “big news” and Kip sharing quite a lot of his violent stick figure art with the world.

The year ended with Kip going on a business trip to Seattle, us finding out that we were going to have a bouncing baby girl the following spring, Kip and I both had birthdays, the carbon monoxide detector went off in the house, and we decorated for our first Christmas in our very own home.

The year 2008 began with the return of American Gladiators on tv, Kip realizing that Dane Cook is not nearly as funny as he used to be, and us taking our babymoon to Atlanta.  Kip also reviewed some games and determined that we would be traveling to see the full lunar eclipse in 2017.

March of 2008 brought Emma Leigh Robinson into the world and our lives.  She has been a true blessing to both Kip and myself.  For those of you that don’t remember, her arrival was a bit traumatic, but well worth it.  Looking back, I’m thankful that we were able to learn so much with her and help prepare ourselves for her little brother, who will be joining the family in mid-July of this year.

After Emma’s birth we posted a lot about her, and Kip did some more programming stuff.  For my first Mother’s Day, Kip bought me a brand new Honda CR-V, which I still love today.

Over the summer, Kip programed some more, there was stuff on video games and Facebook, Emma had her first beach trip (she didn’t like the water), and we went back to Florida.  The summer Olympics took place in Beijing, and USA did a pretty good job in the swimming events.  By the end of the summer, Emma had gone swimming at her Mimi’s house, and started eating “solid” foods.  It also held the life changing information that Kip’s current employer was closing the Charlotte branch in six months.  It was yet to be learned which layoff he would be included in.

The fall included a nice date night, and Emma going to the polls for her first voting experience.  We also posted quite a few videos of Emma growing, developing, and being really cute.

January 2009 brought snow, and Emma got to go sledding with her daddy.  February had Emma learning to walk, and Kip going on a mission trip to Matamoros, Mexico with our church.

March brought Kip looking for a new job since his would be ending at the end of the month, and his new use for all those business cards they gave him.  Emma also had a pretty big milestone when she turned 1.

Thankfully, Kip was hired for a new job in May, so we didn’t have to go into the unknown world of unemployment for very long.  Before he started, we took a family vacation to Myrtle Beach, and Emma had a blast in the lazy river at the resort.

During last summer, Kip got to experience the guy that sells meat out of a freezer strapped in the bed of his pick-up truck.  We also made another trip to the beach, this time with Kip’s extended family.  The summer ended with me going to the first planning meeting for my 10 year high school reunion.

In the fall and winter of 2009, Emma went trick-or-treating for the first time, and was quite the hit among the other parents and groups we passed or visited.  Kip also realized that he was getting old while I helped throw a wedding shower for my little sister.  My sister got married, and we had Christmas with my family at the beach.  We also found out that we were expecting our second child before the end of the year.

Although 2010 has barely begun, some things have happened since it began.  I was curious if anybody had any old wive’s tales that would help predict the gender of the newest Robinson, and Kip learned that teaching Emma her pronouns was going to be a challenge.  We also had more snow, and therefore more snow fun with Emma and her penguin sled.

Kip quit watching the Simpsons and found out that there is another him in the world.  A second winter Olympics started and ended since we’ve been married, and this time we did pretty well in downhill skiing and speed skating.

In the last month, we found out that the next Robinson will in fact be a little boy to be named Grayson Matthew Robinson, and Emma had her second birthday.

I can’t believe so much has happened or that the time has gone by so quickly.  I’m so thankful for all the fun times and many blessings we have had together.  I’m sure most of you found this post rather boring, but I had a lot of fun going back through all the things that have happened since we got married five years ago.  The day is almost over, so I guess I’ll go to bed since I have another busy day tomorrow, and lots more to do before our next big milestone gets here.

No Comments
Kip Shoe sizing

Random fact: Nike size 10 and Adidas size 11 are almost exactly the same size.

Nike size 10 and Adidas size 11, almost exactly the same size

No Comments
Kip Organic milk has a ridiculous shelf life

Over the weekend—while I was back home for my brother’s wedding (some pictures will likely come soon)—I noticed that the organic milk my mom has started buying has a really long shelf life.  The carton I was pouring milk from, for example, didn’t expire for well over a month.  I was curious why this was the case so I did a little research and it seems that this milk has been treated with ultra-high-temperature (UHT) processing, rather than regular pasteurization.  From what I’ve read on Wikipedia, it seems that UHT milk could actually sit at room temperature for months without going bad, and in Europe it’s actually sold unrefrigerated.  Apparently they sell it refrigerated here because Americans wouldn’t buy unrefrigerated milk in test markets.

I couldn’t find a consensus as to why organic milk is UHT processed, though.  Some people said it was because “organic cows” aren’t given antibiotics, so UHT must be used to be sure all bacteria are killed.  Another said organic milk is typically shipped from further away, so they have to use UHT or it would be about to expire by the time it got to the store.  I’m not sure which is the real reason and I don’t feel like doing any more research.

Anyway, I thought that was an interesting fact I’d share with the class.

No Comments
Kip Wind Sniffer

I haven’t made a blog post in a while... I guess I’ve been busy at work and I haven’t really been inspired to write anything.  To help keep something fresh on the site, I’ll share some interesting canine survival instincts I have noticed when taking our dog out:

Punky1.  When she is sniffing around exploring, and sticks her head up to sniff the air (as opposed to following a scent on the ground), she will always face directly into the wind.  This makes sense, as that is where she’d be most likely to find a scent of something to hunt (or avoid).

2.  When she is pooping, she always faces downwind.  I’m guessing this instinct allows her to see any predators that might have been alerted to her presence by the new scent.  In addition, she often (but not always) sniffs into the wind (see observation #1) first, which means she has to do a 180 just before pooping.

No Comments
 
 
 
RSS feeds: Kip's - Stephanie's - Both