Wednesday 17 October 2012

Entropy

Many games cast the player in the role of Maxwell's demon: bringing order from chaos, building structures out of randomness. Tetris - assembling a stream of molecules into a regular lattice. Bejewelled - performing involutions to form crystals. Drop7 - organising gibberish into true self-referential statements. As single-player high-score games it's important to these that they be balanced such that the laws of physics are upheld - you can reverse entropy locally for a while, but eventually you will lose. Or Freecell - a solution of cards precipitates into crystals of increasing size - as a puzzle there's a solution, a state of perfect order (as bland as perfect disorder).

Game idea: literal metaphor of Maxwell's demon; one-touch control of a gate passing particles through to sort them. I expect this has probably been done, and a quick search confirms it. Oh, and of course there's the old Windows game Maxwell's Maniac!

(A friend once said my game Fire Up The Lemma Engines made him feel like Maxwell's demon; that's where this train of thought embarked.)

A quick glance at the Wikipedia disambiguation page for entropy will show you that the word is used in similar but distinct ways in a wide variety of fields. There's probably some good game ideas in all of them. I'm most familiar with its use in information theory (though not very familiar; it's come up in a few things I've read but tangentially to my main interest in them). Roughly, it's a measurement of how easy a sequence is to predict - a completely random sequence has maximum entropy, a sequence of all the same character has minimum entropy, a passage of text is somewhere in between; not completely predictable but filled with patterns.

Game idea: player inputs a sequence, score is the Shannon entropy of that sequence. This would be hard, we're not good at avoiding patterns. Wrap it in a Dune license and you've got that peculiar shuffling walk across the desert, avoiding any rhythmic motion that might attract sandworms; I'd play that.

O is a contest between two demons, each trying to minimise the entropy of the sequence of colours they collect. Well, a very rough approximation of the entropy: it measures the lengths of monochromatic subsequences, the probability that a ball is followed by another of the same colour. Demons may play a variation scored by the Shannon entropy. Each player is an agent of both order and chaos; creating patterns on one side of the board while disrupting them on the other.

It's easier to create chaos than order; easier to disrupt patterns than to build them. This can be a game balance issue: there's a natural pressure towards it being cheaper to attack than defend in competitive games, which is often appropriate but must be taken into consideration.

3 comments:

  1. In some sense, Jahooma's Logic Box and Manufactoria do this as well, asking the player to construct Turing-like machines to sort and modify random strings according to some rule.

    Slightly related: have you read this paper, which proves that even a perfect Tetris player must eventually lose?

    ReplyDelete
  2. You might be interested to know that your hypothetical Walk Without Rhythm game wouldn't actually be very challenging. Psychological studies have found that when provided with feedback on which strings they gave were random and asked to provide more randomness, humans are actually very good at it. So people would master the game very quickly.

    ReplyDelete
    Replies
    1. Ah, very interesting! Do you have a link to the study?

      Delete