Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customise strategy for other languages lexicon #102

Open
kay773312 opened this issue Dec 26, 2019 · 6 comments
Open

customise strategy for other languages lexicon #102

kay773312 opened this issue Dec 26, 2019 · 6 comments

Comments

@kay773312
Copy link

When I open the "worths" file (located in data>strategy) by notepad, I see the value of each letter. Not sure if it can be applied to other lexicons like loc (romanian) or swl (dutch)? I already have those lexicons yet the choice list has room for improvement (for instance, in a swl game, the top moves are usually retaining decent english letters but atrocious dutch letters like the C, H and Z, and romanian letters like C, D, N, S)

I've tried to edit the file using notepad but unable to save, is there any way to get it done?
Btw, so much appreciate to the latest version, it is a very brilliant work!

image

@jfultz
Copy link
Member

jfultz commented Dec 28, 2019

If you have a set of candidate worths for a given dictionary, and especially if you have some data to suggest that the worths are the result of reasonable game analysis, feel free to submit them (either as a pull request, or in textual form in an issue) and I can just add them to Quackle directly.

In 1.0.4, these are the worths files:

  • twl98/worths - TWL98-only (for legacy purposes0
  • default_english/worths - A generic one for all English dictionaries
  • ods5/worths - One for ODS5 (not sure what the origin of that one was)
  • default/worths - A single-line fallback for all other dictionaries which does nothing more than pump up the value of the blank.

As for editing files in the layout, that's an operating system issue. In your case, under Windows, I think that if you launch notepad as Administrator, you should be able to edit the file.

@kay773312
Copy link
Author

kay773312 commented Dec 29, 2019

This perfectly works for me but I still need to balance it before have it finalised. I'll try to submit it after a series of tweaking.

Edit: Just notice that it is not functioning well in romanian and norwegian probably due to some letters are absent in these languages. Say, C -6.0, N -5.0 (where K is missing in romanian), I tested the rack leave and found that the C is correctly valuated but the N leaves a positive equity in 7.5? How can I fix it?

It is perfectly working in dutch as they use the same alphabet.

@jfultz
Copy link
Member

jfultz commented Dec 29, 2019

It just needs to go into the right directory. Quackle looks for a directory named after the dictionary. If it doesn't find one there, then it uses the one in default (except for dictionaries which it knows to be English dictionaries, which fall back to default_english).

@kay773312
Copy link
Author

Thanks, the directory issue has been fixed. Now the rack leave valuation becomes the remaining problem. The letters worth in dutch is fine but not the case for romanian and norwegian. As mentioned in the last comment, it is prolly due to some absent letters.

This is the worth set I made for romanian, where K, Q, W and Y do not exist.
A 7.0
B 5.0
C -6.0
D -9.0
E 3.5
F 1.0
G 5.0
H 1.0
I 10.0
J -3.0
L 0.0
M 2.5
N -5.0
O -0.5
P -5.5
R 1.5
S -2.0
T 1.5
U 1.0
V 1.0
X -6.0
Z 8.0
? 25.0

However, the valuation does not reflect the real equity. For the rack "CDLNPSX" (most of them are inferior letters),
image
[I'm using loc5]

The N and X, and possibly P and S have positive equity, which are supposed to be very negative. While C, D and L are accurately valued.

@jimsemantic
Copy link

I'm curious, how are you determining the worths for each letter in Romanian? Are you using some empirical, automated method or just using your intuition?

@kay773312
Copy link
Author

I'm curious, how are you determining the worths for each letter in Romanian? Are you using some empirical, automated method or just using your intuition?

I had simulated thousands of games (didn't use any strategy and always played the top candidate choice (i.e., ctrl+g) , recorded the average score of each letter. The worth is determined under the stat result. This process comprised my subjective understanding towards romanian scrabble though.

As well, I studied the letter frequency in loc5 (more focused on 2-8 letter words). It gave me the fundamental impression that C, D, N, P are absolute garbage and A, I, B, G, Z are very overpowered.

Actually I made a letter set for romanian scrabble merely based on loc5 lexicon.


Letter-Value-Number
A-1-13 B-5-2 C-2-4 D-4-2 E-1-8 F-6-2 G-5-2 H-8-1 I-1-14 J-10-1 L-2-5
M-3-3 N-2-4 O-2-5 P-4-3 R-1-7 S-2-5 T-1-7 U-1-6 V-6-2 X-10-1 Z-5-1

1 point - I (14), A (13), E (8), R (7), T (7), U (6)
2 points - L (5), O (5), S (5), C (4), N (4)
3 points - M (3)
4 points - P (3), D (2)
5 points - B (2), G (2), Z (1)
6 points - F (2), V (2)
8 points - H (1)
10 points - J (1), X (1)
(or 2 Ps and 2 Zs)

This version is way more balanced with regard to letter equity and vowel-consonant ratio. The official versions have insufficient vowels (especially I and A, the letter I is too OP thus I made it 14 to reduce its equity).

A plain version in letter value (with same distribution)
1 point - A, C, E, I, L, N, O, R, S, T, U
2 points - D, M, P
3 points - B, G, Z
4 points - F, V
8 points - J
10 points - X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants