3400: Fuzzy Matching, Auto-stop

Metraxis

Member
This is more of an a quirk than a show-stopper, but if the same fuzzy-matching code is used in several places, it might point to more serious issues elsewhere.

Code:
 > familiar nin  
Putting Isabella Kieren the Cymbal-Playing Monkey back into terrarium... 
Taking Igor the Misshapen Animal Skeleton out of terrarium... 
lead necklace is better than (none). 
Switching items... 
Stealing lead necklace from Cymbal-Playing Monkey... 
Putting on lead necklace... 
Equipment changed.

 > familiar ninj  
Putting Igor the Misshapen Animal Skeleton back into terrarium... 
Taking The Late Ryu no Ahnuld Sparrow the Ninja Pirate Zombie Robot out of terrarium... 
lead necklace is better than (none). 
Switching items... 
Stealing lead necklace from Misshapen Animal Skeleton... 
Putting on lead necklace... 
Equipment changed.

 > familiar cy  
Putting The Late Ryu no Ahnuld Sparrow the Ninja Pirate Zombie Robot back into terrarium... 
Taking Whappa the Blood-Faced Volleyball out of terrarium... 
lead necklace is better than (none). 
Switching items... 
Stealing lead necklace from Ninja Pirate Zombie Robot... 
Putting on lead necklace... 
Equipment changed.  

> familiar cym  
Putting Whappa the Blood-Faced Volleyball back into terrarium... 
Taking Isabella Kieren the Cymbal-Playing Monkey out of terrarium... 
lead necklace is better than (none). 
Switching items... 
Stealing lead necklace from Blood-Faced Volleyball... 
Putting on lead necklace... 
Equipment changed.

As you can see, the matcher passes over an instance of the exact substring in favor of something close (nim vs nin) at least in the first case. The second, I have no explanation for.

It seems there may be a conditional that has been added to the vacation areas, of which I am unaware. For the following snippet, no actual conditions were set, and mood was "apathetic".
Code:
> adv 5 moxie vacation  
Request 1 of 5 (Beach: Moxie Vacation) in progress... 
Encounter: An eXtreme Vacation 
You gain 14 Cheek 
Nothing more to do here.
 

holatuwol

Developer
No, familiar switching was changed to use fuzzy matching in a weird way, because the list it's searching isn't a list of strings.  Before, it was just substring matching. Right now, it returns the first one in alphabetical order that fuzzy matches. I should probably have it do substring matching first, then do fuzzy matching.   I'll try to remember when I get back from school.

The other bug was fixed after 3400 and was introduced in an attempt to guard against adventure validation code that uses not-yet-known text, since that would result in KoLmafia hammering on the servers over and over again, since it didn't see the adventure count drop in an adventure.
 
Top