Numbered Disambiguation Choices bug with directions

Someone reported a bug in Counterfeit Monkey today. They typed “GET DIRECTIONS TO HOTEL”, which was reinterpreted as “GET DIRECTIONS”, and asked which directions they meant, 1) north, 2) northeast, and so on.

(That’s a classic Inform bug—automatic plural synonyms for nine-letter kinds. Not going anywhere any time soon, unless you turn on a special use option.)

The next command then crashed with a run-time problem, because directions cannot have the property “disambiguation id”. In other words, the problem is that Numbered Disambiguation Choices never expected directions to be disambiguated.

This seems like an easy bug to fix…but I’m not sure where to go about fixing it. What’s the current version of Numbered Disambiguation Choices that people use?

We have fixed directions causing problems in (the Counterfeit Monkey version of) Numbered Disambiguation Choices before, see for instance An observation on directions and another niggle in Numbered Disambiguation Choices - #5 by Angstsmurf, but apparently we missed this one.

EDIT: No, we did not miss this one. It was fixed on August 20, 2023, in commit 2805963, but the reporter is using the last official release from February that same year, which does not have the fix.

I think that is only a partial fix, through, as it only removes the verbatim word “direction”. There is a possibility a direction might end up in a disambiguation list some other way and still cause the crash.

The bug persists in the Inform 10 friends of Inform repo.

I ran into that problem, too: Run-time error possibly related to Numbered Disambiguation Choices by Aaron Reed - Authoring / Inform 7 - The Interactive Fiction Community Forum

For my own education:

  1. is there a reason not to just let objects writ large have disambiguation ids?
  2. it seems that some kinds (directions, rooms, regions) but not all (things) have synonyms for their names. These distinctions don’t seem to be made in the standard rules. Where does this happen? Does anyone know why? It seems like understand "regions" as a region is something an author might cook up for pretty narrow reasons

Inform really doesn’t like working with bare objects on their own. As far as I know, there’s no way to assign a property to all objects; it’s hard to even create a bare object without another type.

That’s part of why I’m looking forward to Inform 11 providing its own “abstract object” type. Making new object subtypes is tough because you have to make sure they provide all the key properties that make Inform work. Subtyping “abstract object” is much easier.

I’d like to draw attention to @climbingstars ’ replacement for Numbered Disambiguation Choices (NDC), which they call Custom Disambiguation (CD).

NDC has been great, but a number of deep-seated bugs have been found in it over time, some of which are unfixable for programming architecture reasons (e.g. the one where sometimes you type 1 because you want option 1, and it picks 2 anyway.)

CD is programmed differently and eliminates even ye olde 1 v 2 bug. I’ve been testing it in my WIP for about a year now, replacing NDC which had been in my WIP for years, and climbingstars has been attending to bugs and things I’ve found. It’s pretty stable now, so I would encourage people to give it a spin.

I’m posting the current versions here just because they were last updated in a PM.

For Inform 10:
Custom Disambiguation.i7x (23.3 KB)

For 6M62:
Custom Disambiguation.i7x (23.0 KB)

-Wade

Actually, the 9-letter limit was of Z-machine; that surfaces under the much vaster glulx environment surprises me.

so, is possible adding correct handling of PDA between superheroes and/or superheroines (perhaps the most funny example in the DM4…) to glulx inform ? :wink:

Best regards from Italy,
dott. Piergiorgio.

In Glulx it’s a setting that can be changed, but it defaults to nine letters because that’s what people are used to from the Z-machine.

The Å-machine, quite sensibly imo, disposed of it entirely!