31 January 2009

The next best thing to being there

Wouldn't it be great if you could hop into the cockpit of your very own 10 meter tall walking war machine and cruise the battlefield just looking to cause trouble? Well you can ...



... after a fashion. Virtual World Entertainment is a Michigan company that builds the Tesla IITM System cockpit for the BattleTech: Firestorm game, sometimes known as Battletech pods.



From Marmalade Dog: To help celebrate the 25th year of BattleTech as well as the 20th year for its BattleTech VR attractions, Virtual World Entertainment, LLC is taking 4 of its critically acclaimed Tesla II BattleTech: Firestorm cockpits to entertainment events around the United States.

The Tesla II cockpits, featuring the BattleTech: Firestorm software, are fully enclosed military style simulators that feature 7 screens, over 90 control systems, and a 12 speaker surround sound system. When seated in the cockpit or 'pod', the player will pilot his or her own walking tank known as a BattleMech onto the virtual landscape to compete with those seated in the other cockpits for battlefield superiority.

The first stop of the 2009 tour will be at the Western Michigan University Bernhard Center during the annual 'Marmalade Dog' Game Convention hosted by the Western Michigan University Gamers Guild.


Battletech Pod Modesto VirtualI didn't know about this convention, and now it's too late to consider attending. Maybe next year?

[Hat Tip: ConventionFans.Today]
[Edit: 7/16/09 - removed dead links]

29 January 2009

SKAPH

SKAPHSome friends and I have been playing a browser based game called SKAPH for about two months now. (Of course the initial attraction was the giant robots angle.) This is created by a German company, and it shows a bit in the translations to English, but the basics of the game are not too hard to figure out.


SKAPH base defense
SKAPH oilBattling robots are always nice, but SKAPH is really a game about resources and building. Your base starts with limited resources (you have crash landed on an alien planet) and you must construct mines and factories to create more, plus conduct reseach for new technology and structures. Building construction and resource accumulation is slow, paced so that players can play for a few minutes 2 or 3 times a day. Getting my first base up and running took over a week, but the construction times for basic building have since been radically reduced to help get new players into the game more quickly.


skaph game resourcesOnce you get your base established, you construct a Map Room, at which point you are placed into the harsh world where others can attack you (all the other players crash landed too). Attacks become stronger as players bases grow, and alien attackers soon join the battles too. Damage is easily repaired, but your base will require regular attention. If you are persistent, your base will keep growing even when subjected to regular attacks. The only real way to lose is not to play; your base will be destroyed as multiple attacks strip away defenses and your headquarters is finally destroyed. (Caution: Attacks can be much more serious if you start on "hard", and a player in my group recently restarted to escape an unplayable starting location, surrounded by unhappy aliens.

SKAPH UraniumManage your resources well, make a few allies among your neighbors, and you will prosper. The majority of players n the game are German, but most know enough English that I can make deals with them (and there is always Google Translate, but the Germans maylaugh at you.). If you start on the "easy" difficulty level, you will be placed among other new players, and any attacks made on you won't be too harsh. Of greater concern is the resources that are stolen from you in attacks, and you will want to build defenses for protection from raiders.

There is a commercial aspect to this game, mostly in the form of ads. Additionally, your base is powered by Reactors with limited supply, and for a fee you can purchase Uranium to feed nuclear reactors, supplying greater power and making your base more efficient. Nuclear powered robots and weapons can eventually be built, but I have not progressed far enough yet to see this. The game is quite playable without spending any money on it.

And playable is the word for it. The pacing is slow, and the development of your base is spread out over weeks. This might seem frustrating, but there is a lot of satisfaction in seeing the game unfold and the difficulties encountered along the way. The game has stayed interesting for me all the while, and I'm looking forward to the next stage of research, so I start building the advanced combat units.

SKAPH moviesThere are some nice animated promos too. I can't embed Flash here, but here are some links to the movies.

I could say more about actual play, and offer some tips, but part of the fun is figuring the game out for yourself. I'm open to answering question though if someone wants help.



SKAPH BaseFinally, here is a screen capture of my primary base, the green bars indicate some damage I have not repaired yet, and my current resources along the top. The in-game graphics are not so nice as the demo material, but are still effective and nicely done.

--- UPDATE: More about Skaph ---

27 January 2009

Tic-Tac-Tec-Toc-Toe

tic-tac-toe 5-in-a-row Brian KlugTic-Tac-Tec-Toc-Toe, get five in a row. Metadeb tipped me to this variation of Tic-Tac-Toe. It uses a larger board and the object is to get five in a row. I'm pretty sure I've played this on paper versus other people before, but I don't recall when.




I wanted to give proper credit for this online creation, so I contacted the site owner and he was kind enough to respond:

tic-tac-toe 5-in-a-row Brian KlugBrian writes:
You may credit to me, Brian Klug - thanks so much.

It was written for AI class at UMD. Each move, it plays "what-if" by looking at each square as its next move. There are a bunch of heuristics. There are some obvious ones, like, "does moving here make 5-in-a-row", "does this block a winning move by player", the total points earned if you would assign points to total number of pieces in a row (i.e. it will favor a square that makes TWO lines of four squares, i.e. if it formed a cross.). Finally, it also prefers to play the center of the board.

Cheers!


tic-tac-toe 5-in-a-row Brian Klug heuristicsEven these simple rules are enough for the computer to play a decent game, and it beat me on my first try. A bit of thought and a better defense and I am able to beat it regularly. Like the simpler 3-by-3 version of Tic-tac-toe, moving first is an advantage, but it is not clear in the extended version if there is always a play-to-draw strategy for the second moving player. My intuition is that on the expanded board the number of possible moves to be blocked grows more quickly than than the opportunity to block them, and so playing to a draw is much more difficult.

25 January 2009

Make Your Own D6 Rubik's Cube

Instructables has a guide to Build Your Own Rubik's Cube using magnets.

Rubik's cube dice InstrubablesThey recommend a drill press, which is not something I count among my tools, but I bet I could make do with a hand held power drill and some patience. Maybe I'll try it for myself.
[Thanks to Metadeb for the tip.]

21 January 2009

What about Scrabble?

Scrabble game math nimMy wife likes Scrabble™, and she suggested I should write something about it. She pointed out the book Everything Scrabble suggests that Scrabble is a math game more than it is a word game. I hadn’t really thought much about this game before, and it seemed like a difficult topic, but I agreed to think about it and write something here (then promptly went to sleep). To my great surprise, I had the basics figured out within 24 hours. Scrabble is closely related to Nim.

I thought this might make a good example of my thought process when I look at a game, so I’ll give you the gruesome details of a game dissected.

Scrabble game math nimWords: Scrabble is a complicated game, with over 100,000 words in The Official Scrabble Players Dictionary. My first thought was to consider Scrabble with fewer words, maybe even just one, or none at all, just putting down tiles in a row or column. Words are really just a kind of limit to how the tiles can be played.

Tiles: The tiles are worth differing numbers of points, and this is certainly an important part of Scrabble. However, the value of tiles players draw should be roughly equal (random, but fair) especially if we are disregarding words, so making all the tiles worth one point each is a reasonable simplification. Also, a maximum of seven tiles at a time is needed for large vocabulary of words, but without words it is arbitrary.

Scrabble game math nimBoard: After the other simplifications, all that is left to play for are the squares that give a player double or triple points for a single tile or entire play. I might even disregards point for tiles entirely and just play for these squares, and the player who can get the most of these squares will win. This was my “AHA!” moment where I started to recognize this as a variation of the game Nim. In scrabble you put tiles down, in Nim you pick pieces up. In Scrabble play to put your tile on the next (or last) double points square, in Nim you try not to take the last peice.

So Scrabble is a complicated sort of Nim with points gained for how and where you play the tiles, and a complicated set of rules for how you can play the tiles (ie: words).

My previous efforts at describing games using this process have all ended up with some sort of a probability distribution (including Markov chains and random walks) after I removed all aspects of player decision. Nim is different, and player decision is the key. There is no probability here, and there is always a winning strategy.

This suggests that this property of Nim, with the first moving player having a winning advantage (sometimes the second player), is a basic property of many games, maybe all games. In some games this might be reversed, with the advantage going to the player that moves second, but the cause in the same. This advantage might be small, or get lost in the added complexity and randomness of the full games (like Scrabble, Monopoly), but it probably never goes away entirely. In fact the first move (white) player advantage in Chess is well known. There are plenty of board games where order of movement is important. Battletech players will immediately recognize the advantage of winning the initiative (a random roll give the last player to move the advantage). How about sports? With the Superbowl fast approaching, Football overtime is a good example; given a choice, taking the ball first with the opportunity to score and win is a clear advantage.

Never played Nim? You can try it here.

20 January 2009

More Metal Fatigue

Following up on my Metal Fatigue post, I have set up a spreadsheet to demonstrate a simple example of the Birnbaum-Saunders fatigue life probability distribution. To quickly summarize, this is the version of the Central Limit Theorem that describes how many shocks or stresses a metal part will survive before the part wears out and breaks. It also happens to describe a probability distribution that applies to many types of games. My goal is to use this as the basis for an approximation for complex games (such as Battletech). The Birnbaum-Saunders distribution (henceforth BS) ranges from 0 to positive infinity, as opposed to the Normal distribution which ranges from negative infinity to positive infinity. The BS CDF formula can be evaluated using the Normal CDF function, which is readily available in Microsoft Excel.

What I did was to set up several spreadsheets that simulate a very simple one-player game. A player starts with 35 points, and every "turn" rolls one 6-sided die and subtracts the number rolled, keeping a keeping track of the remaining points until there are zero (or less) left. The object being to determine how many turns this takes. In terms of metal fatigue, the roll of the die is the shock which makes a crack grow, until it reaches the critical length 35, and the part breaks.
That's it - A very boring sort of game, but it serves the purpose of this demonstration.

The first worksheet (cleverly named "One") demonstrates just a single observation of survival time in this simple game. The first column "t" counts the number of turns or times the die has been rolled (starting with zero), the next column "1d6" shows a random number from 1 to 6, and the column "W (remain)" keeps track of how many points are left. The last column "Game Ends on t=" shows the final turn of the game. This spreadsheet will update every time you press "F9" (in Excel) or click "Recalculate" (Google documents), and show the results for a new instance of the game.
The other columns, "m, v, s" display parameters for the distribution. If you want to tinker with the spreadsheet, you can start by changing the starting number of points in the green shaded cell.

Next I set up another worksheet ("Many") that repeats this game many times, tallies up the results and displays them (blue) along with the theoretical distribution (red). This can be updated in the same way as the previous worksheet to see a different set of results (examples to the right and below). There is some randomness to the results, but they follow nicely along with what the Central Limit Theorem says they should be.









Still awake? Still reading?? I had fun playing with the spreadsheets but an awful time trying to write about it. Boring to read too I'm sure (sorry), but an important component of certain games, and something I needed to establish for some future posts.

17 January 2009

Deal or No Deal

Howie Mandel Deal or No Deal Math gamesHowie Mandel LIES. I was laying on the couch the other day and my wife has Deal or No Deal on TV. Howie says something like "There is a one-in-four chance (25%) that your case contains $1,000,000!" Exciting, but wrong. Let's start at the beginning.

Deal or No Deal is a game show where the contestant first picks one from among many briefcases. Most of the cases contain a small amount of money, a few contain a lot. The contestant knows the "list" of amounts that are inside the cases, but not which case contains what amount. After picking the first case, the contestant gets to open a series of other cases and learn what is inside. With each opened case the contestant gets an offer; they can trade their case for what is offered, or after they open all the other cases first, keep the case they first selected.

Deal or No Deal MathNow where was I ... Oh yes ... a contestant is down to 4 cases, including their original pick. One of the remaining cases contains a million dollars and then (here we go) Howie says something like "There is a one-in-four chance (25%) that the contestant's case contains $1,000,000", and Howie is wrong.

Let's pretend I am playing and start with 10 briefcases. One contains $1,000,000 and the nine others contain $1 each (we could vary this like the game, but I am simplifying). Not knowing any better, I pick a case randomly, and I have an expectation of a 1-in-10 chance it contains $1,000,000. Next, Howie lets me open 6 other cases (skipping the offers). If I am lucky and none of those 6 contain the $1,000,000 amount, then 4 cases remain and one contains the big money. If I could pick one randomly NOW, there is a 1-in-4 chance it would be the $1,000,000 case, BUT that does not change the odds for my original pick. My first pick is still a 1-in-10 chance, but the other 3 are now 1-in-4 chance(s). The difference is now I know more than I did at the start; I now know 6 cases that do not contain the big money, and this information changes the value of the remaining cases.

Monty Hall Lets make a deal math gamesIf this seems confusing, then you are in good company, because this problem has stumped a lot of very smart people. This is a famous problem of conditional probability (famous in Math/Stat circles anyway) known as the Monty Hall Problem. I changed it around a bit to frame it as "chance of $1,000,000" rather than the usual expected value, but it is the same problem.

See The Monty Hall page for a nice online demonstration. One more thing: Howie Mandel is no Monty Hall (sorry Howie).