itch.io is community of indie game creators and players

Devlogs

There is a bug in the fuzzy keyword-matching system

There is a bug in the fuzzy keyword-matching system.

When the player’s input contained duplicate letters, the system count those duplicates multiple times when matching against a keyword.

Example:

Keyword: READ DIALY ← 9 characters to check

Player input: PULL DRAWER

The system incorrectly counted the matches as:

Matched characters = 6 (R, E, A, D, L, L) ← Incorrect

The correct count should be 5, but when checking the two “L”s in DIALY, it mistakenly counted both “L”s from PULL as matches.

Although the duplicate-counting issue has now been fixed, in the example above the match ratio becomes 5/9, which still results in the system treating two completely unrelated words as a match.

This shows my original fuzzy-matching logic was insufficiently thought through. I sincerely apologize.

I am currently working on a better fuzzy-matching method.

Please wait for the next release.

Leave a comment