From bae93a3424c6f120a7c6aed4389339ab28e2f1df Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 6 Nov 2021 20:16:05 -0400 Subject: [PATCH] fix search cache weighting algorithm --- bin/buildcache.py | 5 +++-- res/CACHE00.IDX | Bin 2261 -> 2258 bytes res/CACHE01.IDX | Bin 2478 -> 2494 bytes res/CACHE10.IDX | Bin 2961 -> 2958 bytes res/CACHE11.IDX | Bin 3583 -> 3593 bytes 5 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/buildcache.py b/bin/buildcache.py index 6529c80f9..f956b1fe9 100755 --- a/bin/buildcache.py +++ b/bin/buildcache.py @@ -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() diff --git a/res/CACHE00.IDX b/res/CACHE00.IDX index ffc25544ee1d0063aa16fca26dc02228de998050..98c8bd422f07c713f288678efcc1fcc85c53881d 100644 GIT binary patch delta 892 zcmX9+TWnNS6kP+IvB(FRLPI*0*h(N2Qd$Wenu6&MXbkXC5)r@5xp(d`SMG~D_x9S7 z@Q6y}Y3V_z4+vsEK==U0bI#Qmpb(UX3IuFI`k^F1jE^cLJQT`fPx#tvueHv~N!A`t zUrG0T{?a_KGbL?4^lPR30<4~m!fz$(?~>gL_x>(3Uih{s_Mx+vOrL=rK<)sHNSN#S?}_>iJ4Muw z?ypEY4Av*KLog1C{81DR3$rAw6L3rL21WQSIlcqCEHs7O0E`%YrJVeyvyGe51T9{4Bx+h+4?C5UdsYBA7~*TOUwi6QVYBmE+pro>Sm0 z6|YSiQqWf*SV8RDFt74W6)#tfP%H1k`IUZUz{oIg!2p4AcO&cXkQ^k1N#hkG93 zTjcr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