# My first foray into Ink – the Dots-And-Boxes game.

As a kid I  used to spend a lot of time in the car traveling from Minneapolis to the lakes country of Minnesota (near Detroit Lakes, if anyone cares).  Two 4-hours trips a weekend was pretty normal.  So what do you do with 6 kids crammed into a Suburban for 250 miles?  Whatever it takes to keep them quiet!

One of the first games I learned to pass the time was the Dots-And-Boxes game.  The premise is simple enough:

There is a grid of Dots in a rectangular array (such as the 6x6 grid in the image below).  There are N (usually 2) players.  Each player takes one turn.  A turn consists of drawing a single line between any two adjacent dots.  If that turn completes a box then that player receives a bonus turn (which must be immediately taken).  Players may not pass on a turn.  Two adjacent dots can only be connected once (can’t draw the same line twice).  When a box is made the player writes their initials in the box.  At the end of the game the player with the most completed boxes is the winner.  It is possible to tie.

In the car if a tie occurred we played a "cycle-bikel slug bug".  This would be much harder to explain and involved a lot of punching.  Our parents encouraged us not to tie.

Below is an example of a game being played:

So the question is … is anyone interested in walking through some of the more interesting points in the development of this simple, but quite challenging, game?

The interesting aspects are:

1)      ink input (figure out what dots to connect, best guessing, eliminating bogus moves, etc)

2)      Simple AI players (The screen shot above is from a Computer Vs. Computer game) using “Solved Form, Random” players.  The solved form of the game states that if a player can make a box, they must.  The “Random” part means that if a box can’t be made then a random valid move is made.  Only this particular computer player is bound by this rule, if a human player were involved the Unsolved Form of the game is played (any valid move is allowed).

Games are not my thing.  I’m not a games programmer.  This was a learning exercise not an example of game programming.

If there is any interest I’ll write a few columns on how I went from knowing nothing about ink input to creating this game (which admittedly does not require a lot of knowledge about ink input but which covers some fundamentals).

Let me know.

Tags

1. Dumky says:

That’d be cool.

There is a powertoy that is a very similar game (Dots!):

But it doesn’t come with the source. And it doesn’t have a walkthrough of how the app was developped…

I think it would be interesting, as I’m also contemplating developping a small game (although I’m still looking for the idea: http://blog.monstuff.com/archives/000161.html ).

2. Q says:

Sounds fun, but I’m having a hard time relating it to a business application I might write. I’m more interested in how to do ink annotations on top of the orders form application I have, or adding notes to my customer’s contact record, or even dragging-n-dropping catalog items onto an order form. The game, while cool, can be done just as easily with a mouse with low-resolution scanning. My 2-cents, since you asked… đź™‚ — Quent

3. Agreed – things like what you are suggesting is why I am investing time into learning the technology. The leap from "no knowledge" to "ink annotations on PO forms" is a large one. Some where in the middle is "learning to accept, validate and process ink input" which was the point of the game. Not just a starting point but a launching pad.

I’ll spend some time thinking about a more relevant sample.

Thanks.

4. Rick Nordal says:

I have created a new pencil and paper game called Connect Capture.

Connect Capture combines dots and boxes with chess !

You can view this game at:

http://www.geocities.com/alpine_rick_2000

Regards,

Rick Nordal ( Vancouver, British Columbia, Canada )

My email: alpine_rick_2000@hotmail.com