The input of the programs takes place through commands in a console window
In MSWindows this may be a CMD window
in Linux or MinGW a terminal window.
For a description of programs balans, vernum and score2 see
Starting with version 7.0 program balans takes the optimalisation beyond the 2-pair interactions that determine the quality factor Qf, by also considering the "vacancy quality". In the following we call Qf1 the quality factor when one pair is absent. Qf1av and Qf1max are the average value and the maximum of Qf1. For a discussion see
example: balans -s 1000 nbb14.7.txt
[options] stands for a number of possible options.
Possibilities (in the following n is a positive number):
-c : check the movement, no optimalisation -s n : use n iterations for the optimalisation -f n : keep first n positions fixed -r n : keep round n fixed -t n : keep table n fixed -i n : keep pair n fixed -j n : keep board group n fixed (n=number or capital letter) -R n : keep all rounds fixed except round n -D n : keep all tables fixed except table n -I n : keep all pairs fixed except pair n (and its direct opponents) -J n : keep all boards fixed except board group n (n=number or capital letter) -a fixerfile: supply r * t fixers 0=free, 1=fixed -v n : pair n is absent -z : randomize compass directions before optimalisation -L : indicate board sets by capital letters -p : renumber pairs, give permutation on command line -m <filename> : export the updated movement to file <filename> (see also default filename) -Q : quiet mode. Prints only balance characteristics -P n1-n2 (e.g. -P 4-8): preferred range of absent pair nr. -W w1:w2 (e.g. -W 0:1): relative weight of Qf1max and Qf1av -k 0 : don't optimize d4 / -k 1: optimize d4 -S n:c1:c2 (e.g. -S 1:750:7.5): algorithm + optional temperature interval -T n : maximum time in seconds -h : give a short description of the options
-r -t -i and -j may be used several times to keep several subsets
-R -D -I and -J may be used several times to release several subsets simultaneously. Example '-D1 -D3': keep all tables fixed except tables 1 and 3.
Option -f only works on the first n positions.
Option -a <filename> is the most general way to keep tables fixed. For an example of a fixerfile see file fixers.txt. This file may be used for a command such as:
balans -a fixers.txt mitchell14.7.txtThe fixerfile may contain extra spaces and new lines.
Options -f -r -t -i -j overrule the data of the fixerfile.
balans -f6 -s1000 16p6rshortmitchell1.ascHowever it is not always a good idea to do so. For large/difficult movements such fixing will make life harder for balans, producing slightly worse Qf on average. Instead don't fix anything during very long optimisation runs (and use option -S too). When the quality is satisfactory, or no more optimisation time available, you may then beautify the result using option -J of vernum to revert the movement to the same form as if you had fixed the first round or table initially.
|0||≠ 0||optimize Qf1av only|
|≠ 0||0||optimize Qf1max only|
|0||0||don't optimize Qf1max or Qf1av|
|absent||w2 = 1.0|
The normal output of balans contains already the Quality factors Qf1(p) for all choices of absent pair p. With w2=0 combined with the option -P one can search for the optimum balance for any choice of absent pair(s), but this is in combination with maximum Qf for the full movement. Option -v should be used if you are not interested in the full movement, but only in the balance of a movement with one absent pair.
-S0 selects the default fast algorithm, taking c1:c2 (default 1:2000) as the start and peak temperatures. So not specifying -S at all is equivalent to -S0:1:2000. The higher the temperature (T), the greater the likelihood that we temporarily accept an arrow switch that increases the sum of squares (= decreases Qf). Such an increase may be needed in order to find an even lower value later on. T=1 is so low that essentially only immediate improvements are accepted. By default we start there. Later on, when T reaches the peak value 2000, the search will move around much more freely, closer to a random walk. With -S0 the temperature goes quickly up and down, up and down, with only approximately 100 iterations from peak to peak.
-S1 selects slow exponential cooling (or heating) from temperature c1 to temperature c2.
This algorithm should not be used for movements where the default -S0 easily finds the optimal Qf
and spends the rest of the time optimising Qf1max/Qf1av/d4. -S0 is best for those.
-S1 is targeted at cases where the best Qf is hard to find.
The default for c1:c2 is currently very crudely set to P:P/4 where P is the number of pairs in the movement. So for a 56 pair movement specifying -S1 is the same as -S1:56 and -S1:56:14.
The default -S0 algorithm is always recommended for at least one or a few short runs before -S1 is tried out for a few short runs too, perhaps 10000 iterations each. That makes it easier to guess a more useful temperature interval than the default one for longer -S1 runs. For the 100 pair 99 round endless Howell the default interval 100:25 seems to be perfect. But for many other large and/or difficult movements the default end temperature is too low, catching the search in a local optimum too early on and just wasting CPU without being able to escape after that. On rare occasions the default start temperature is too low too. If the -S0 trial runs found new optima at high T, consider starting the -S1 runs at high T too. After a moderately long -S1 run, a further minor improvement can often be quickly obtained by a short reheating from below to above the temperature where the present solution was found. Fast improvements happen much less frequently when a solution found by -S0 is fed into balans. That's because the -S0 algorithm already includes such retries with reheating automatically, searching very intensely several times near non-transient new optima. A short -S0 run may also be used to harden the output of a long -S1 run. If you aim for more than minor improvements, it's probably better to spend most of the time on -S1 cooling in a rather narrow interval around the T where the previous result of a semi-long -S1 run was found - before the final short -S1 or -S0 hardening. The main problem here is that exponential cooling spends too much time at some temperatures and too little at others. Manually chaining -S1 runs with varying intervals is a work-around for that. In a future version we expect to provide more intelligent adaptive cooling, e.g. at constant thermodynamic speed.
option -L: translates the board groups to letters. If, for examples you have a movement that starts with 8- 1 1 3- 6 4 2- 7 6 5- 4 7 option -L will translate this to: 8- 1 A 3- 6 D 2- 7 F 5- 4 G More possibilities to rearrange the board groups may be found in program 'vernum', options -N and -n. option -p: renumber the pairs. You must specify exactly the new order of pair numbers. The way this works is best illustrated with an example. Suppose we want to change the movement above such that in round 1 the order of pairs is 1 2 3 ... In other words we want to change 8 1 3 6 2 7 5 4 into: 1 2 3 4 5 6 7 8 Move the 1, together with the 2 below it, to position 1, etcetera, so we obtain the two rows 1 2 3 4 5 6 7 8 2 5 3 8 7 4 6 1 The lower series is what you should specify in the command, e.g.: balans -cLp howell4tafels.txt 2 5 3 8 7 4 6 1 This will change the first line into the "Universal Starting Position" 1- 2 A 3- 4 B 5- 6 C 7- 8 D
Finally the optimized movement is shown, as well as the scorematrix, a table of Qf1's, the sum of squares, standard deviation, Qf and a few other details.
The resulting movement is also written to a file as specified. Comments in this file give the most important characteristics of the movement.
balans -r1 -t1 -P15 -s1000 mitchell16.ascStarting from a standard 16-pair Relay Mitchell we want to obtain an optimized version in which round 1 and table 1 are kept fixed, and pair 15 is preferred as the absent one in case of a vacancy (because we then effectively avoid the board sharing between table 1 and 8). This leads to a movement with optimal balance, Qf=91.38 Qf1av=85.714, and fortunately also optimal balance if pair 15 is absent, Qf1(15)=Qf1max=87.50.
balans -r 1 -t 1 -P 15 -s 1000 mitchell16.asc
If you want the console output in a file instead of the screen give the command::
balans [options] movement-file > output-fileFor another example see outputexample.html
vernum [options] movement-file[options] stands for a number of possible options.
-Q : Quiet mode, print the balance parameters only -h : give a survey of the options -A : output movement confirming to Dutch standard -p : renumber pairs (see above) -L : translate board group numbers to letters (see above) -u : renumber to "Universal Starting Position" -w : Interchange NS, EW for all rounds and tables -z : randomly choose NS, EW for all rounds and tables -f -r -t -i -j -a fixerfile: (see above) These options influence the effect of -w and -z -R <round> : Arrow switch of one round -D <table> : Arrow switch of one table in all rounds -I <pair> : Arrow switch all tables where this pair plays -J <board> : Arrow switch all tables where this board group is played -v n : calculation for the case pair n is absent -N : Use numbers for the board groups in the output (program takes default sequence) -n <lowest number> : Use numbers for the board groups in the output but specify the sequence -m <filenaam> : output the resulting movement to file <filenaam> (see also default filename) -K <ntables> : sort the first <ntables> tables of every round according to boardset useful if you want to obtain a movement with stationary boards. -b <basis> : output movement as a set of base movements to find the base movements in a compound movement such as used in scoring across the field. -o <offset> : add <offset> to every odd pair number -e <offset> : add <offset> to every even pair number for combining base movements to a larger movement.
vernum -n 7 schemafile.txt A B C D E Fchanges 'A' into '7', 'B' into '8', etcetera.
10 6 6 6 0 1 2 A 3 4 B 5 6 C 7 8 D 9 10 E 0 0 0 4 7 A 6 9 B 10 8 C 2 5 D 0 0 0 1 3 F 9 8 A 10 1 B 3 2 C 0 0 0 7 6 E 5 4 F 6 3 A 8 5 B 0 0 0 1 9 D 4 2 E 10 7 F 5 10 A 0 0 0 7 1 C 4 6 D 3 8 E 9 2 F 0 0 0 7 2 B 9 4 C 3 10 D 5 1 E 6 8 FAfter:
10 6 6 6 0 g 1- 2 7 3- 4 8 5- 6 9 7- 8 10 9-10 11 0- 0 0 4- 7 7 6- 9 8 10- 8 9 2- 5 10 0- 0 0 1- 3 12 9- 8 7 10- 1 8 3- 2 9 0- 0 0 7- 6 11 5- 4 12 6- 3 7 8- 5 8 0- 0 0 1- 9 10 4- 2 11 10- 7 12 5-10 7 0- 0 0 7- 1 9 4- 6 10 3- 8 11 9- 2 12 0- 0 0 7- 2 8 9- 4 9 3-10 10 5- 1 11 6- 8 12
Option -N is a simplified version of this. The sequence of letters is in the order in which they appear in the movement, and the numbers start with 1.
-n en -N may also be used if the board groups are already numbers. Then, for -n, specify on the command line the old numbers in the order desired. When, for example, you have a movement with board groups 11 .. 17, then
vernum -n 1 klad.txt 17 16 15 14 13 12 11produces:
old: 17 16 15 14 13 12 11 new: 1 2 3 4 5 6 7If -p en -n are used simultaneously in one command supply first the pair numbers, then the board groups.
Universal begin position. Take care! This option renumbers only the pairs, not the board groups. To get the board groups in sequence use option -N, possibly followed by a run with -L
Further options for the hobbyist
-K, -b, -o, -e ...
If these don't work as expected, please let me know. I'm always in for further suggestions.
score2 [options] movement-file Options [n is an integer number] -T n : n = the score in percent of the strong pairs (normally 100) -e : extensive output, all possible scores per pair for all possible choices for the 2 strong pairs. -d : distribution of the scores (with sort of graph) on the screen. -x : export distribution of scores to a file -1 : there is only 1 strong pair. For this option the options above are ignored. -h : prints short survey of the options
|-i pair number||+||+|
|-j board group||+||+|
|-I pair number||+||+|
|-J board group||+||+|
|-v vacant pair nr||+||+|
|-k 0 / -k 1||+|
|-1   (= score1)||+|