mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-23 12:33:32 +00:00
fix search cache weighting algorithm
This commit is contained in:
parent
011948651a
commit
bae93a3424
@ -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()
|
||||
|
BIN
res/CACHE00.IDX
BIN
res/CACHE00.IDX
Binary file not shown.
BIN
res/CACHE01.IDX
BIN
res/CACHE01.IDX
Binary file not shown.
BIN
res/CACHE10.IDX
BIN
res/CACHE10.IDX
Binary file not shown.
BIN
res/CACHE11.IDX
BIN
res/CACHE11.IDX
Binary file not shown.
Loading…
Reference in New Issue
Block a user