Scid  4.6.5
tablebase.tcl
Go to the documentation of this file.
1 ### tools/tablebase.tcl:
2 ### Tablebase display routines for Scid.
3 
4 set ::tb::isOpen 0
5 set tbTraining 0
6 set tbBoard 0
7 set tbStatus ""
8 
9 if { [catch {package require http}] } {
10  set ::tb::online_available 0
11 } else {
12  set ::tb::online_available 1
13 }
14 
15 namespace eval ::tb {
16  set url "http://k4it.de/egtb/fetch.php"
17  # proxy configuration
18  set proxyhost "127.0.0.1"
19  set proxyport 3128
20 }
21 
22 set tbInfo(section) 21
23 set tbInfo(material) "kpk"
24 set tbInfo(sections) [list 21 22 31 32 41]
25 foreach i $tbInfo(sections) { set tbInfo($i) [list]}
26 
27 set tbInfo(21) [list kqk krk kbk knk kpk]
28 
29 set tbInfo(22) [list \
30  kqkq kqkr kqkb kqkn kqkp \
31  - krkr krkb krkn krkp \
32  - - kbkb kbkn kbkp \
33  - - - knkn knkp \
34  - - - - kpkp]
35 
36 set tbInfo(31) [list \
37  kqqk kqrk kqbk kqnk kqpk \
38  - krrk krbk krnk krpk \
39  - - kbbk kbnk kbpk \
40  - - - knnk knpk \
41  - - - - kppk]
42 
43 set tbInfo(32) [list \
44  kqqkq kqqkr kqqkb kqqkn kqqkp \
45  kqrkq kqrkr kqrkb kqrkn kqrkp \
46  kqbkq kqbkr kqbkb kqbkn kqbkp \
47  kqnkq kqnkr kqnkb kqnkn kqnkp \
48  kqpkq kqpkr kqpkb kqpkn kqpkp \
49  - - - - - \
50  krrkq krrkr krrkb krrkn krrkp \
51  krbkq krbkr krbkb krbkn krbkp \
52  krnkq krnkr krnkb krnkn krnkp \
53  krpkq krpkr krpkb krpkn krpkp \
54  - - - - - \
55  kbbkq kbbkr kbbkb kbbkn kbbkp \
56  kbnkq kbnkr kbnkb kbnkn kbnkp \
57  kbpkq kbpkr kbpkb kbpkn kbpkp \
58  - - - - - \
59  knnkq knnkr knnkb knnkn knnkp \
60  knpkq knpkr knpkb knpkn knpkp \
61  kppkq kppkr kppkb kppkn kppkp]
62 
63 set tbInfo(41) [list \
64  kqqqk kqqrk kqqbk kqqnk kqqpk \
65  - kqrrk kqrbk kqrnk kqrpk \
66  - - kqbbk kqbnk kqbpk \
67  - - - kqnnk kqnpk \
68  - - - - kqppk \
69  - krrrk krrbk krrnk krrpk \
70  - - krbbk krbnk krbpk \
71  - - - krnnk krnpk \
72  - - - - krppk \
73  - - kbbbk kbbnk kbbpk \
74  - - - kbnnk kbnpk \
75  - - - - kbppk \
76  - - - knnnk knnpk \
77  - - - - knppk \
78  - - - - kpppk]
79 
80 set tbInfo(42) [list \
81  kqqqkq kqqqkr kqqqkb kqqqkn kqqqkp \
82  kqqrkq kqqrkr kqqrkb kqqrkn kqqrkp \
83  kqqbkq kqqbkr kqqbkb kqqbkn kqqbkp \
84  kqqnkq kqqnkr kqqnkb kqqnkn kqqnkp \
85  kqqpkq kqqpkr kqqpkb kqqpkn kqqpkp \
86  kqrrkq kqrrkr kqrrkb kqrrkn kqrrkp \
87  kqrbkq kqrbkr kqrbkb kqrbkn kqrbkp \
88  kqrnkq kqrnkr kqrnkb kqrnkn kqrnkp \
89  kqrpkq kqrpkr kqrpkb kqrpkn kqrpkp \
90  kqbbkq kqbbkr kqbbkb kqbbkn kqbbkp \
91  kqbnkq kqbnkr kqbnkb kqbnkn kqbnkp \
92  kqbpkq kqbpkr kqbpkb kqbpkn kqbpkp \
93  kqnnkq kqnnkr kqnnkb kqnnkn kqnnkp \
94  kqnpkq kqnpkr kqnpkb kqnpkn kqnpkp \
95  kqppkq kqppkr kqppkb kqppkn kqppkp \
96  krrrkq krrrkr krrrkb krrrkn krrrkp \
97  krrbkq krrbkr krrbkb krrbkn krrbkp \
98  krrnkq krrnkr krrnkb krrnkn krrnkp \
99  krrpkq krrpkr krrpkb krrpkn krrpkp \
100  krbbkq krbbkr krbbkb krbbkn krbbkp \
101  krbnkq krbnkr krbnkb krbnkn krbnkp \
102  krbpkq krbpkr krbpkb krbpkn krbpkp \
103  krnnkq krnnkr krnnkb krnnkn krnnkp \
104  krnpkq krnpkr krnpkb krnpkn krnpkp \
105  krppkq krppkr krppkb krppkn krppkp \
106  kbbbkq kbbbkr kbbbkb kbbbkn kbbbkp \
107  kbbnkq kbbnkr kbbnkb kbbnkn kbbnkp \
108  kbbpkq kbbpkr kbbpkb kbbpkn kbbpkp \
109  kbnnkq kbnnkr kbnnkb kbnnkn kbnnkp \
110  kbnpkq kbnpkr kbnpkb kbnpkn kbnpkp \
111  kbppkq kbppkr kbppkb kbppkn kbppkp \
112  knnnkq knnnkr knnnkb knnnkn knnnkp \
113  knnpkq knnpkr knnpkb knnpkn knnpkp \
114  knppkq knppkr knppkb knppkn knppkp \
115  kpppkq kpppkr kpppkb kpppkn kpppkp]
116 
117 # ::tb::isopen
118 # Returns boolean value of whether the tablebase window is open.
119 #
120 proc ::tb::isopen {} {
121  return [winfo exists .tbWin]
122 }
123 
124 # ::tb::Open
125 # Open the tablebase window.
126 #
127 proc ::tb::Open {} {
128  global tbInfo
129  set w .tbWin
130  if {[winfo exists $w]} { return}
132  setWinLocation $w
133  ::setTitle $w "Scid: [tr WindowsTB]"
134  pack [ttk::frame $w.b] -side bottom -fill x
135  pack [ttk::frame $w.info] -side left -fill y
136  addVerticalRule $w
137  pack [ttk::frame $w.pos] -side right -fill both -expand yes
138 
139  # Left frame: tablebase browser and summary info
140 
141  set f $w.info
142  pack [ttk::frame $f.sec] -side top -fill x
143  foreach i $tbInfo(sections) {
144  set name "[string index $i 0]-[string index $i 1]"
145  ttk::radiobutton $f.sec.b$i -text " $name " -variable tbInfo(section) -value $i -command "::tb::section $i" ;# -indicatoron 0
146  pack $f.sec.b$i -side left -pady 1 -padx 1
147  }
148  autoscrollframe $f.list text $f.list.text \
149  -width 35 -height 7 -font font_Fixed -wrap none \
150  -foreground black -background white -cursor top_left_arrow
151  pack $f.list -side top
152  pack [ttk::frame $f.separator -height 2]
153  # addHorizontalRule $f
154 
155  autoscrollframe $f.data text $f.data.text \
156  -width 35 -height 0 -font font_Fixed -wrap none \
157  -foreground black -background white -cursor top_left_arrow
158  pack $f.data -side top -fill y -expand yes
159 
160  $f.list.text tag configure avail -foreground blue
161  $f.list.text tag configure unavail -foreground gray40
162  $f.data.text tag configure fen -foreground blue
163 
164  # Right frame: tablebase results for current position
165 
166  set f $w.pos
167  autoscrollframe $f text $f.text -width 30 -height 20 -font font_Small \
168  -wrap word -foreground black -background white -setgrid 1
169  $f.text tag configure indent -lmargin2 [font measure font_Fixed " "]
170 
171  ::board::new $f.board 25
172  $f.board configure -relief solid -borderwidth 1
173  for {set i 0} {$i < 64} {incr i} {
174  ::board::bind $f.board $i <Button-1> [list ::tb::resultsBoard $i]
175  }
176  if {$::tbBoard} {
177  grid $f.board -row 0 -column 2 -rowspan 2
178  }
179 
180  ttk::checkbutton $w.b.training -text $::tr(Training) -variable tbTraining -command ::tb::training ;# -padx 4 -pady 5
181  # button $w.b.online -text Online -command ::tb::updateOnline -relief raised -padx 4 -pady 5
182  if { !$::tb::online_available } {
183  catch { $w.b.online configure -state disabled}
184  }
185  ttk::button $w.b.random -text "Random" -command ::tb::random
186  ttk::button $w.b.showboard -image tb_coords -command ::tb::showBoard
187  dialogbutton $w.b.help -text $::tr(Help) -command { helpWindow TB }
188  dialogbutton $w.b.close -text $::tr(Close) -command "destroy $w"
189  ttk::label $w.b.status -width 1 -textvar tbStatus -font font_Small -relief flat -anchor w ;# -height 0
190  packbuttons right $w.b.close $w.b.help
191  pack $w.b.training -side left -padx 2 -pady 2
192  catch { pack $w.b.online -side left -padx 2 -pady 2}
193  pack $w.b.random $w.b.showboard -side left -padx 2 -pady 2
194  pack $w.b.status -side left -fill x -expand yes
195  bind $w <Destroy> { set ::tb::isOpen 0; set tbTraining 0 }
196  bind $w <F1> { helpWindow TB }
197  bind $w <Configure> "recordWinSize $w"
198  wm minsize $w 15 20
200  set ::tbTraining 0
204 }
205 
206 # ::tb::showBoard
207 # Toggles the results board.
208 #
209 proc ::tb::showBoard {} {
210  global tbBoard
211  set f .tbWin.pos
212  if {$tbBoard} {
213  set tbBoard 0
214  grid forget $f.board
215  } else {
216  set tbBoard 1
217  grid $f.board -row 0 -column 2 -rowspan 2
218  }
219 }
220 
221 # ::tb::resultsBoard
222 # Updates theresultsBoard board for a particular square.
223 #
224 proc ::tb::resultsBoard {sq} {
225  set f .tbWin.pos
226  set board [sc_pos board]
227  # If selected square is empty, take no action:
228  if {[string index $board $sq] == "."} { return}
229  # Clear any previous results:
230  ::board::clearText $f.board
231  # Highlight the selected square:
232  ::board::colorSquare $f.board $sq $::highcolor
233  # Retrieve tablebase scores:
234  busyCursor .
235  set scores [sc_pos probe board $sq]
236  set text(X) X; set color(X) red; set shadow(X) white
237  set text(=) =; set color(=) blue; set shadow(=) white
238  set text(?) "?"; set color(?) red; set shadow(?) white
239  set text(+) "#"; set text(-) "#"
240  if {[sc_pos side] == "white"} {
241  set color(+) white; set color(-) black
242  set shadow(+) black; set shadow(-) white
243  } else {
244  set color(+) black; set color(-) white
245  set shadow(+) white; set shadow(-) black
246  }
247  for {set i 0} {$i < 64} {incr i} {
248  # Skip squares that have a piece.
249  if {[string index $board $i] != "."} { continue}
250  # Draw the score on this square:
251  set score [string index $scores $i]
252  catch {::board::drawText $f.board $i $text($score) $color($score) 0 $shadow($score)}
253  }
254  unbusyCursor .
255 }
256 
257 # ::tb::name
258 # Converts a material string like "kqkr" or "KQKR" to "KQ-KR".
259 #
260 proc ::tb::name {s} {
261  set s [string toupper $s]
262  set idx [string last "K" $s]
263  set new [string range $s 0 [expr $idx - 1]]
264  append new "-"
265  append new [string range $s $idx end]
266  return $new
267 }
268 
269 # ::tb::section
270 # Updates the tablebase list for the specified section.
271 #
272 proc ::tb::section {{sec 0}} {
273  global tbInfo
274  set w .tbWin
275  if {! [winfo exists $w]} { return}
276  if {$sec == 0} { set sec $tbInfo(section)}
277  set tbInfo(section) $sec
278  if {! [info exists tbInfo($sec)]} { return}
279  set t $w.info.list.text
280  $t configure -state normal
281  $t delete 1.0 end
282  $t configure -height 10
283  set count 0
284  set linecount 1
285  foreach tb $tbInfo($sec) {
286  if {$tb == "-"} {
287  $t insert end [format "%-7s" ""]
288  } else {
289  set avail [sc_info tb available $tb]
290  if {$avail} {
291  set taglist [list avail $tb]
292  } else {
293  set taglist [list unavail $tb]
294  }
295  $t insert end [format "%-6s" [::tb::name $tb]] $taglist
296  $t insert end " "
297  # Bind tags for enter/leave/buttonpress on this tb:
298  $t tag bind $tb <Any-Enter> \
299  [list $t tag configure $tb -foreground yellow -background darkBlue]
300  $t tag bind $tb <Any-Leave> \
301  [list $t tag configure $tb -foreground {} -background {}]
302  $t tag bind $tb <ButtonPress-1> [list ::tb::summary $tb]
303  }
304  incr count
305  if {$count == 5} { set count 0; incr linecount; $t insert end "\n"}
306  }
307  if {$linecount > 10} { set linecount 10}
308  $t configure -height $linecount
309  $t configure -state disabled
310 }
311 
312 # ::tb::summary
313 # Shows the tablebase information for the specified tablebase.
314 #
315 proc ::tb::summary {{material ""}} {
316  global tbInfo tbs
317  set w .tbWin
318  if {! [winfo exists $w]} { return}
319 
320  if {$material == ""} { set material $tbInfo(material)}
321  set tbInfo(material) $material
322  set t $w.info.data.text
323  $t configure -state normal
324  $t delete 1.0 end
325  $t insert end [format "%-6s" [::tb::name $material]]
326  if {! [info exists tbs($material)]} {
327  $t insert end "\nNo summary for this tablebase."
328  $t configure -state disabled
329  return
330  }
331  set data $tbs($material)
332 
333  $t insert end [format " %5u games per million\n\n" [lindex $data 0]]
334 
335  # Longest-mate and result-percentage stats:
336 
337  $t insert end "Side Longest % % %\n"
338  $t insert end "to move mate Win Draw Loss\n"
339  $t insert end "---------------------------------\n"
340 
341  # Stats for White:
342  $t insert end "White "
343  set len [lindex $data 1]
344  set fen [lindex $data 2]
345  if {$len == "0"} { set len "-"}
346  if {[string length $fen] > 2} {
347  append fen " w"
348  $t insert end [format "%3s" $len] [list fen $fen]
349  $t tag bind $fen <Any-Enter> \
350  [list $t tag configure $fen -foreground yellow -background darkBlue]
351  $t tag bind $fen <Any-Leave> \
352  [list $t tag configure $fen -foreground {} -background {}]
353  $t tag bind $fen <ButtonPress-1> [list ::tb::setFEN $fen]
354  } else {
355  $t insert end [format "%3s" $len]
356  }
357  $t insert end " "
358  $t insert end [format " %5s" [lindex $data 5]]
359  $t insert end [format " %5s" [lindex $data 6]]
360  $t insert end [format " %5s" [lindex $data 7]]
361  $t insert end "\n"
362 
363  # Stats for Black:
364  $t insert end "Black "
365  set len [lindex $data 3]
366  set fen [lindex $data 4]
367  if {$len == "0"} { set len "-"}
368  if {[string length $fen] > 2} {
369  append fen " b"
370  $t insert end [format "%3s" $len] [list fen $fen]
371  $t tag bind $fen <Any-Enter> \
372  [list $t tag configure $fen -foreground yellow -background darkBlue]
373  $t tag bind $fen <Any-Leave> \
374  [list $t tag configure $fen -foreground {} -background {}]
375  $t tag bind $fen <ButtonPress-1> [list ::tb::setFEN $fen]
376  } else {
377  $t insert end [format "%3s" $len]
378  }
379  $t insert end " "
380  $t insert end [format " %5s" [lindex $data 8]]
381  $t insert end [format " %5s" [lindex $data 9]]
382  $t insert end [format " %5s" [lindex $data 10]]
383  $t insert end "\n\n"
384 
385  set mzugs [lindex $data 11]
386  $t insert end "Mutual zugzwangs: "
387  if {$mzugs >= 0} { $t insert end "$mzugs\n"} else { $t insert end "?\n"}
388  if {$mzugs <= 0} {
389  $t configure -state disabled
390  return
391  }
392 
393  # Extra Zugzwang info:
394  set nBtmLoses [lindex $data 12]
395  set nWtmLoses [lindex $data 14]
396  set nBothLose [lindex $data 16]
397  set zugnames [list " White draws, Black loses: " \
398  " Black draws, White loses: " \
399  " Whoever moves loses: "]
400  if {$nBtmLoses > 0} {
401  $t insert end [lindex $zugnames 0]
402  $t insert end [format "%5d\n" $nBtmLoses]
403  }
404  if {$nWtmLoses > 0} {
405  $t insert end [lindex $zugnames 1]
406  $t insert end [format "%5d\n" $nWtmLoses]
407  }
408  if {$nBothLose > 0} {
409  $t insert end [lindex $zugnames 2]
410  $t insert end [format "%5d\n" $nBothLose]
411  }
412 
413  # Selected zugzwang positions:
414  set btmFens [lindex $data 13]
415  set wtmFens [lindex $data 15]
416  set bothFens [lindex $data 17]
417  set nBtmFens [llength $btmFens]
418  set nWtmFens [llength $wtmFens]
419  set nBothFens [llength $bothFens]
420  set nTotalFens [expr $nBtmFens + $nWtmFens + $nBothFens]
421  if {$nTotalFens == 0} {
422  $t configure -state disabled
423  return
424  }
425 
426  # Print the lists of selected zugzwang positions:
427  $t insert end "\nSelected zugzwang positions:"
428  foreach n [list $nBtmFens $nWtmFens $nBothFens] \
429  fenlist [list $btmFens $wtmFens $bothFens] \
430  name $zugnames tomove [list b w w] {
431  if {$n == 0} { continue}
432  $t insert end "\n [string trim $name]"
433  set count 0
434  for {set count 0} {$count < $n} {incr count} {
435  set fen [lindex $fenlist $count]
436  if {[expr $count % 10] == 0} {
437  $t insert end "\n "
438  }
439  $t insert end " "
440  append fen " $tomove"
441  $t insert end [format "%2d" [expr $count + 1]] [list fen $fen]
442  $t tag bind $fen <Any-Enter> \
443  [list $t tag configure $fen -foreground yellow -background darkBlue]
444  $t tag bind $fen <Any-Leave> \
445  [list $t tag configure $fen -foreground {} -background {}]
446  $t tag bind $fen <ButtonPress-1> [list ::tb::setFEN $fen]
447  }
448  }
449 
450  $t configure -state disabled
451 }
452 
453 # ::tb::results
454 # Called when the main window board changes, to display tablebase
455 # results for all moves from the current position.
456 #
457 proc ::tb::results {} {
458  global tbTraining
459  set w .tbWin
460  if {! [winfo exists $w]} { return}
461 
462  # Reset results board:
463  ::board::clearText $w.pos.board
464  ::board::update $w.pos.board [sc_pos board]
465 
466  # Update results panel:
467  set t $w.pos.text
468  $t delete 1.0 end
469  if {$tbTraining} {
470  $t insert end "\n (Training mode; results are hidden)"
471  } else {
472  $t insert end [sc_pos probe report] indent
473  }
474 }
475 
476 ################################################################################
477 #
478 ################################################################################
479 proc ::tb::updateOnline {} {
480  global tbTraining
481  set w .tbWin
482  if {! [winfo exists $w]} { return}
483 
484  # proxy configuration - needs UI
485  # ::http::config -proxyhost $::tb::proxyhost -proxyport $::tb::proxyport
486 
487  set t $w.pos.text
488  if { ! $tbTraining } {
489  set query [ ::http::formatQuery hook null action egtb fen [sc_pos fen]]
490  ::http::geturl $::tb::url -timeout 5000 -query $query -command { ::tb::httpCallback }
491  }
492 }
493 ################################################################################
494 #
495 ################################################################################
496 proc ::tb::httpCallback { token } {
497 
498  upvar #0 $token state
499 
500  set w .tbWin
501  if {! [winfo exists $w]} { return}
502  set t $w.pos.text
503 
504  # delete previous online output
505  foreach tag {tagonline} {
506  while {1} {
507  set del [$t tag nextrange $tag 1.0]
508  if {$del == ""} {break}
509  catch {$t delete [lindex $del 0] [lindex $del 1]}
510  }
511  }
512 
513  if {$state(status) != "ok"} {
514  $t insert end $state(status) tagonline
515  return
516  }
517 
518  set b $state(body)
519  set result ""
520 
521  if {[sc_pos side] == "black"} {
522  set tmp ""
523  set found 0
524  foreach line [split $b "\n"] {
525  if {$line == "NEXTCOLOR"} {
526  set found 1
527  continue
528  }
529  if {$found} {
530  append tmp "$line\n"
531  }
532  }
533  set b $tmp
534  }
535 
536  foreach line [split $b "\n"] {
537  if {$line == "NEXTCOLOR"} {
538  break
539  }
540  if { $line == "No information available" } {
541  append result "$line\n"
542  }
543  if {[string match "hook|null|value|*" $line]} {
544  append result "Online : [string range $line 16 end]\n"
545  continue
546  }
547  if {[scan $line "%d-%d:%s" sq1 sq2 tmp] == 3} {
548  set p1 [ string toupper [string index [sc_pos board] $sq1]]
549  set p2 [string index [sc_pos board] $sq2]
550  set take ""
551  if {$p2 != "."} {
552  set take "x"
553  }
554  append result "$p1[::board::san $sq1]$take[::board::san $sq2] [string range $line [string first : $line] end]\n"
555  }
556  }
557  ::http::cleanup state
558  $t insert end $result tagonline
559 }
560 ################################################################################
561 #
562 ################################################################################
563 
564 # ::tb::random
565 # Sets up a random position with the material of the tablebase
566 # currently displayed in the info frame.
567 #
568 proc ::tb::random {} {
569  global tbInfo
570  if {[catch {sc_game startBoard "random:$tbInfo(material)"} err]} {
571  tk_messageBox -title "Scid" -icon warning -type ok -message $err
572  return
573  }
574  # The material is valid, so clear the game and regenerate a
575  # random starting position:
576  sc_game new
577  sc_game startBoard "random:$tbInfo(material)"
578  updateBoard -pgn
579 }
580 
581 # ::tb::setFEN
582 # Called when an item in the Tablebase info browser with an
583 # associated FEN position is selected with the left mouse button,
584 # causing the position to be set in the main window.
585 #
586 proc ::tb::setFEN {fen} {
587  if {[catch {sc_game startBoard $fen} err]} {
588  tk_messageBox -title "Scid" -icon info -type ok -message $err
589  return
590  }
591  # The FEN is valid, so clear the game and reset the FEN:
592  sc_game new
593  sc_game startBoard $fen
594  updateBoard -pgn
595 }
596 
597 # ::tb::training
598 # Toggle tablebase training mode.
599 #
600 proc ::tb::training {} {
601  global tbTraining tbStatus gameInfo
602  set w .tbWin
603  set tbStatus ""
604  if {$tbTraining} {
605  set gameInfo(showTB_old) $gameInfo(showTB)
606  set gameInfo(showTB) 0
607  } else {
608  if {$gameInfo(showTB) == 0} { set gameInfo(showTB) $gameInfo(showTB_old)}
609  }
610  updateBoard -pgn
612 }
613 
614 # ::tb::move
615 # Finds and executes the best move in the current position,
616 # if one can be determined from the tablebases.
617 #
618 proc ::tb::move {} {
619  global tbTraining tbStatus
620  if {! $tbTraining} { return}
621  set moves [split [sc_pos probe optimal]]
622  set len [llength $moves]
623  if {$len == 0} {
624  set tbStatus "No optimal move was found."
625  return
626  }
627  set i [expr int(rand() * $len)]
628  set move [lindex $moves $i]
629  if {[catch {sc_move addSan $move}]} {
630  set tbStatus "Error playing $move."
631  } else {
632  set tbStatus "Played $move."
633  }
634  updateBoard -pgn
635 }
636 
637 
638 # tbs:
639 # Summary data about tablebases.
640 # Each list has the following elements:
641 # (0) Frequency (per million games),
642 # (1) Longest-wtm-mate length, (2) Longest-wtm-mate FEN,
643 # (3) Longest-btm-mate length, (4) Longest-btm-mate FEN,
644 # (5) wtm-win-%, (6) wtm-draw-%, (7) wtm-loss-%,
645 # (8) btm-win-%, (9) btm-draw-%, (10) btm-loss-%,
646 # (11) number of mutual zugzwangs (-1 if unknown).
647 # The longest-mate FENs have a board field only; no side to move, etc.
648 #
649 # There are three types of mutual zugzwang:
650 # wtm draws / btm loses, wtm loses / btm draws, wtm loses / btm loses.
651 # The first two are "half-point" zugzwangs, the last is "full-point".
652 #
653 # If the number of mutual zugzwangs is known and nonzero,
654 # six more items should follow in the list:
655 # (12) number of wtm-draws-btm-loses zugzwangs,
656 # (13) list of selected wtm-draws-btm-loses zugzwang FENs,
657 # (14) number of wtm-loses-btm-draws zugzwangs,
658 # (15) list of selected wtm-loses-btm-draws zugzwang FENs,
659 # (16) number of whoever-moves-loses (full-point) zugzwangs,
660 # (17) list of selected whoever-moves-loses zugzwang FENs.
661 # These zugzwang FENs board field only; no side to move, etc.
662 
663 set tbs(kqk) {
664  257 10 {7K/6Q1/8/8/2k5/8/8/8} 0 -
665  100.0 0.0 0.0 0.0 10.3 89.7
666  0
667 }
668 
669 set tbs(krk) {
670  542 16 {8/8/2R5/3k4/8/8/8/1K6} 0 -
671  100.0 0.0 0.0 0.0 9.9 90.1
672  0
673 }
674 
675 set tbs(kbk) {
676  194 0 - 0 -
677  0.0 100.0 0.0 0.0 100.0 0.0
678  0
679 }
680 
681 set tbs(knk) {
682  224 0 - 0 -
683  0.0 100.0 0.0 0.0 100.0 0.0
684  0
685 }
686 
687 set tbs(kpk) {
688  2352 28 {8/8/8/1k6/8/8/K5P1/8} 0 -
689  76.5 23.5 0.0 0.0 41.9 58.1
690  80 80 {} 0 {} 0 {}
691 }
692 
693 set tbs(kqkq) {
694  222 13 {8/8/8/8/8/8/8/qk1K2Q1} 13 {8/8/8/8/8/8/8/QK1k2q1}
695  41.7 57.8 0.5 41.7 57.8 0.5
696  0
697 }
698 
699 set tbs(kqkr) {
700  400 35 {K3r3/8/5k2/Q7/8/8/8/8} 19 {k7/5r2/K7/8/8/8/1Q6/8}
701  99.0 0.8 0.2 28.7 5.8 65.5
702  0
703 }
704 
705 set tbs(kqkb) {
706  25 17 {K7/8/8/3k4/4b3/8/8/7Q} 0 -
707  99.7 0.3 0.0 0.0 23.1 76.9
708  0
709 }
710 
711 set tbs(kqkn) {
712  74 21 {8/KQ6/2n5/2k5/8/8/8/8} 0 -
713  99.3 0.7 0.0 0.0 19.5 80.5
714  0
715 }
716 
717 set tbs(kqkp) {
718  937 28 {3KQ3/8/8/8/8/8/3kp3/8} 29 {8/1p4k1/7Q/8/7K/8/8/8}
719  99.4 0.6 0.0 7.7 12.1 80.2
720  0
721 }
722 
723 set tbs(krkr) {
724  423 19 {8/3R4/8/8/5k2/6r1/7K/8} 19 {1k6/2R5/3K4/8/8/8/6r1/8}
725  29.1 70.2 0.7 29.1 70.2 0.7
726  0
727 }
728 
729 set tbs(krkb) {
730  322 29 {k7/8/b7/8/K7/R7/8/8} 0 -
731  35.2 64.8 0.0 0.0 96.8 3.2
732  5 5 {
733  4R3/8/8/8/8/b1K5/8/3k4 8/5R2/7b/8/8/2K5/8/1k6 8/8/1b6/5R2/8/3K4/8/2k5
734  8/8/8/8/8/1k6/b7/R1K5 8/8/8/8/8/2K5/4k3/R2b4
735  } 0 {} 0 {}
736 }
737 
738 set tbs(krkn) {
739  397 40 {8/8/6R1/2K5/n7/8/8/3k4} 1 {8/8/8/8/1n6/k7/8/KR6}
740  48.4 51.6 0.0 0.0 89.0 11.0
741  18 18 {
742  8/2n5/8/4R3/3K1k2/8/8/8 8/8/5k2/4R3/3K4/2n5/8/8 8/8/8/1k6/2R5/3K4/4n3/8
743  8/8/8/2n5/3K4/4R3/5k2/8 8/8/8/3k4/2R5/3K4/n7/8 8/8/8/3k4/4R3/3K4/6n1/8
744  8/8/8/4k3/3R4/2K5/1n6/8 8/8/8/5k2/4R3/3K4/2n5/8 8/8/8/6n1/3K4/4R3/3k4/8
745  8/8/8/8/2R5/1k1K4/4n3/8 8/8/8/8/3K1k2/4R3/8/2n5 8/8/8/8/3R4/2K1k3/1n6/8
746  8/8/8/8/4R3/3K1k2/2n5/8 8/8/8/8/6n1/3K4/4R3/3k4 8/8/8/8/8/2KR4/8/2k2n2
747  8/8/8/8/8/2RK4/8/n2k4 8/8/8/8/8/3KR3/8/3k2n1 8/8/8/n7/3K4/2R5/3k4/8
748  } 0 {} 0 {}
749 }
750 
751 set tbs(krkp) {
752  2146 26 {2K5/8/7p/6k1/8/8/R7/8} 43 {8/8/8/8/5R2/2pk4/5K2/8}
753  91.4 8.4 0.2 16.4 17.5 66.1
754  12 12 {
755  8/8/8/8/8/1k6/p7/R1K5 8/8/8/8/8/2k5/1p6/1R1K4 8/8/8/8/8/4k3/5p2/3K1R2
756  8/3K4/8/3k4/3p4/8/8/3R4 8/1K6/8/1k6/1p6/8/8/1R6 8/2K5/8/2k5/2p5/8/8/2R5
757  8/2K5/8/2k5/3p4/8/8/3R4 8/3K4/8/3k4/4p3/8/8/4R3 8/1K6/8/1k6/2p5/8/8/2R5
758  8/2K5/8/2k5/1p6/8/8/1R6 8/3K4/8/3k4/2p5/8/8/2R5 8/K7/8/k7/1p6/8/8/1R6
759  } 0 {} 0 {}
760 }
761 
762 set tbs(kbkb) {
763  49 1 {8/8/8/8/8/K7/7B/kb6} 1 {6BK/8/6k1/8/8/b7/8/8}
764  0.0 100.0 0.0 0.0 100.0 0.0
765  0
766 }
767 
768 set tbs(kbkn) {
769  87 1 {knB5/8/1K6/8/8/8/8/8} 1 {K1k1n3/B7/8/8/8/8/8/8}
770  0.0 100.0 0.0 0.0 100.0 0.0
771  0
772 }
773 
774 set tbs(kbkp) {
775  387 1 {7k/7p/5K2/8/8/8/1B6/8} 29 {8/1p4k1/7B/8/8/7K/8/8}
776  0.0 94.8 5.2 23.6 76.4 0.0
777  1 0 {} 1 {8/8/8/8/8/8/1pK5/kB6} 0 {}
778 }
779 
780 set tbs(knkn) {
781  68 1 {k7/n1K5/8/3N4/8/8/8/8} 1 {8/8/8/8/1n6/1k6/8/KN6}
782  0.0 100.0 0.0 0.0 100.0 0.0
783  0
784 }
785 
786 set tbs(knkp) {
787  497 7 {8/8/8/8/pN6/8/2K5/k7} 29 {8/1p6/6kN/8/8/7K/8/8}
788  0.0 87.1 12.9 32.6 67.4 0.0
789  29 22 {} 7 {} 0 {}
790 }
791 
792 set tbs(kpkp) {
793  2810 33 {2K5/k7/7p/8/8/8/6P1/8} 33 {8/2p1K3/8/8/8/4P3/8/3k4}
794  43.4 33.3 23.2 43.4 33.3 23.2
795  121 106 {} 106 {} 15 {
796  8/8/8/1Kp5/2Pk4/8/8/8 8/8/8/2Kp4/3Pk3/8/8/8 8/8/8/8/1Kp5/2Pk4/8/8
797  8/8/8/8/1pK5/kP6/8/8 8/8/8/8/2Kp4/3Pk3/8/8 8/8/8/8/2pK4/1kP5/8/8
798  8/8/8/8/3Kp3/4Pk2/8/8 8/8/8/8/8/1Kp5/2Pk4/8 8/8/8/8/8/1pK5/kP6/8
799  8/8/8/8/8/2Kp4/3Pk3/8 8/8/8/8/8/2pK4/1kP5/8 8/8/8/8/8/3Kp3/4Pk2/8
800  8/8/8/8/8/Kp6/1Pk5/8 8/8/8/8/Kp6/1Pk5/8/8 8/8/8/Kp6/1Pk5/8/8/8
801  }
802 }
803 
804 set tbs(kqqk) {
805  13 4 {8/8/8/4k3/8/8/1K6/QQ6} 0 -
806  100.0 0.0 0.0 0.0 2.1 97.9
807  0
808 }
809 
810 set tbs(kqrk) {
811  18 6 {7Q/8/8/8/4k3/8/8/1R5K} 0 -
812  100.0 0.0 0.0 0.0 1.1 98.9
813  0
814 }
815 
816 set tbs(kqbk) {
817  36 8 {8/Q4B2/5k2/8/8/8/8/K7} 0 -
818  100.0 0.0 0.0 0.0 9.4 90.6
819  0
820 }
821 
822 set tbs(kqnk) {
823  41 9 {K7/N7/8/8/8/5k2/Q7/8} 0 -
824  100.0 0.0 0.0 0.0 9.7 90.3
825  0
826 }
827 
828 set tbs(kqpk) {
829  156 10 {8/8/8/2k5/8/8/4P1Q1/7K} 0 -
830  100.0 0.0 0.0 0.0 2.8 97.2
831  0
832 }
833 
834 set tbs(krrk) {
835  8 7 {4R3/3k4/8/8/5R1K/8/8/8} 0 -
836  100.0 0.0 0.0 0.0 0.3 99.7
837  0
838 }
839 
840 set tbs(krbk) {
841  46 16 {8/8/3R4/4k3/4B3/8/8/K7} 0 -
842  100.0 0.0 0.0 0.0 8.8 91.2
843  0
844 }
845 
846 set tbs(krnk) {
847  15 16 {K7/2R5/3k4/3N4/8/8/8/8} 0 -
848  100.0 0.0 0.0 0.0 9.2 90.8
849  0
850 }
851 
852 set tbs(krpk) {
853  333 16 {K7/8/3R4/4kP2/8/8/8/8} 0 -
854  100.0 0.0 0.0 0.0 2.5 97.5
855  0
856 }
857 
858 set tbs(kbbk) {
859  31 19 {K7/8/3B4/3k4/8/8/4B3/8} 0 -
860  49.3 50.7 0.0 0.0 58.8 41.2
861  0
862 }
863 
864 set tbs(kbnk) {
865  206 33 {7K/4B3/4k3/8/8/8/8/2N5} 0 -
866  99.5 0.5 0.0 0.0 18.1 81.9
867  0
868 }
869 
870 set tbs(kbpk) {
871  453 31 {8/3P4/KBk5/8/8/8/8/8} 0 -
872  96.0 4.0 0.0 0.0 16.8 83.2
873  6 6 {
874  1B1K4/8/8/k7/8/P7/8/8 1B6/3K4/8/1k6/8/P7/8/8 1BK5/8/1k6/8/8/P7/8/8
875  8/B1k5/K7/P7/8/8/8/8 kB6/8/1PK5/8/8/8/8/8 kB6/8/KP6/8/8/8/8/8
876  } 0 {} 0 {}
877 }
878 
879 set tbs(knnk) {
880  20 1 {k7/3N4/K1N5/8/8/8/8/8} 0 -
881  0.0 100.0 0.0 0.0 100.0 0.0
882  0
883 }
884 
885 set tbs(knpk) {
886  426 27 {1N6/8/8/8/8/2k3P1/8/2K5} 0 -
887  96.3 3.7 0.0 0.0 18.5 81.5
888  75 75 {} 0 {} 0 {}
889 }
890 
891 set tbs(kppk) {
892  563 32 {8/8/8/8/2k5/6P1/K5P1/8} 0 -
893  98.4 1.6 0.0 0.0 7.9 92.1
894  43 43 {} 0 {} 0 {}
895 }
896 
897 set tbs(kqqkq) {
898  51 30 {2K5/8/1k6/5q2/8/8/6Q1/7Q} 13 {7Q/7K/8/6Qk/8/8/7q/8}
899  99.1 0.8 0.1 0.6 32.8 66.6
900  0
901 }
902 
903 set tbs(kqqkr) {
904  0 35 {Kr6/8/8/8/8/3Q4/4Q3/2k5} 19 {6Q1/8/8/8/8/7K/2r4Q/7k}
905  100.0 0.0 0.0 0.1 0.2 99.7
906  0
907 }
908 
909 set tbs(kqqkb) {
910  0 15 {8/8/7Q/5k1K/7Q/5b2/8/8} 0 -
911  100.0 0.0 0.0 0.0 0.1 99.9
912  0
913 }
914 
915 set tbs(kqqkn) {
916  0 19 {5K2/3n4/4k3/2Q5/8/8/8/1Q6} 0 -
917  100.0 0.0 0.0 0.0 0.1 99.9
918  0
919 }
920 
921 set tbs(kqqkp) {
922  7 22 {8/8/8/3Q4/7Q/2k5/1p6/K7} 13 ?
923  100.0 0.0 0.0 0.0 0.7 99.3
924  0
925 }
926 
927 set tbs(kqrkq) {
928  36 67 {8/8/8/8/q7/6k1/8/KR5Q} 38 {8/8/q7/8/8/6R1/2K4Q/k7}
929  97.0 2.8 0.2 24.4 21.2 54.4
930  1 1 {8/8/8/8/1R6/k4q2/8/1K2Q3} 0 {} 0 {}
931 }
932 
933 set tbs(kqrkr) {
934  132 34 {1K2Q3/8/3k4/1r2R3/8/8/8/8} 20 {6rQ/8/8/8/8/7K/5R2/6k1}
935  99.8 0.1 0.0 0.3 17.1 82.1
936  0
937 }
938 
939 set tbs(kqrkb) {
940  12 29 {2k5/5b2/8/8/2K5/8/Q7/6R1} 0 -
941  100.0 0.0 0.0 0.0 11.6 88.4
942  0
943 }
944 
945 set tbs(kqrkn) {
946  2 40 ? 1 {8/8/8/8/1n6/k7/8/KR5Q}
947  99.9 0.1 0.0 0.0 7.7 92.3
948  0
949 }
950 
951 set tbs(kqrkp) {
952  25 40 ? 43 ?
953  100.0 0.0 0.0 0.3 1.4 98.3
954  0
955 }
956 
957 set tbs(kqbkq) {
958  28 33 {5q2/8/8/5B2/k1K4Q/8/8/8} 24 {6KQ/8/1B6/6k1/8/6q1/8/8}
959  55.7 44.0 0.3 30.5 62.3 7.2
960  25 25 {} 0 {} 0 {}
961 }
962 
963 set tbs(kqbkr) {
964  21 40 ? 30 ?
965  99.3 0.6 0.0 0.7 27.5 71.8
966  0
967 }
968 
969 set tbs(kqbkb) {
970  2 17 ? 2 ?
971  99.7 0.3 0.0 0.0 19.8 80.2
972  0
973 }
974 
975 set tbs(kqbkn) {
976  2 21 ? 1 ?
977  99.5 0.5 0.0 0.0 16.7 83.3
978  0
979 }
980 
981 set tbs(kqbkp) {
982  25 32 ? 24 ?
983  100.0 0.0 0.0 1.0 14.1 84.9
984  0
985 }
986 
987 set tbs(kqnkq) {
988  74 41 {8/7q/8/k7/2K5/2N5/8/4Q3} 24 {7K/8/1N6/Q5k1/8/8/6q1/8}
989  50.1 49.6 0.3 33.5 62.2 4.3
990  38 38 {} 0 {} 0 {}
991 }
992 
993 set tbs(kqnkr) {
994  12 38 ? 41 ?
995  99.2 0.7 0.0 3.0 27.2 69.8
996  0
997 }
998 
999 set tbs(kqnkb) {
1000  7 17 ? 1 ?
1001  99.8 0.2 0.0 0.0 20.9 79.1
1002  0
1003 }
1004 
1005 set tbs(kqnkn) {
1006  13 21 ? 1 ?
1007  99.4 0.6 0.0 0.0 17.8 82.2
1008  0
1009 }
1010 
1011 set tbs(kqnkp) {
1012  46 30 ? 29 ?
1013  99.9 0.1 0.0 1.9 15.0 83.1
1014  0
1015 }
1016 
1017 set tbs(kqpkq) {
1018  1179 124 {4q3/K7/8/8/8/4P3/6Q1/k7} 29 {8/7q/3PK3/8/8/8/Q7/3k4}
1019  68.4 31.2 0.4 35.2 51.2 13.6
1020  640 640 {} 0 {} 0 {}
1021 }
1022 
1023 set tbs(kqpkr) {
1024  216 38 ? 33 ?
1025  99.6 0.3 0.1 19.7 6.1 74.1
1026  1 1 {k7/8/KQ1r4/P7/8/8/8/8} 0 {} 0 {}
1027 }
1028 
1029 set tbs(kqpkb) {
1030  16 28 ? 2 ?
1031  99.9 0.1 0.0 0.0 16.7 83.3
1032  0
1033 }
1034 
1035 set tbs(kqpkn) {
1036  41 30 ? 8 ?
1037  99.7 0.3 0.0 0.0 12.5 87.5
1038  0
1039 }
1040 
1041 set tbs(kqpkp) {
1042  622 105 {8/8/8/8/3P2Q1/8/1p6/K1k5} 34 ?
1043  100.0 0.0 0.0 3.3 7.3 89.4
1044  0
1045 }
1046 
1047 set tbs(krrkq) {
1048  8 29 {3R4/1R6/8/8/q7/7K/8/k7} 49 {7R/1q6/3K4/8/k7/8/2R5/8}
1049  58.2 36.8 5.1 52.0 37.0 11.0
1050  10 10 {
1051  6R1/8/8/8/6R1/7q/1K5k/8 6R1/8/8/8/8/6R1/7q/K6k 8/6R1/8/8/8/3K2R1/7q/7k
1052  8/6R1/8/8/8/6R1/7q/1K5k 8/8/1R6/8/8/1R1K4/q7/k7 8/8/6R1/8/8/6R1/7q/2K4k
1053  8/8/8/3R4/8/k7/2KR4/4q3 8/8/8/6R1/8/6R1/7q/3K3k 8/8/8/8/1R6/1R6/q7/k2K4
1054  8/8/8/8/8/2K5/2R1R3/kq6
1055  } 0 {} 0 {}
1056 }
1057 
1058 set tbs(krrkr) {
1059  38 31 {8/1R6/8/8/8/5r1K/4R3/k7} 20 {1k6/2R5/7r/3K3R/8/8/8/8}
1060  99.2 0.7 0.0 0.4 33.4 66.2
1061  0
1062 }
1063 
1064 set tbs(krrkb) {
1065  8 29 {8/8/8/2b5/8/4KR2/1k6/6R1} 0 -
1066  99.3 0.7 0.0 0.0 22.4 77.6
1067  1 1 {8/8/8/8/8/b1k5/1R6/1RK5} 0 {} 0 {}
1068 }
1069 
1070 set tbs(krrkn) {
1071  8 40 {4k3/6R1/8/7n/5K2/1R6/8/8} 1 {8/8/8/8/1n6/k7/8/KR1R4}
1072  99.7 0.3 0.0 0.0 15.0 85.0
1073  0
1074 }
1075 
1076 set tbs(krrkp) {
1077  3 33 ? 50 ?
1078  100.0 0.0 0.0 1.0 5.7 93.3
1079  0
1080 }
1081 
1082 set tbs(krbkq) {
1083  23 21 ? 70 ?
1084  38.7 48.0 13.4 71.2 25.6 3.2
1085  372 0 {} 372 {3Kn3/8/8/8/8/4r3/7Q/3k4} 0 {}
1086 }
1087 
1088 set tbs(krbkr) {
1089  649 65 {k7/7r/3K4/8/6B1/8/4R3/8} 30 {8/4R2K/8/5k2/8/8/7B/4r3}
1090  41.3 58.7 0.0 0.8 94.1 5.1
1091  17 17 {
1092  8/8/8/8/8/1R1K4/2B5/r1k5 8/8/8/8/8/2KB4/2R5/kr6 8/8/8/8/7B/4r3/5R2/2K1k3
1093  8/8/8/8/rB6/8/1R6/1K1k4 7k/6R1/7r/8/8/8/1B6/1K6 8/8/8/8/8/2K4B/6R1/3r1k2
1094  8/8/8/8/4R3/k7/2K1B3/4r3 8/8/8/8/8/2R3Br/k1K5/8 8/8/8/3B1r2/3K4/8/6R1/3k4
1095  8/8/8/8/8/R2K4/5B2/1r1k4 8/8/8/8/8/3K2R1/8/4k1Br 8/8/8/2B5/8/6r1/k1K4R/8
1096  8/5r2/8/8/1R4B1/8/3K4/k7 8/8/3B4/1r6/8/2K5/4R3/1k6 8/8/8/8/3KB2r/8/5R2/k7
1097  8/8/3B4/8/8/5r2/k1K1R3/8 5R2/8/8/8/8/3K4/5Br1/2k5
1098  } 0 {} 0 {}
1099 }
1100 
1101 set tbs(krbkb) {
1102  20 30 ? 2 ?
1103  98.2 1.8 0.0 0.0 31.1 68.9
1104  0
1105 }
1106 
1107 set tbs(krbkn) {
1108  5 40 ? 1 ?
1109  98.9 1.1 0.0 0.0 24.0 76.0
1110  0
1111 }
1112 
1113 set tbs(krbkp) {
1114  33 28 ? 70 ?
1115  99.1 0.9 0.0 2.4 17.1 80.5
1116  1 1 {1k1K4/7R/8/8/8/8/6p1/7B} 0 {} 0 {}
1117 }
1118 
1119 set tbs(krnkq) {
1120  15 20 ? 69 ?
1121  35.4 41.1 23.4 78.2 19.7 2.1
1122  455 0 {} 455 {} 0 {}
1123 }
1124 
1125 set tbs(krnkr) {
1126  430 37 {2k1r3/8/R7/N2K4/8/8/8/8} 41 {4K3/8/1r6/8/5k2/1R4N1/8/8}
1127  36.7 63.3 0.1 3.2 93.6 3.2
1128  10 10 {
1129  2R5/8/8/8/8/k2K4/8/r1N5 8/8/8/8/3N4/1R1K4/8/r1k5 8/8/8/8/3N4/2KR4/8/2k1r3
1130  8/8/8/8/4N3/7R/k1K5/5r2 8/8/8/8/8/2KRN3/8/2k1r3 8/8/8/8/8/3KN3/3R4/2k1r3
1131  8/8/8/8/8/5RN1/8/2K1k1r1 8/8/8/8/8/6RN/8/3K1k1r 8/8/8/8/8/NR1K4/8/r1k5
1132  8/8/8/8/r1N5/2R5/k1K5/8
1133  } 0 {} 0 {}
1134 }
1135 
1136 set tbs(krnkb) {
1137  7 31 ? 1 ?
1138  97.7 2.3 0.0 0.0 32.4 67.6
1139  0
1140 }
1141 
1142 set tbs(krnkn) {
1143  12 37 ? 1 ?
1144  99.0 1.0 0.0 0.0 24.6 75.4
1145  3 3 {
1146  8/8/8/8/4n3/1k6/N7/R1K5 8/8/8/8/8/3n4/N2k4/RK6 8/8/8/8/8/n7/1k6/N1RK4
1147  } 0 {} 0 {}
1148 }
1149 
1150 set tbs(krnkp) {
1151  32 29 ? 68 ?
1152  98.5 1.5 0.0 4.5 17.1 78.4
1153  0
1154 }
1155 
1156 set tbs(krpkq) {
1157  367 68 ? 104 ?
1158  37.7 11.8 50.5 91.0 7.1 1.8
1159  243 2 {} 241 {} 0 {}
1160 }
1161 
1162 set tbs(krpkr) {
1163  9184 74 {8/1k6/4R3/8/8/8/6Pr/4K3} 33 {8/1P6/2k5/8/K7/8/8/1r5R}
1164  66.6 33.0 0.4 20.1 54.4 25.5
1165  209 209 {} 0 {} 0 {}
1166 }
1167 
1168 set tbs(krpkb) {
1169  626 73 ? 2 ?
1170  96.4 3.6 0.0 0.0 32.6 67.4
1171  225 225 {} 0 {} 0 {}
1172 }
1173 
1174 set tbs(krpkn) {
1175  397 54 ? 8 ?
1176  97.5 2.5 0.0 0.0 24.7 75.3
1177  413 413 {} 0 {} 0 {} 0 {}
1178 }
1179 
1180 set tbs(krpkp) {
1181  1092 56 ? 103 ?
1182  99.4 0.4 0.3 10.0 6.6 83.5
1183  3 0 {} 2 {
1184  8/8/8/8/8/1p6/kP6/1RK5 8/8/8/8/8/k7/Pp6/RK6
1185  } 1 {8/8/8/8/8/2p5/1kP5/2RK4}
1186 }
1187 
1188 set tbs(kbbkq) {
1189  3 21 ? 81 ?
1190  15.3 20.2 64.5 96.5 2.9 0.6
1191  1 0 {} 1 {8/8/8/8/q7/2BB4/1K6/3k4} 0 {}
1192 }
1193 
1194 set tbs(kbbkr) {
1195  13 23 {4r3/8/8/8/8/4B3/8/k1K4B} 31 {1K4B1/8/3k4/8/B5r1/8/8/8}
1196  16.5 83.4 0.1 1.3 97.2 1.5
1197  3 3 {
1198  8/8/8/8/8/3K1k2/6r1/4B2B 8/8/8/8/8/5k2/6r1/3KB2B 8/8/8/B7/8/3k4/2r5/KB6
1199  } 0 {} 0 {}
1200 }
1201 
1202 set tbs(kbbkb) {
1203  35 22 {6B1/8/7B/8/b7/2K5/8/k7} 2 {1B5K/5k1B/8/8/8/4b3/8/8}
1204  15.6 84.3 0.0 0.0 98.6 1.4
1205  0
1206 }
1207 
1208 set tbs(kbbkn) {
1209  28 78 {8/K7/8/8/8/5k2/6n1/2B4B} 1 ?
1210  48.2 51.8 0.0 0.0 66.1 33.9
1211  1 1 {8/8/8/8/8/6n1/2K4B/kB6} 0 {} 0 {}
1212 }
1213 
1214 set tbs(kbbkp) {
1215  23 74 ? 83 ?
1216  48.0 50.2 1.8 11.4 54.1 34.5
1217  1 1 {B1k5/1pB5/3K4/8/8/8/8/8} 0 {} 0 {}
1218 }
1219 
1220 set tbs(kbnkq) {
1221  13 36 ? 53 ?
1222  25.0 6.4 68.6 97.6 1.7 0.7
1223  1 0 {} 1 {8/8/q7/8/3K4/2N5/8/k1B5} 0 {}
1224 }
1225 
1226 set tbs(kbnkr) {
1227  64 36 {8/8/8/2N5/8/8/B6K/5kr1} 41 {8/8/1B4N1/5k2/8/1r6/8/4K3}
1228  26.0 73.8 0.2 3.8 94.6 1.6
1229  8 6 {
1230  3r4/8/2B5/8/1N6/8/8/k1K5 8/8/8/8/8/2k5/1r6/B1NK4 8/8/8/8/8/2k5/3r4/1KN1B3
1231  8/8/8/8/8/3k4/4r3/2KN1B2 8/8/8/8/8/4k3/5r2/3KN1B1 8/8/8/8/B7/1r6/N1k5/K7
1232  } 2 {8/8/8/8/8/1k3r2/8/1KB4N 8/r7/8/B7/8/8/N1k5/K7} 0 {}
1233 }
1234 
1235 set tbs(kbnkb) {
1236  54 39 {8/7B/8/8/6N1/8/3k4/1Kb5} 2 {KB6/8/k4N2/8/6b1/8/8/8}
1237  25.5 74.5 0.0 0.0 98.8 1.2
1238  45 45 {} 0 {} 0 {}
1239 }
1240 
1241 set tbs(kbnkn) {
1242  36 107 {6Bk/8/8/7N/8/7K/6n1/8} 1 {8/8/3N4/8/3n4/8/B7/K1k5}
1243  32.2 67.8 0.0 0.0 96.1 3.9
1244  922 922 {} 0 {} 0 {}
1245 }
1246 
1247 set tbs(kbnkp) {
1248  165 104 ? 55 ?
1249  91.4 5.5 3.2 14.7 23.0 62.4
1250  62 61 {} 1 {8/8/8/1N6/3K4/B7/5p2/k7} 0 {}
1251 }
1252 
1253 set tbs(kbpkq) {
1254  117 35 ? 50 ?
1255  21.3 11.5 67.2 96.8 2.8 0.4
1256  16 0 {} 16 {
1257  3K4/2P5/B3qk2/8/8/8/8/8 8/1KP1q3/1B1k4/8/8/8/8/8 8/qPK5/8/3k4/1B6/8/8/8
1258  2q5/2B2P2/3K4/1k6/8/8/8/8 8/2P5/4q3/KB6/8/k7/8/8 8/3P4/5q2/1KB5/8/1k6/8/8
1259  8/1KP1q3/4k3/B7/8/8/8/8 3K4/q1P5/B4k2/8/8/8/8/8 8/5P2/3K4/8/4k2B/7q/8/8
1260  8/4P3/6q1/k1K5/2B5/8/8/8 3k4/KP1q4/3B4/8/8/8/8/8 8/3K1P2/1k2Bq2/8/8/8/8/8
1261  3K4/2P5/2B2k2/8/1q6/8/8/8 8/1P1K4/1qB2k2/8/8/8/8/8 1k6/3K1P2/4Bq2/8/8/8/8/8
1262  5k2/1P1K4/1qB5/8/8/8/8/8
1263  } 0 {}
1264 }
1265 
1266 set tbs(kbpkr) {
1267  451 45 ? 39 ?
1268  30.9 67.3 1.8 23.4 73.1 3.5
1269  306 4 {} 302 {} 0 {}
1270 }
1271 
1272 set tbs(kbpkb) {
1273  570 51 ? 3 ?
1274  41.3 58.7 0.0 0.0 86.9 13.1
1275  160 160 {} 0 {} 0 {}
1276 }
1277 
1278 set tbs(kbpkn) {
1279  497 105 ? 8 ?
1280  53.7 46.3 0.0 0.0 76.4 23.6
1281  2125 2112 {} 13 {} 0 {}
1282 }
1283 
1284 set tbs(kbpkp) {
1285  1443 67 ? 51 ?
1286  86.4 9.5 4.1 16.7 24.1 59.2
1287  406 403 {} 2 {} 1 {8/8/8/8/8/k1p5/2P5/1BK5}
1288 }
1289 
1290 set tbs(knnkq) {
1291  5 1 {k1N5/2K5/8/3N4/8/5q2/8/8} 72 ?
1292  0.0 42.8 57.1 94.0 6.0 0.0
1293  229 0 {} 229 {} 0 {}
1294 }
1295 
1296 set tbs(knnkr) {
1297  15 3 {5r1k/8/7K/4N3/5N2/8/8/8} 41 {8/8/1r4N1/4kN2/8/8/8/4K3}
1298  0.0 99.6 0.4 6.3 93.7 0.0
1299  25 0 {} 25 {} 0 {}
1300 }
1301 
1302 set tbs(knnkb) {
1303  2 4 {7k/5K2/8/8/5NN1/8/8/2b5} 1 {8/8/8/8/8/8/N1k5/K1b4N}
1304  0.0 100.0 0.0 0.0 100.0 0.0
1305  0
1306 }
1307 
1308 set tbs(knnkn) {
1309  8 7 {7n/8/8/8/1N1KN3/8/8/k7} 1 {K7/N1k5/8/3n4/3N4/8/8/8}
1310  0.1 99.9 0.0 0.0 100.0 0.0
1311  362 362 {} 0 {} 0 {}
1312 }
1313 
1314 set tbs(knnkp) {
1315  71 115 ? 74 ?
1316  31.3 66.4 2.3 12.8 73.6 13.6
1317  3143 3124 {} 19 {} 0 {}
1318 }
1319 
1320 set tbs(knpkq) {
1321  130 41 ? 55 ?
1322  17.9 11.9 70.2 97.2 2.3 0.5
1323  52 0 {} 52 {} 0 {}
1324 }
1325 
1326 set tbs(knpkr) {
1327  433 44 ? 67 ?
1328  26.7 69.3 4.0 29.3 68.5 2.2
1329  1181 23 {} 1158 {} 0 {}
1330 }
1331 
1332 set tbs(knpkb) {
1333  728 43 ? 9 ?
1334  38.8 61.2 0.0 0.0 88.1 11.9
1335  642 640 {} 2 {} 0 {}
1336 }
1337 
1338 set tbs(knpkn) {
1339  781 97 ? 7 ?
1340  49.2 50.8 0.0 0.0 77.2 22.8
1341  4191 4128 {} 63 {} 0 {}
1342 }
1343 
1344 set tbs(knpkp) {
1345  1410 57 ? 58 ?
1346  78.3 13.6 8.1 21.8 27.6 50.6
1347  2303 2281 {} 14 {} 8 {
1348  8/8/8/8/3K4/NkpP4/8/8 8/8/8/8/3K4/3PpkN1/8/8 8/8/8/8/8/1k2p3/4P3/KN6
1349  8/8/8/8/8/2K5/2PpkN2/8 8/8/8/8/8/3K4/3PpkN1/8 8/8/8/8/8/3K4/NkpP4/8
1350  8/8/8/8/1p6/1P6/K7/N1k5 8/8/8/8/8/1K6/1PpkN3/8
1351  }
1352 }
1353 
1354 set tbs(kppkq) {
1355  726 124 {8/5P2/8/8/3K4/3P3q/7k/8} 41 {8/2KP2q1/8/2P5/5k2/8/8/8}
1356  16.0 12.6 71.4 98.4 1.5 0.1
1357  2 0 {} 2 {8/2KP3q/2P2k2/8/8/8/8/8 8/2KP3q/8/2P3k1/8/8/8/8} 0 {}
1358 }
1359 
1360 set tbs(kppkr) {
1361  1652 54 {3K4/8/8/4P3/8/2r5/5P2/2k5} 40 {8/8/8/7K/5P2/3Pr3/8/2k5}
1362  35.4 20.1 44.5 75.2 18.2 6.6
1363  119 18 {} 99 {} 2 {1r1k4/1P6/1PK5/8/8/8/8/8 8/8/8/8/k7/r1P5/1KP5/8}
1364 }
1365 
1366 set tbs(kppkb) {
1367  519 43 {8/6P1/7k/8/6P1/1K6/8/1b6} 4 {K5b1/P7/1k6/8/8/8/2P5/8}
1368  54.4 45.6 0.0 0.0 75.4 24.6
1369  212 211 {} 1 {8/8/8/8/8/b2k4/P2P4/1K6} 0 {}
1370 }
1371 
1372 set tbs(kppkn) {
1373  705 50 {3n4/5P2/8/8/3K2P1/8/k7/8} 17 {7K/8/4k2P/8/8/8/5P2/5n2}
1374  64.7 35.3 0.0 0.0 62.4 37.6
1375  1077 920 {} 157 {} 0 {}
1376 }
1377 
1378 set tbs(kppkp) {
1379  5080 127 {8/8/8/8/1p2P3/1k1KP3/8/8} 43 {7K/8/4P3/5P2/3k4/7p/8/8}
1380  77.1 10.3 12.6 27.7 19.1 53.2
1381  4237 4179 {} 52 {} 6 {
1382  8/8/8/8/2k5/K1p5/P3P3/8 8/8/8/8/3k4/1K1p4/1P3P2/8
1383  8/8/8/8/4k3/2K1p3/2P3P1/8 8/8/8/2k5/K1p5/P3P3/8/8
1384  8/8/8/8/5k2/3K1p2/3P3P/8 8/8/8/k7/p1K5/2P5/2P5/8
1385  }
1386 }
1387 
1388 set tbs(kqqqk) {
1389  0 3 ? 0 -
1390  100.0 0.0 0.0 0.0 4.0 96.0
1391  0
1392 }
1393 
1394 set tbs(kqqrk) {
1395  0 4 ? 0 -
1396  100.0 0.0 0.0 0.0 3.1 96.9
1397  0
1398 }
1399 
1400 set tbs(kqqbk) {
1401  3 4 ? 0 -
1402  100.0 0.0 0.0 0.0 2.7 97.3
1403  0
1404 }
1405 
1406 set tbs(kqqnk) {
1407  2 4 ? 0 -
1408  100.0 0.0 0.0 0.0 2.4 97.6
1409  0
1410 }
1411 
1412 set tbs(kqqpk) {
1413  12 4 ? 0 -
1414  100.0 0.0 0.0 0.0 2.1 97.9
1415  0
1416 }
1417 
1418 set tbs(kqrrk) {
1419  0 4 ? 0 -
1420  100.0 0.0 0.0 0.0 2.0 98.0
1421  0
1422 }
1423 
1424 set tbs(kqrbk) {
1425  3 5 ? 0 -
1426  100.0 0.0 0.0 0.0 1.7 98.3
1427  0
1428 }
1429 
1430 set tbs(kqrnk) {
1431  3 5 ? 0 -
1432  100.0 0.0 0.0 0.0 1.4 98.6
1433  0
1434 }
1435 
1436 set tbs(kqrpk) {
1437  26 7 ? 0 -
1438  100.0 0.0 0.0 0.0 1.1 98.9
1439  0
1440 }
1441 
1442 set tbs(kqbbk) {
1443  3 6 ? 0 -
1444  100.0 0.0 0.0 0.0 5.0 95.0
1445  0
1446 }
1447 
1448 set tbs(kqbnk) {
1449  5 7 ? 0 -
1450  100.0 0.0 0.0 0.0 1.1 98.9
1451  0
1452 }
1453 
1454 set tbs(kqbpk) {
1455  31 9 ? 0 -
1456  100.0 0.0 0.0 0.0 1.2 98.8
1457  0
1458 }
1459 
1460 set tbs(kqnnk) {
1461  0 8 ? 0 -
1462  100.0 0.0 0.0 0.0 9.1 90.9
1463  0
1464 }
1465 
1466 set tbs(kqnpk) {
1467  10 9 ? 0 -
1468  100.0 0.0 0.0 0.0 1.0 99.0
1469  0
1470 }
1471 
1472 set tbs(kqppk) {
1473  64 9 ? 0 -
1474  100.0 0.0 0.0 0.0 0.7 99.3
1475 }
1476 
1477 set tbs(krrrk) {
1478  2 5 ? 0 -
1479  100.0 0.0 0.0 0.0 0.9 99.1
1480  0
1481 }
1482 
1483 set tbs(krrbk) {
1484  0 10 ? 0 -
1485  100.0 0.0 0.0 0.0 0.8 99.2
1486  0
1487 }
1488 
1489 set tbs(krrnk) {
1490  0 10 ? 0 -
1491  100.0 0.0 0.0 0.0 0.6 99.4
1492  0
1493 }
1494 
1495 set tbs(krrpk) {
1496  7 14 ? 0 -
1497  100.0 0.0 0.0 0.0 0.3 99.7
1498  0
1499 }
1500 
1501 set tbs(krbbk) {
1502  0 12 ? 0 -
1503  100.0 0.0 0.0 0.0 4.3 95.7
1504  0
1505 }
1506 
1507 set tbs(krbnk) {
1508  3 29 ? 0 -
1509  100.0 0.0 0.0 0.0 0.5 99.5
1510  0
1511 }
1512 
1513 set tbs(krbpk) {
1514  23 16 ? 0 -
1515  100.0 0.0 0.0 0.0 0.6 99.4
1516  0
1517 }
1518 
1519 set tbs(krnnk) {
1520  0 15 ? 0 -
1521  100.0 0.0 0.0 0.0 8.5 91.5
1522  0
1523 }
1524 
1525 set tbs(krnpk) {
1526  16 17 ? 0 -
1527  100.0 0.0 0.0 0.0 0.5 99.5
1528  0
1529 }
1530 
1531 set tbs(krppk) {
1532  119 15 {8/8/4k3/8/8/3P4/3P4/5R1K} 0 -
1533  100.0 0.0 0.0 0.0 0.2 98.8
1534  0
1535 }
1536 
1537 set tbs(kbbbk) {
1538  0 16 ? 0 -
1539  74.0 26.0 0.0 0.0 31.6 68.4
1540  0
1541 }
1542 
1543 set tbs(kbbnk) {
1544  3 33 ? 0 -
1545  100.0 0.0 0.0 0.0 4.1 95.9
1546  0
1547 }
1548 
1549 set tbs(kbbpk) {
1550  5 30 ? 0 -
1551  98.3 1.7 0.0 0.0 6.8 93.2
1552  0
1553 }
1554 
1555 set tbs(kbnnk) {
1556  0 34 ? 0 -
1557  100.0 0.0 0.0 0.0 8.4 91.6
1558  0
1559 }
1560 
1561 set tbs(kbnpk) {
1562  26 33 ? 0 -
1563  100.0 0.0 0.0 0.0 0.8 99.2
1564  0
1565 }
1566 
1567 set tbs(kbppk) {
1568  100 25 ? 0 -
1569  99.8 0.2 0.0 0.0 1.3 98.7
1570  6 6 {
1571  8/B1k5/K7/P7/P7/8/8/8 K7/8/1k6/1P6/BP6/8/8/8 K7/8/Bk6/1P6/1P6/8/8/8
1572  KBk5/P1P5/8/8/8/8/8/8 kB6/8/1PK5/1P6/8/8/8/8 kB6/8/KP6/1P6/8/8/8/8
1573  } 0 {} 0 {}
1574 }
1575 
1576 set tbs(knnnk) {
1577  0 21 ? 0 -
1578  98.7 1.3 0.0 0.0 25.0 75.0
1579  0
1580 }
1581 
1582 set tbs(knnpk) {
1583  7 28 ? 0 -
1584  98.4 1.6 0.0 0.0 12.0 88.0
1585  0
1586 }
1587 
1588 set tbs(knppk) {
1589  96 32 ? 0 -
1590  100.0 0.0 0.0 0.0 1.0 99.0
1591  93 93 {} 0 {} 0 {}
1592 }
1593 
1594 set tbs(kpppk) {
1595  97 33 {7K/5k2/8/8/1P6/1P6/1P6/8} 0 -
1596  99.9 0.1 0.0 0.0 0.6 99.4
1597  11 11 {
1598  1k6/1P6/K7/P7/P7/8/8/8 1k6/1P6/K7/PP6/8/8/8/8 2k5/2P5/3K4/P7/P7/8/8/8
1599  8/1k6/1P6/KP6/1P6/8/8/8 8/8/1k6/1P6/KP6/1P6/8/8 8/8/8/1k1P4/8/PK6/P7/8
1600  8/8/8/1k6/1P6/KP6/1P6/8 8/K1k5/P1P5/P7/8/8/8/8 K1k5/2P5/P1P5/8/8/8/8/8
1601  K1k5/8/P1P5/P7/8/8/8/8 k7/8/KP6/PP6/8/8/8/8
1602  } 0 {} 0 {}
1603 }
1604 
1605 # End of file: tb.tcl
1606