fix search cache weighting algorithm

This commit is contained in:
4am 2021-11-06 20:16:05 -04:00
parent 011948651a
commit bae93a3424
5 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def score(inputbuffer, displayname):
likely = False
score += x
startat += y + 1
score = int((score/len(displayname)) + (score/len(inputbuffer))+0.99)
score = int(score/len(displayname) + (score/len(inputbuffer)) + 0.99)/2
if (inputbuffer[0] == displayname[0]) and (score < 85):
score += 15
return score, likely
@ -128,4 +128,5 @@ def main():
print(f' !word {cache[a][b][c][d]}')
print(' !byte 0')
main()
if __name__ == '__main__':
main()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.