Thursday, October 27, 2005

Loops

People's lives are full of repetition. We have daily cycles, weekly cycles, and yearly cycles. It makes things easier to remember when we do them as part of a routine. Games also follow this form. Whatever the terminology--turns, rounds, phases, epochs, kingdoms, dynasties, passages--we play games in loops.

Game rules are almost always described as a sequence of actions, repeated some number of times, or until some condition occurs. In computer programming, one of the tasks of the programmer is to find loops in processes. This allows the code to be elegant, and often, more efficient. Likewise, properly delineated loops in game rules make the description of the game more elegant and easier to understand.

Let's start with a simple example. I will use capital letters to indicate actions or steps of a game:
ABBBBBC
The above game has a setup phase A, a repeating main phase B, and a final phase C. To indicate repetition, I will enclose the looping steps in parentheses. The above game could then be written as:
A(B)C
A description of the above steps in a rule book would be easy on the eyes and easy on the brain. A more complex example:
ABCDECDECDECDEF
Where is the loop? It's CDE. This could be written as:
AB(CDE)F
Ok, so far so good. But games are not that simple. There can be loops within loops:
ABCDECDECDEFBCDECDECDEFBCDECDECDEFG
A little analysis yields:
A(B(CDE)F)G
The inner expression repeats many times within the outer repeating expression. It's still complex, but the latter form is much easier to understand.

So what's the point of all this? As game players, we look for the loops in games to help us understand the flow of the game, and to more easily remember the rules. We rely on the designer to be the "game programmer" for us, find these loops, and describe them properly. When this process is flawed, we can either learn the game as it is written (the wrong way), or we can imagine that it is done right, putting it into its proper form in our minds. The latter method allows us to remember the game easier, and to teach it better.

In order to give some real examples, I need to introduce 2 more annotation concepts:
A|B
The vertical bar means OR. In other words, do step A or step B.
[A]
Square brackets mean the step is optional. And you can combine them:
[A|B]
Do step A, or step B, or neither.

Let's take a look at Reef Encounter--a game with a lot going on, a rulebook with a lot going on. Some say the rules are terrible. I disagree. The problem with Reef Encounter is that it tries desperately to be thematic about a topic that most of us non-marine-biologists cannot possibly internalize. But I digress...

Reef Encounter actually does a very good technical job of describing game turns. There are 10 actions (which I label A-J) that you can take during your turn:
[A]([B|C|D|E|F|G|H|I])[J]
Basically, you may do A, then you may do any of B-I in any order, then you may do J. There are some restrictions on how many times you can do certain actions, but that is not relevant here. This is explained fairly well, and a chart is included that shows it.

For you masochists who want to see the annotation for the entire game, I'll use Y for game setup, and Z for final scoring:
Y([A]([B|C|D|E|F|G|H|I])[J])Z
Another example of good looping is Santiago. There are 7 phases during a turn. During the 1st phase, the player the left of the Canal Overseer (from the previous turn) bids first. So what do you do on turn 1?

A poor choice would have been to describe phase 1 using optional steps, like: If this is the first turn of the game, assign the Canal Overseer randomly, otherwise... This would have looked like:
(A|X,BCDEFG)
Instead the designers found the right choice. They assign the Canal Overseer as part of the game setup, then allow the turns to flow smoothly:
Y(ABCDEFG)Z
Now let's take a look at an example where the rules are a little more complicated than they need to be because of improper loop delineation: Amun-Re. I respect Knizia designs, and I love this game, but it still works well for this example. The annotated sequence of play is:
A BCDEF BCDEF BCDEFG H BCDEF BCDEF BCDEFG I
A is the setup, and I the final scoring. BCDEFG are the phases of the rounds. H is the steps to take at "half time".

The rules describe each round of play as having 6 phases, with the 6th phase being optional. Do you see the problem? This description would result in the following abbreviated annotation for the first "kingdom" (3 rounds) of play:
(BCDEF[G])
But G really isn't an optional step. It's simply a step that is never taken in the first 2 rounds, and always taken in the final round. A better way is this:
(BCDEF)G
Repeat the 5 phases, then do the 6th. Understanding where the loops occur and how to handle optional versus required steps is important to impart understanding.

Now a worse offender: Mystery of the Abbey. The actual game play sequence looks like:
Y
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
E
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
E
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
A[B][C] A[B][C] A[B][C] D
E
Z

A is Move Pawn. B is Encounter. C is Action. D is Mass Bell. E is Mass So what's the problem? The rules look like this:
1. Move Mass Bell (first player in turn only)
2. Move Pawn
3. Encounter
4. Action
This is ridiculously confusing, and has probably led to numerous groups playing the game with 3 or 5 rounds because they blindly followed the directions.

The proper way to handle the Mass Bell is this:
Setup: Place bell on (1) space on mass card.
Each player:
1. Move Pawn
2. Encounter
3. Action
Move mass bell.
Mass: Hold mass and setup new bell/mass card.
This correctly reflects the sequence of events and the looping. The final abbreviated annotation is:
Y(((A[B][C])D)E)Z

I think perhaps people who are programmers would make the best rules writers, but maybe I'm a little biased.

6 Comments:

At 6:32 PM, Blogger Rick said...

Okay, Jim, this article clearly shows the way you think. It's fascinating how other people view game rules.

Re: Reef Encounter. You might be correct. I'm a person that relies heavily on theme to guide me through rules. So when using RE's theme and trying to marry them to the rules, I got very pissed because the theme just doesn't work. It required a shift into an abstract strategy mindset, coupled with equating sections of RE to other games (PoF and Vinci, primarily) to make any sense of the game's mechanisms and timing. It doesn't help that RE is clunky and inelegant.

Anyway, nice article as usual. See you at the Reefs. ;-)

 
At 5:59 PM, Blogger Steve Janecek said...

Jim,

This article proves what I had suspected already; we think the same way about games and probably about life. I would also think this is why we seem to pick up games quickly and move straight from tactics to strategy after half a game, where it takes most people iterations of the game to even begin strategizing.

Your thought process likely pervades all parts of like, food shopping, investing..hell anything. Let me explain...

Lets take sex for example:

F [O](io)[A](io)[O] E

Where F stands for foreplay
O stands for oral
io stands for the movement
A stands for a *really* good night
and E stands for "ending"

Maybe you could simplify it for me?

 
At 6:22 PM, Blogger ekted said...

Hahaha! You mock me. :)

 
At 11:37 PM, Blogger Steve Janecek said...

not really...

some people can understand algorithms and how a computer "thinks"

that is you.

some people cant understand why telling the computer to turn on is not enough...

that is my mother

 
At 5:55 AM, Anonymous Mikael said...

So does this mean I need to add Mystery of the Abbey to SpielByWeb next?

BTW, Reef Encounter should actually be:

Y ( [A] ( [B|C|D|E|F|G|H|I] ) J ) Z

(you have to do J)

And there's a little more complexity in that you can do E in the middle of B/C. And B/C/D can only be done once per loop...

But it's a nice illustration of the thought process (and the "fun" of doing a play-by-web implementation).

 
At 2:02 PM, Blogger ekted said...

I wouldn't think MotA would be very "controllable" in a web implementation since it relies on humans to subjectively make rulings. Either way I'm not interested in playing it. I'm also not interested in playing Reef Encounter any more. Your implementation is very nice, but after 2 playings, I just don't like the game itself any more.

How about Taj Mahal, Caylus, In The Shadow Of The Emperor, Goa, Keythedral, Medici, Oltremare, or Maharaja? :)

 

Post a Comment

<< Home