The 8 Puzzle Composer: Hearing the Solution

My Comments I like to think that synergy can be a truly great thing, particularly with respect to education and creativity. The idea described below was inspired partly by many late nights working on an AI assignment. Getting an inside look into how to solve what is called “the 8 puzzle” triggered the realization that it might be used as a control mechanism for Computer Music compositions.

As things have evolved, my interest is becoming focused on:

  • a full development of the idea itself
  • to what extent the puzzle solving can be picked up by the listener

Getting my computer to play music has been a greater reward than seeing it print:

     "Puzzle Solved:  press F2 to see solution!"

although those words were very much welcome when first I saw them. Definition: What is an 8 Puzzle?

An 8 puzzle is a simple little game consisting of a 3 x 3 grid (containing 9 squares). One of the squares is empty. This allows you to move the other squares around into different positions. The first image to the left might be thought of as a “solved” 3 x 3 8 puzzle. The second image might be thought of as an “unsolved” 8 puzzle.

The terms “solved” and “unsolved” are completely arbitrary here. What is important is that a puzzle in a given “state” must be transformed into another state through a series of “moves.” Given that there is only one space on the puzzle board, only one square can be moved at a time. Any such a move yeilds a new “state.” It should be noted that (perhaps obviously), puzzles need not be limited to 3 x 3 in size. How this relates to Computer Music The above examples use numbers to distinguish squares on the board from other squares. It is also possible to use note values. The sequence below would be the “solution steps” to a puzzle using notes from the C major scale.

Imagine the notes above being played in simple meter (eg., 1/8 note for each square) reading from left to right, top to bottom. We’d then have the following “composition:”

D E C F G B C A   C D E F G B  ...
| first "box" |   | second "box"  ...

Please excuse my lack of staff notation above, but I’m not really a MIDI kind of guy. But that explains the general idea.

There seem to be an almost limitless number of ways to use the idea.

  • There can be puzzles within puzzles.
  • Different puzzles can be used to control different musical aspects of a piece.
  • Output of the “solving” for a given puzzle (ie., all the steps that were considered by the AI heuristic function that led to the soltution) can also be used.
  • The list goes on and on …

Examples

I’ll just start with one example for the time being. The following isa short piece using an 8 puzzle described in the above manner. Thesolution is a run up the blues scale. I’d be curious to know whatfolks think about it.

PUZZLE.WAV (22k wav file – 1293356 bytes – 30 seconds)

The AI part was done using GCL 1.0 and the musical part was done using the Computer Music software package Cmix (the strum instrument).