RWORD – TECHNICAL BLOG

Get the Rhema’s Word on the vast world of technology!

Archive for March 2009

Statistics: The card game “war”

without comments

I wrote a Perl script that simulates a game of war.  As I remember playing it, the game goes like this:  Both players receive 26 cards randomly.  Both players play a card off of the top of their deck at the same time.  The highest card wins and takes all of the cards.  I say all of the cards because if both players play the same card (suit is irrelevant) at the same time, then they go into WAR.  Each player player discards three cards and then each play a card.  From there the players each play a card and there is either a winner or another WAR continues.  Thus it is possible to have many cards won in one round.

When playing this game as a kid, I realized that it had the possibility of going on and on and on for many turns.  But how many turn?  Yay numbers!  The Perl script that I used is at the end of this article (I know it’s *sniff verbose).

More interesting to me is the distribution of the length of the game (I measured it in number of won rounds).

Here is a graph from excel.   There are 1000 samples.  The numbers on the x-axis represent the duration of a simulation in number of rounds.  The y-axis represents frequency.   Thus there are more games of war that end in 100-150 rounds than any other interval in this graph.

Read the rest of this entry »

Written by rhemalinder

March 20, 2009 at 2:42 pm

Posted in Statistics, experiment

Tagged with , , , , ,

Balloon Wars Racing Cart

without comments

GIVE ME MONEY!

I LIKE MONEY!!!

This Christmas, my little brother Ransom wanted me to make him a game that he designed. He is 10 years old. Surprisingly, he had it well planned out with reasonable requirements. As part of his present, he wanted a way for people to buy this off of the internet. I reasoned with him a little bit and he agreed to ask for donations instead.

Level 3 - Screenshot

Level 3 - Screenshot

Level 2 - Screenshot

Level 2 - Screenshot

So here is the donate link:

1/2 will go to me and 1/2 to my brother that made all of the skins and models.

Here is the download link.

I went ahead and put this on FreewareFiles.com. It has 50 as of 2 days after this post…

Written by rhemalinder

March 5, 2009 at 11:56 pm

Posted in Educational

Tagged with , , , ,