Introduction to the command line tool "ScriptableCraft" - patwonder/craft-othello GitHub Wiki

ScriptableCraft: an othello script runner similar to ScrZebra. See http://radagast.se/othello/download2.html for details about ScrZebra and script file formats:

The Othello endgame script format was devised by Raphael Schreiber , Stéphane Nicolet and myself (Gunnar Andersson) and is as follows:

  • Each line not beginning with a % contains a position to solve: First a 64-character string containing the board position, then one or more spaces, then one character which indicates whose turn it is to move. The string contains the contents of the squares in row-wise order, i.e., a1-b1-c1-...-g8-h8. Black discs are denoted by *, X or x, white discs are denoted by O, 0 or o and empty positions are denoted by - or .. * Each line beginning with a % is a comment. It is also allowed to have trailing comments (beginning with a %) at the end of lines containing positions.

ScriptableCraft can run the same scripts as ScrZebra can, and has some extensions, including:

  • Using '#' as well as '%' to comment
  • Using 'B' as well as 'X' to mark black discs, and 'W' as well as 'O' to mark white discs. Any other characters marks the empty square.
  • Can specify additional options after each position(case insensitive):
    • WARMUP: This position is for warmup purpose (time spent will not be included in the final statistics)
    • WLD: Need only solve Win/Loss/Draw
    • MIDn: Need only perform a mid-game search, and the depth is determined by n, e.g. MID12 to search 12 steps
  • One line of statistics will be added when the script finishes running, which contains info about total nodes, total time spent and overall search speed.

Sample command line:

ScriptableCraft ffotest20-39.script -o ffotest20-39.txt -h 21

Explained: Read script from ffotest20-39.script, and write the results to ffotest20-39.txt. Use 21bit hash table while solving, which takes up about 128MB memory.

Sample script file: "ffotest20-39.script"

%fforum test 20-39
--OOOO----OOOO---XOXXOOXOOXOOOOX-OOOOOXXXOOXXXXX--X-X----------- X warmup % warmup
XXXOXXXXOXXXXXXXOOXXXXXXOOOXXXXXOOOXXOO-OOOOO---OOOOOOO-OOOOOOO- X % fforum 20
OOOOOOOOXOOXXX--XXOOXOO-XOXOOO--XOOOOX--XOOXOO--XOOOOO--XXXX---- O % fforum 21
--OOOO--X-OOOOO-XXOOXOXXXOXOXXXXXXXOXXXX-XXOXOXX--OXXX-X----X--- O % fforum 22
--O-------OOX---OOOXXXO-OOOOXOXXXXXOOXOXXXXXXOOXX-XXXXOX--XXXX-- X % fforum 23
--O--O-----OOOX--X-XOXOO--XXXOOOXXXXOOOOXXXOXXOOXXXXXX--XOXX-O-- O % fforum 24
----X------XXXO--OOOXXXXXOOOOXXO-XXOOXXOOOXOXXXXOOOXX---X-XXXX-- O % fforum 25
-OOOOO----OXXO---OOOOXXO-OOOXOXX-OOXOOXX-XOXXOXX--O-XXXX--O----O X % fforum 26
--XO-O----OOOO--OOXOXXO-OOOOXXOOOOOXXOX-OXOXXXXX--XXXX----X-O-X- X % fforum 27
--O-------OOO--X-XOOOOXXXXXXOXOX-XXOXOOXXXOXOOXX-OOOOO-X---OOO-- X % fforum 28
-OXXXX----OXXO--XXOOXOOOXXXOOXOOXXOOXOOOXXXXOO-XX-XXO----------- X % fforum 29
-XXX----X-XOO---XXOXOO--XOXOXO--XOOXOXXXXOOXXOX---OOOOO--XXXXX-- X % fforum 30
-OOOOO----OOOO--OXXOOO---XXXOO--XXXXXXO-XXXOOO-OX-OOOO---OOOOO-- X % fforum 31
--XX----O-XXOX--OOXOO---OXOXOOO-OOXXOOOXOOXXXOOX--XXXXOX--X--X-X X % fforum 32
-XXXXXXX--XOOO----OXOOXX-OOXXOXX-OOOOOXX-X-XOOXX---O-X-X--OOOO-- X % fforum 33
-------------O-O-OOOOOOOOOOOOXOOOXXOOOXO-XXXOXOO--XXXOXO--OXXXXO X % fforum 34
--XXX-----XXXX-OOOXXOOOOOOOOOOXO-OOXXXXO-OOOXXXO---XOXX---X----- O % fforum 35
---X-O----XXXO-XXXXXXXXXXOOXXOOXXOXOOOXXXXOOOO-XX--OOOO--------- O % fforum 36
--OOOO--O-OOOO--OXXXOOO-OXXOXO--OOXXOXX-OOXXXX--O-XXX-----XX-O-- X % fforum 37
--OOOO----OOOO---XOXXOOXOOXOOOOX-OOOOOXXXOOXXXXX--X-X----------- X % fforum 38
O-OOOO--XOXXOX--XOOOXXX-XOOOXX--XOOXOX--XOXXX---X-XX------------ O % fforum 39

Sample output file: "ffotest20-39.txt"

%fforum test 20-39
+4	B2	28.83 Mn	3324 Kn/s	8.7 s	% warmup
+6	H5	46 n	+Inf Kn/s	0.0 s	% fforum 20
0	G5	299.1 Kn	9589 Kn/s	0.0 s	% fforum 21
+2	G8	402.8 Kn	4304 Kn/s	0.1 s	% fforum 22
+4	A2	244.0 Kn	3911 Kn/s	0.1 s	% fforum 23
0	C3	1.209 Mn	4845 Kn/s	0.2 s	% fforum 24
0	G1	2.626 Mn	4431 Kn/s	0.6 s	% fforum 25
0	D8	10.60 Mn	4657 Kn/s	2.3 s	% fforum 26
-2	B7	1.647 Mn	3771 Kn/s	0.4 s	% fforum 27
0	F1	8.227 Mn	4708 Kn/s	1.7 s	% fforum 28
+10	G2	688.7 Kn	3396 Kn/s	0.2 s	% fforum 29
0	G3	2.432 Mn	3998 Kn/s	0.6 s	% fforum 30
-2	G6	2.380 Mn	3912 Kn/s	0.6 s	% fforum 31
-4	G3	4.602 Mn	4403 Kn/s	1.0 s	% fforum 32
-8	E7	3.910 Mn	4109 Kn/s	1.0 s	% fforum 33
-2	C2	7.149 Mn	5036 Kn/s	1.4 s	% fforum 34
0	C7	3.549 Mn	3297 Kn/s	1.1 s	% fforum 35
0	B7	8.217 Mn	4115 Kn/s	2.0 s	% fforum 36
-20	G2	24.53 Mn	4095 Kn/s	6.0 s	% fforum 37
+4	B2	28.83 Mn	3330 Kn/s	8.7 s	% fforum 38
+64	A8	6.022 Mn	4707 Kn/s	1.3 s	% fforum 39
Total:		117.5 Mn	4009 Kn/s	29.3 s	

Note that the time of the first warm-up position is not included in the final statistics.