Skip to content

Instantly share code, notes, and snippets.

@ArneBab
Created May 27, 2021 20:09
Show Gist options
  • Save ArneBab/874c9900d9b378faff74a32a3b82c901 to your computer and use it in GitHub Desktop.
Save ArneBab/874c9900d9b378faff74a32a3b82c901 to your computer and use it in GitHub Desktop.
$ hg log -r "::onehandright - ::default" -p ../config.py
changeset: 1796:4ef5b7d999db
branch: onehandright
user: Arne Babenhauserheide <arne_bab@web.de>
date: Wed Apr 03 11:42:31 2019 +0200
summary: adjust config for a right-hand one-hand layout
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -58,10 +58,10 @@ WEIGHT_CRITICAL_FRACTION_MULTIPLIER = 2
COST_PER_KEY = [
# The 0 values aren’t filled in at the moment.
# Don’t put mutated keys there, otherwise the best keys will end up there!
- [80, 70,60,50,50,60, 60,50,50,50,50,60,70, 80], # Zahlenreihe (0)
- [24, 16,10, 5,12,17, 20,13, 5, 9,11,20,36, 0], # Reihe 1
- [9, 5, 3, 3, 3, 6, 6, 3, 3, 3, 5, 9,30, 6], # Reihe 2; enter low to make it preferred over the layer 4 enter.
- [20,16, 19,24,20,9, 30, 10, 8,22,22,17, 19], # Reihe 3
+ [120, 110,90,80,70,70, 60,50,50,50,50,60,70, 80], # Zahlenreihe (0)
+ [64, 56,50,45,52,37, 20,13, 5, 9,11,20,36, 0], # Reihe 1
+ [49, 45,43,43,43,26, 6, 3, 3, 3, 5, 9,30, 6], # Reihe 2; enter low to make it preferred over the layer 4 enter.
+ [20,56, 59,64,60,49, 30, 10, 8,22,22,17, 19], # Reihe 3
[0,0,0, 3 , 7, 0, 0, 0] # Reihe 4 mit Leertaste
]
@@ -111,12 +111,12 @@ WEIGHT_INTENDED_FINGER_LOAD_LEFT_PINKY_T
## Handswitching
-WEIGHT_TOO_LITTLE_HANDSWITCHING = 1200 #: how high should it be counted, if the hands aren’t switched in a triple?
+WEIGHT_TOO_LITTLE_HANDSWITCHING = -1200 #: how high should it be counted, if the hands aren’t switched in a triple?
-WEIGHT_NO_HANDSWITCH_AFTER_DIRECTION_CHANGE = 1 #: multiplier for triples without handswitch in which there also is a direction change? Also affects the “unweighted” result from total_cost!
+WEIGHT_NO_HANDSWITCH_AFTER_DIRECTION_CHANGE = 0 #: multiplier for triples without handswitch in which there also is a direction change? Also affects the “unweighted” result from total_cost!
WEIGHT_NO_HANDSWITCH_WITHOUT_DIRECTION_CHANGE = 0 #: multiplier for triples without handswitch in which the direction doesn’t change. Also affects the “unweighted” result from total_cost!
-WEIGHT_NO_HANDSWITCH_AFTER_UNBALANCING_KEY = 53 #: How much penalty we want if there’s no handswitching after an unbalancing key. Heavy unbalancing (wkßz, M3 right, return and the shifts) counts double (see UNBALANCING_POSITIONS). This also gives a penalty for handswitching after an uppercase letter. Wolfs Value: 10
+WEIGHT_NO_HANDSWITCH_AFTER_UNBALANCING_KEY = 0 #: How much penalty we want if there’s no handswitching after an unbalancing key. Heavy unbalancing (wkßz, M3 right, return and the shifts) counts double (see UNBALANCING_POSITIONS). This also gives a penalty for handswitching after an uppercase letter. Wolfs Value: 10
WEIGHT_UNBALANCING_AFTER_UNBALANCING = 4 #: If an unbalancing key follows another unbalancing one on the other side of the hand, the cost of that key gets multiplied with this weighting and added, too. Wolfs Value: 2
WEIGHT_NEIGHBORING_UNBALANCE = 400 #: The penalty for an unbalancing key following after a neighboring finger or vice versa. Wolfs Value: 5
changeset: 1805:70bb8beb5c71
branch: onehandright
user: Arne Babenhauserheide <arne_bab@web.de>
date: Wed Apr 03 12:38:53 2019 +0200
summary: start with faster regularity
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -272,9 +272,12 @@ for finger in ("Klein_L", "Klein_R"):
# Irregularity. This counteracts tendencies of the optimizer to only cater to common bigrams.
+## settings for slowest regularity calculation:
IRREGULARITY_REFERENCE_TEXT = "corpus_irregularity_words.txt"
# use only a randomly selected fraction of the words at each step. Random sampling ensures that there is no consistent bias due to the word selection. Using all words makes the optimization very slow. 0.01 still increases the cost by factor 2. Currently 0.004 are about 400 words.
IRREGULARITY_WORDS_RANDOMLY_SAMPLED_FRACTION = 0.004 # the fraction of words to use, re-sampled at every run. Set to 1.0 to use all words.
+# WEIGHT_IRREGULARITY_PER_LETTER = 0.00 # 0.01 is be around 1.0% of the total cost. Set to 0 to disable irregularity checking.
+## for somewhat faster irregularity by correlation:
WEIGHT_IRREGULARITY_PER_LETTER = 0.00 # 0.01 is be around 1.0% of the total cost. Set to 0 to disable irregularity checking.
# TODO: Cost for similar keys in symmetric positions. That’s bad *except* if the symmetry is consistent. (hard consonants always on one side or always above)
changeset: 1807:84861897adee
branch: onehandright
parent: 1805:70bb8beb5c71
user: Arne Babenhauserheide <arne_bab@web.de>
date: Wed Apr 03 14:55:14 2019 +0200
summary: fix: handswitching optimization was disabled
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -113,10 +113,10 @@ WEIGHT_INTENDED_FINGER_LOAD_LEFT_PINKY_T
WEIGHT_TOO_LITTLE_HANDSWITCHING = -1200 #: how high should it be counted, if the hands aren’t switched in a triple?
-WEIGHT_NO_HANDSWITCH_AFTER_DIRECTION_CHANGE = 0 #: multiplier for triples without handswitch in which there also is a direction change? Also affects the “unweighted” result from total_cost!
-WEIGHT_NO_HANDSWITCH_WITHOUT_DIRECTION_CHANGE = 0 #: multiplier for triples without handswitch in which the direction doesn’t change. Also affects the “unweighted” result from total_cost!
+WEIGHT_NO_HANDSWITCH_AFTER_DIRECTION_CHANGE = 1 #: multiplier for triples without handswitch in which there also is a direction change? Also affects the “unweighted” result from total_cost!
+WEIGHT_NO_HANDSWITCH_WITHOUT_DIRECTION_CHANGE = 1 #: multiplier for triples without handswitch in which the direction doesn’t change. Also affects the “unweighted” result from total_cost!
-WEIGHT_NO_HANDSWITCH_AFTER_UNBALANCING_KEY = 0 #: How much penalty we want if there’s no handswitching after an unbalancing key. Heavy unbalancing (wkßz, M3 right, return and the shifts) counts double (see UNBALANCING_POSITIONS). This also gives a penalty for handswitching after an uppercase letter. Wolfs Value: 10
+WEIGHT_NO_HANDSWITCH_AFTER_UNBALANCING_KEY = 1 #: How much penalty we want if there’s no handswitching after an unbalancing key. Heavy unbalancing (wkßz, M3 right, return and the shifts) counts double (see UNBALANCING_POSITIONS). This also gives a penalty for handswitching after an uppercase letter. Wolfs Value: 10
WEIGHT_UNBALANCING_AFTER_UNBALANCING = 4 #: If an unbalancing key follows another unbalancing one on the other side of the hand, the cost of that key gets multiplied with this weighting and added, too. Wolfs Value: 2
WEIGHT_NEIGHBORING_UNBALANCE = 400 #: The penalty for an unbalancing key following after a neighboring finger or vice versa. Wolfs Value: 5
changeset: 1808:b594128dffd3
branch: onehandright
user: Arne Babenhauserheide <arne_bab@web.de>
date: Wed Apr 03 15:10:55 2019 +0200
summary: favor massive hand disbalance
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -92,7 +92,7 @@ LONG_FINGERS = ["Ring_L", "Mittel_L", "M
## Finger and Hand disbalance in load
-WEIGHT_HAND_DISBALANCE = 80 #: Disbalance between the load on the hands. Calculated from the finger disbalance, but coarser. If both hands have slightly unequal load on the individual fingers, but overall both hands have the same load, the layout feels equal.
+WEIGHT_HAND_DISBALANCE = -800 #: Disbalance between the load on the hands. Calculated from the finger disbalance, but coarser. If both hands have slightly unequal load on the individual fingers, but overall both hands have the same load, the layout feels equal.
WEIGHT_FINGER_DISBALANCE = 2000 #: multiplied with the standard deviation of the finger usage - value guessed and only valid for the 1gramme.txt corpus.
changeset: 1813:7fdc6d3e02ea
branch: onehandright
parent: 1808:b594128dffd3
user: Arne Babenhauserheide <arne.babenhauserheide@disy.net>
date: Wed Apr 03 17:39:09 2019 +0200
summary: speed up stuff to get a qwertz-similar layout for righthand
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -92,7 +92,7 @@ LONG_FINGERS = ["Ring_L", "Mittel_L", "M
## Finger and Hand disbalance in load
-WEIGHT_HAND_DISBALANCE = -800 #: Disbalance between the load on the hands. Calculated from the finger disbalance, but coarser. If both hands have slightly unequal load on the individual fingers, but overall both hands have the same load, the layout feels equal.
+WEIGHT_HAND_DISBALANCE = -2000 #: Disbalance between the load on the hands. Calculated from the finger disbalance, but coarser. If both hands have slightly unequal load on the individual fingers, but overall both hands have the same load, the layout feels equal.
WEIGHT_FINGER_DISBALANCE = 2000 #: multiplied with the standard deviation of the finger usage - value guessed and only valid for the 1gramme.txt corpus.
@@ -111,7 +111,7 @@ WEIGHT_INTENDED_FINGER_LOAD_LEFT_PINKY_T
## Handswitching
-WEIGHT_TOO_LITTLE_HANDSWITCHING = -1200 #: how high should it be counted, if the hands aren’t switched in a triple?
+WEIGHT_TOO_LITTLE_HANDSWITCHING = -12000 #: how high should it be counted, if the hands aren’t switched in a triple?
WEIGHT_NO_HANDSWITCH_AFTER_DIRECTION_CHANGE = 1 #: multiplier for triples without handswitch in which there also is a direction change? Also affects the “unweighted” result from total_cost!
WEIGHT_NO_HANDSWITCH_WITHOUT_DIRECTION_CHANGE = 1 #: multiplier for triples without handswitch in which the direction doesn’t change. Also affects the “unweighted” result from total_cost!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment