Adaptive Hints

version 6 by Eric Eve

  • Home page
  • Beginning
  • Previous



  • Example: ** Escape from an Old House - A short game with several adaptive hints

        "Escape from an Old House" by Eric Eve

        Include Adaptive Hints by Eric Eve.

        Part 1 - Hint Tables

        Table of Potential Hints (continued)
      title  subtable    
      "What should I do now?"  Table of General Hints    
      "What can I do in the Hall?"  Table of Hall Hints  
      "What should I do in the Lounge?"  Table of Lounge Hints    
      "How do I open the front door?"  Table of Front Door Hints  
      "How do I unlock the tall cabinet?"  Table of Cabinet Hints  
      "How can I get through the window?"  Table of Window Hints  
      "How do I unlock the front door?"  Table of Iron Key Hints  

        Table of General Hints
      hint  used  
      "Try exploring a bit."  a number  
      "Then trying exploring a bit more."  
      "Have you explored enough yet?"  

        Table of Lounge Hints
      hint  used  
      "Look around."  
      "But frankly there's not much here."  
      "Except that mouldy old carpet."  

        Table of Hall Hints
      hint  used  
      "Search it thoroughly."  
      "What did you find?"  
      "Perhaps that tall cabinet is worth investigating."  

        Table of Cabinet Hints
      hint  used  
      "Obviously, you need to find a key."  
      "Maybe it's been dropped somewhere."  
      "Somewhere not that obvious."  
      "And maybe it slid under something."  
      "Like a carpet."  

        Table of Front Door Hints
      hint  used  
      "Well, finding the key would be a start."  
      "It may not be far from the front door"  
      "Have you tried looking in the cabinet?"  
      "What did you find there?"  

        Table of Iron Key Hints
      hint  used  
      "What did you find in the hall cabinet?"  
      "How thoroughly have you examined it?"  
      "Did it have a pocket?"  
      "What was in the pocket?"  


        Table of Window Hints
      hint  used    
      "Forget it"  
      "There's no way you're going to get through that window."  


        A hint deactivation rule:
    if the number of visited rooms is the number of rooms - 1,
    deactivate the Table of General Hints.

        A hint deactivation rule:
    If the tall cabinet has been open begin;
            deactivate the Table of Cabinet Hints;
            deactivate the Table of Hall Hints;
            deactivate the Table of Front Door Hints;
        end if.

        A hint deactivation rule:
        If the iron key is seen begin;
            deactivate the Table of Window Hints;
            deactivate the Table of Iron Key Hints;
    end if.

        A hint deactivation rule:
        If the brass key is seen, deactivate the Table of Lounge Hints.

        A hint activation rule:
        if the lounge is visited, activate the Table of Lounge Hints.

        A hint activation rule:
        If the hall is visited, activate the Table of Hall Hints.

        A hint activation rule:
        If the window is seen, activate the Table of Window Hints.

        A hint activation rule:
        If the tall cabinet has been open,
            activate the Table of Iron Key Hints.

        Part 2 - Game World

        Chapter 1 - Setup

        Use full-length room descriptions.
        When play begins: activate the Table of General Hints.

        After printing the banner text when the turn count is 1:
        say "[line break]You woke up this morning to find yourself trapped in this creepy old house. Now you just want to get out."

        Every thing is either seen or unseen. A thing is usually unseen.

        Before printing the name of a thing (called the item):
        Now the item is seen.

        Carry out examining something (called the item):
        Now the item is seen.

        The maximum score is 4.

        Chapter 2 - The Map

        Section 1 - The Drawing Room

        The Drawing Room is a room. "A window overlooks the drive to the north, but unfortunately it is solidly barred and there seems to be no way to open it. But you could go south to the lounge or east to the hall."

        The barred window is scenery in the drawing room. The description is "You can see through it onto the drive, but there seems to be no way you could open it, and even if you could the bars would prevent your climbing through." Understand "bars" as the window.

        Instead of entering or opening the window:
    now the window is seen;
        say "The bars prevent you."

        Instead of attacking the window:
        now the window is seen;
        say "Beating your bare fists against the bars proves painful and unproductive."


        Section 2 - The Lounge

        The Lounge is a room. "A mouldy carpet covers most of the floor all the way up to the archway leading into the drawing room to the north."

        The mouldy carpet is scenery in the lounge. The description is "Worn and woven in muddy colours, this carpet was probably new when Horatio Nelson was still a midshipman."

        Instead of looking under the mouldy carpet for the first time:
        Now the brass key is carried by the player;
        increase score by 1;
        say "You turn up one corner of the carpet after another, and your fourth attempt you find a small brass key, which you duly take."

        Instead of looking under the mouldy carpet:
        say "You find nothing more but dust."

        The plain archway is a door. It is south of the Drawing Room and north of the Lounge. It is scenery, open and unopenable. The description is "Rather plain, it nevertheless just about serves to separate the drawing room and lounge into two separate areas."

        Section 3 - The Hall

        The Hall is east of the Drawing Room.
        "Large enough to count as pretentious, the hall stretches towards a heavy front door to the north. A broad staircase leads up to the first floor, while the drawing room lies to the west."

        The tall wooden cabinet is here. "A tall wooden cabinet stands proudly against the wall." The cabinet is a container. It is openable, closed, lockable, locked and fixed in place. The description is "You're no expert on antique furniture, but you'd judge this to be a regency piece." Understand "regency" or "antique" or "furniture" as the tall wooden cabinet.

        The small brass key unlocks the tall wooden cabinet.

        Before opening the tall wooden cabinet when the cabinet is locked:
        activate the Table of Cabinet Hints.

        The old trench coat is in the cabinet. "An old trench coat hangs in the cabinet". It is wearable. The description is "It looks battered enough to have been through the Battle of the Somme. It does have one pocket still intact however."

        The pocket is part of the coat. It is an unopenable open container. Understand "coat pocket" as the pocket.

        Instead of searching the coat, try searching the pocket.

        In the pocket is a large iron key. The description of the large iron key is "It looks just the job for unlocking a large, heavy door."

        The solid front door is a door. It is north of the hall and south of the drive. The description is "It's made of thick, solid oak. There's clearly going to be no way through it without opening it, and it's current [if open]open[otherwise]firmly closed[end if]." It is closed, scenery, lockable and locked. The large iron key unlocks the front door.

        Before opening the front door when the front door is locked:
        activate the Table of Front Door Hints.

        The drive is a room. After going to the drive:
        say "At last, you're out of that wretched house!";
    increase score by 3;
    end the story finally saying "You have won".

        The staircase is a door. The staircase is above the Hall and below the Landing. It is scenery, open and unopenable. Understand "stairs" as the staircase.

        Instead of climbing the staircase: try entering the staircase.

        Section 4 - The Landing

        The Landing is a room. "This long landing runs between many bedrooms, all of which you have searched thoroughly already. A staircase leads back down to the hall."

        Instead of going nowhere from the landing, say "You've already searched thoroughly up here, and in any case the only way out of this wretched house is surely downstairs."


        Chapter 3 - Testing

        test first with "Open window/break window/e/n/open door/climb the stairs/n/d/open the cabinet"

        test second with "w/s/look under the carpet/n/e/unlock the cabinet/open it/look in cabinet"

        test third with "take coat/wear it/x it/look in pocket/unlock door with iron key/open door/n"

        test me with "test first/test second/test third"

    Note that although this test runs through the game to completion, it doesn't of itself demonstrate the hint system. For that you need to run through the game manually and try out the hints every few turns to see how they change.