Noticing when the player seems to be at a loss, and recommending the use of hints.

Suppose we'd like to watch for signs that the player is floundering, and if we see them, recommend that he try the hints. There are probably more sophisticated diagnostics, but as a first cut, let's assume that a player who repeatedly reviews descriptions of objects he's already seen, looks around the room, and takes inventory, is at a loss for more productive activities. So then…

"Y ask Y?"
A thing can be examined or unexamined. A thing is usually unexamined. Carry out examining something: now the noun is examined.
Taking inventory is acting confused. Looking is acting confused. Examining an examined thing is acting confused.
After acting confused for the sixth turn:
   say "(If you are feeling lost, try typing HELP for suggestions.)"

And now we write a scenario which will, alas, rather encourage even a deft and clueful player to play as though he were hopelessly confused:

The story headline is "or: Bad Author, No Biscuit".
The description of a thing is usually "Hm. [The item described] reminds you quite a lot of [a random visible thing which is not the item described]."
The Yurt is a room.
Food is a kind of thing. Food is always edible. In the Yurt are a yam and a dish of yakitori. The yam and the yakitori are food. The description of food is "Well, at least it's not [a random edible thing which is not the item described]."
In the Yurt is an animal called a yapok.
The player wears a yukata. The player carries a yataghan.
Every turn:
   if a random chance of 1 in 2 succeeds and something is examined:
      say "Your eye is attracted by some kind of surreptitious movement from [the random examined thing].";
   otherwise if the player carries something and a random chance of 1 in 3 succeeds:
      say "[The random thing carried by the player] tries to slip from your grasp."
Test me with "x yam / x yam / look / x yam / i / look / i / help / quit".

And finally a little dollop of perversity from a later chapter:

Check quitting the game:
   say "You're sure? ";
   if player consents, say "[line break]You were getting close to a breakthrough, you know.[line break]";
   otherwise stop the action.
Understand "help" as a mistake ("You're doing fine! Just keep at what you're doing now.").
Test me with "x yam / x yam / look / x yam / i / look / i / help / quit".
Yurt
You can see a yam, a dish of yakitori and a yapok here.

>(Testing.)

>[1] x yam
Well, at least it's not a dish of yakitori.

Your eye is attracted by some kind of surreptitious movement from the yam.

>[2] x yam
Well, at least it's not a dish of yakitori.

>[3] look
Yurt
You can see a yam, a dish of yakitori and a yapok here.

Your eye is attracted by some kind of surreptitious movement from the yam.

>[4] x yam
Well, at least it's not a dish of yakitori.

Your eye is attracted by some kind of surreptitious movement from the yam.

>[5] i
You are carrying:
a yukata (being worn)
a yataghan

>[6] look
Yurt
You can see a yam, a dish of yakitori and a yapok here.

>[7] i
You are carrying:
a yukata (being worn)
a yataghan

(If you are feeling lost, try typing HELP for suggestions.)

Your eye is attracted by some kind of surreptitious movement from the yam.

>[8] help
You're doing fine! Just keep at what you're doing now.

>[9] quit
You're sure?
You were getting close to a breakthrough, you know.