diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-01-24 19:22:55 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-01-24 19:22:55 -0500 |
| commit | 09a8e791c59b3a03bb30d71080e4c915cc8a928e (patch) | |
| tree | ab071b32333088d666b686e98ba8093767f4712b /mapScore.py | |
| parent | 7e4bb432537ffdf56a4b2abb03878b0009a4e4a9 (diff) | |
| download | swipeGuess-09a8e791c59b3a03bb30d71080e4c915cc8a928e.tar.gz | |
Revert "map scoring: weight length of word"
This reverts commit b2eed7eee4f4730b458bfd3bac285363dd15b938.
Diffstat (limited to 'mapScore.py')
| -rwxr-xr-x | mapScore.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mapScore.py b/mapScore.py index 154142f..61a5259 100755 --- a/mapScore.py +++ b/mapScore.py @@ -21,10 +21,9 @@ def scoreWord(word,mm): pc=word[0] or ' ' s=0 for c in word: - #manhattan dist * 10 - s+=abs(mm[ord(pc)][0]-mm[ord(c)][0])*10 - s+=abs(mm[ord(pc)][1]-mm[ord(c)][1])*10 - s+=1 # longer word bias + #manhattan dist + s+=abs(mm[ord(pc)][0]-mm[ord(c)][0]) + s+=abs(mm[ord(pc)][1]-mm[ord(c)][1]) pc=c return s |
