Intelligent Hinting

version 5 by Aaron Reed

  • Home page
  • Beginning
  • Previous
  • Next

  • Chapter: Puzzles

    Section: Defining Puzzles

    For the purposes of this extension, we can define a puzzle as "a goal that must be accomplished to move the game towards completion." This concept is embodied here in a new kind of object, the "puzzle". Puzzles represent not specific actions but conceptual building blocks, the big-picture steps needed to finish the game.

    Large puzzles are sometimes comprised of smaller puzzles. The new "requiring" relation is used to emulate this. If one puzzle requires another, it means the second must be solved before the first can be considered as such. In fact, this is the definition of solved: if everything a puzzle requires is solved, it itself is solved. We can check whether a puzzle is "solved" or "unsolved", but cannot set this by hand. (We'll explain later how puzzles do become solved.)

    Intelligent Hinting defines one puzzle by default, "Winning-The-Game," which must require a sequence of puzzles broadly outlining the necessary steps to finish the game from beginning to (one) ending.

    For the standard IF example game, Cloak of Darkness, we might define three puzzles:

        Winning-The-Game requires Noticing-The-Dark-Room, Hanging-The-Cloak, and Reading-The-Message.

    (Hyphenating puzzle names is not required, but is a useful habit to adopt, since puzzle names often involve the names of objects or rooms and therefore can easily confuse Inform.)

    Crowther and Woods' classic, Adventure, contains many, many more puzzles; but on the highest level, the overview is almost as simple:

        Winning-The-Game requires Entering-The-Cave, Staying-Alive, Finding-Most-Treasures, Final-Treasures, and Solving-The-Master-Level.

    Finding-Most-Treasures is broken down into a group of puzzles like Mt-King-Area-Treasures, Plover-Treasures, etc., and some of those in turn require additional puzzles detailing the steps needed to complete each of those sequences.

    By default, the order in which we list the required puzzles is the order they must be solved in. We can change this by declaring a single puzzle to be "not sequential," in which case the steps it requires may be solved in any order. A puzzle is "sequential" by default.