About Kingsrow and Scan
possibilities and mutual confrontations
Hilko Koning
For most draughts players Kingsrow hardly needs an introduction. Scan is more or less a new kid on the block. In 2015 Scan surprised everyone to win the draughts tournament during the Computer Olympiad organised by the Leiden Institute of Advanced Computer Science in the Netherlands. This month Scan repeated this masterstroke and won again! In both cases Kingsrow did not attend.
Scan written in C++11 and designed for 4 cores, is a so called “console application” and developed by the Frenchman Fabien Letouzey. Scan has nevertheless a minimal graphical interface (GUI) named “HUB”. An endgame database is present for up to 6 pieces. In scanning the evaluations, the program divides the board into 16 overlapping 4×4 squares (2-16, 3-17, … 35-49) hence the name ‘Scan’. Read more about Fabien Letouzey here.The Dutchman Harm Jetten (developer of the strong draughts program “Moby Dam”) did a lot of work for helping with Windows compatibility. Running scan as a console application in a windows environment requires some efforts. Scan is distributed under the GNU general Public License version 3 and “open source”. The program is available as a free download on the website of Harm Jetten (here).
The American Ed Gilbert released Kingsrow already in 2000 as a strong 8×8 checkers engine and completed a 10-piece database in 2005. A 10×10 version of Kingsrow was started in 2007. Ed Gilbert finished an eight-piece endgame (10×10) database in 2009. Nowadays Kingsrow focusses on 10×10 draughts only. Kingsrow has a Windows user interface and uses familiar Windows controls. Kingsrow has a parallel search engine with selection from 1 to 8 search threads. One search thread can be used for each available core. Gilbert developed also a partial 9-piece database for our international board. However, the performance of Kingsrow is better by switching off the 9-piece database. Kingsrow is available for $85 on the website of Ed Gilbert (here).
Both programs are also capable of playing DamExchange matches. DamExchange is a protocol designed by Frank Mesander that allows two draughts programs to communicate and play games over a TCP/IP connection. Another possibility is to read a position from a pdn file. When Kingsrow is the “initiator” it plays a match of consisting of a large number of games using either 2-move or 3-move start positions. These are the positions reached after all possible sequences of the first two or three moves from the normal game start, except that the sequences that immediately lose a man are omitted. Each program gets to play one game with the black pieces and then another with the white pieces for each of these start positions. The purpose of the large variety of start positions is to avoid duplicate games. There are 79 2-move start positions (158 games) and 494 3-move positions (988 games).
I performed three matches (dxp connections with Kingsrow as the initiator) between Kingsrow (v. 1.58) and Scan (v. 2.0) on the same computer (Intel 4 cores, 64 bits and 16 Gb RAM) with three different time control settings; 158 games (120 moves/3 minutes), 5 games (50 moves/60 minutes) and 5 games (75 moves/180 minutes). Further settings; Kingsrow – endgame database 8 pieces, opening book, pondering off, search threads 4 and Scan – book=true, ponder=false, threads=4, tt-size=24 and bb-size=6.
Results: 158 games (120 moves/3 minutes), 1 win for Kingsrow, 4 losses and 153 draws, 5 games (50 moves/60 minutes) all draws and finally 5 games (75 moves/180 minutes) all draws. The games (in pdn format) can be found here (120 moves/3 minutes), here (50 moves/60 minutes) and here (75 moves/180 minutes).[For one reason or another I lost my dxp connection in game 5 (50 moves/60 minutes) after 35 moves. Both programs agreed that the position was equal].
There were lots of interesting clashes. It is obvious and most people knew that already, Scan is an excellent and strong program.
Kingsrow – Scan 0-2 (120 moves/3 minutes)
1.…13-18 2. 50-44 A 18-23 3. 37-31 2-7 4. 32-27 23×32 5. 27×18 12×23 6. 38×27 21×32 7. 44-39 17-21 8. 26×17 23-29 9. 34×23 19×28 10. 33×22 24-30 11. 35×24 16-21 12. 17×26 14-19 13. 24×13 9×36 * Nice. A: 2. … 50-44? to keep his own position under control 49-44 was needed.
During the Worldchampionschip Draughts 2015 in Emmen in the Netherlands I had the opportunity to speak with Fabien Letouzey. He told me that the Kingsrow endgame databases are useless which puzzled me. Regarding the mutual confrontations, he may be right and probably he meant it that way. Evaluations and simultaneously accessing large databases give in general performance problems especially with very fast time control settings?? The evaluation functions of Scan are somewhat better??
Reading some positions from a pdn file:
This position needs no introduction. Note that Kingsrow and Scan use different ways to defend the black position (50 moves/60 minutes). pdn file here.
Kingsrow – Scan 1-1
1. … 17-22 2. 28×17 21×12 3. 33-28 24-29 4. 39-33 12-17 5. 33×24 17-21 6. 38-33 23-29 7. 28-23 19×39 8. 24×44 18-23 9. 27-22 13-18 10. 22×13 14-19 11. 13×24 21-27 12. 32×21 16×27 13. 44-40 23-28 14. 24-19 27-32 15. 19-14 32×41 16. 14-10 28-32 17. 10-4 *
Scan – Kingsrow 1-1
1. … 17-22 2. 28×17 21×12 3. 33-28 12-17 4. 38-33 26-31 5. 37×26 23-29 6. 28-23 19×37 7. 30×10 29×38 8. 10-4 16-21 9. 27×16 37-41 10. 4-10 41-47 11. 39-33 38×29 12. 10-23 29-34 13. 23×21 34-39 14. 21-17 39-43 *
In a perfect play it takes an amazing and whopping amount of 243 plies to win this black position. Do you really want to know how? OK here (Michel Grimminck, the developer of another strong draughts program “Dragon Draughts”: website here).
Kingsrow – Scan 1-1
1… 33-39 2. 6-1 39-44 3. 1-34 37-41(A) a Kingsrow database draw from here forward 4. 34-25 41-46 5. 11-6 44-50 6. 6-1 8-13 7. 25-20 50-45 8. 1-6 46-37 9. 6-50 * (A) Note; Kingsrow will declare a game drawn after it has seen 6 successive search scores of a database draw, which is the case here (and if there are no more than 16 pieces remain on the board).
Scan – Kingsrow 0-2
1. … 33-39 2. 6-1 39-44 3. 1-34 37-42 4. 34-48 42-47 5. 11-6 8-13 6. 6-1 44-50 7. 48-31 13-19 8. 1-45 50-6 9. 45-1 47-15 10. 31-9 19-24 11. 9-25 15-4 12. 25-48 5-10 13. 48-34 10-15 14. 34-40 4-13 15. 40-34 13-8 16. 34-48 15-20 17. 48-26 8-13 18. 26-8 13-19 19. 8-21 24-30 20. 1-40 19-13 21. 21-12 13-36 22. 12-1 30-35 23. 40-45 20-25 24. 45-34 6-33 25. 34-45 36-22 26. 45-12 33-50 27. 12-21 22-6 28. 1-23 6-1 29. 23-19 35-40 30. 21-27 40-44 31. 27-13 44-49 32. 13-36 2-7 33. 19-35 7-12 34. 36-4 50-28 35. 35-2 28-32 36. 2-7 12-17 37. 7-2 17-21 38. 2-8 21-26 39. 8-24 32-16 40. 4-9 16-2 41. 24-15 25-30 42. 9-22 30-35 43. 22-39 2-13 44. 15-42 13-18 45. 42-15 35-40 46. 39-44 40-45 47. 44-28 45-50 48. 28-5 26-31 49. 15-42 31-36 50. 42-15 50-22 *
The pdn file is here.
A.Gantwarg – N.Zadin
Black to move has severe problems! This position has been discussed already extensively by me (here). Kingsrow wins with the white pieces and makes a draw with the black pieces.
Kingsrow – Scan 2-0 (50 moves/60 minutes) 1. … 24-29 2. 33×24 19×30 3. 35×24 23-28 4. 32×3 21×41 5. 3×20 26-31 6. 20-15 41-46 7. 22-17 31-36 8. 17-12 13-18A 9. 12×23 46×30 10. 15-10 16-21 11. 38-33 30-35 12. 25-20 35-13 13. 10-46 13-2 14. 20-15 2-24 15. 33-28 21-27 16. 28-23 24-29 17. 23-19 29×40 18. 19-14 40-29 19. 14-9 29-7 20. 9-3 7-16 21. 46-28 16-2 22. 3-26 2-24 23. 15-10 24-29 24. 10-5 29-7 25. 28-33 7-18 26. 26-48 18-4 27. 5-46 4-15 28. 33-11 15-38 29. 11-2 38-49 30. 2-16 27-31 31. 48×26 49-35 32. 26-48 35-49 33. 46-32 49×27 34. 16×32 36-41 35. 32×46 * A 8. … 13-18? The decisive moment!
Scan – Kingsrow 1-1 (50 moves/60 minutes) 1. … 24-29 2. 33×24 19×30 3. 35×24 23-28 4. 32×3 21×41 5. 3×20 26-31 6. 20-15 41-46 7. 22-17 31-36 8. 15-4 (A) 13-19 9. 24×13 36-41 10. 39-33 41-47 11. 13-8 46-23 12. 34-30 23-19 13. 8-3 19×35 14. 4-18 47-36 * (A) 6 successive search scores of a Kingsrow database draw from here forward. The pdn file is here.
However it may be, it is not surprising (at least not to me) that there are lots of difficult positions resulting in complex endgames where for example one colour has the advantage and where Kingsrow wins that position and makes a draw with the opposite colour.
Sources: Scan readme files, Kingsrow help files and Ed Gilbert Kingsrow-Wikipedia page.
Ed Gilbert (response by email 17-7-2016):
It’s true that the larger 8-piece endgame db does not add much strength in match games. But it is not useless. I haven’t studied many of the games against scan, but I have over the years watched a lot of games between kingsrow and dragon. Before scan arrived, dragon was the main opponent that I used for testing. In the course of several hundred games between kingsrow and dragon, I usually see kingsrow draw a few games that it should have lost (because it was in a database lost position), due to its use of the 8pc db. Dragon also has an 8pc db, but it does not dynamically cache the data. It loads a fixed subset of positions at startup and limits its db probing to that subset. The few more drawn games does not have much affect on the match scores because I am usually running matches at very fast game times, so there is a higher percentage of decisive games than in the matches that you ran.
There is also an active group of draughts players that participate in competitions to create what they call compositions, or positions that have ‘thematic variations’. I don’t know a whole lot about this aspect of draughts, but what I do know is that these special positions have to have the property that the position is a white win, and when the game is played out, at each of white’s turn to move there can only be one move that wins, otherwise the position is not a valid composition. These positions can have 10, 12, 14, 16 or more pieces, and if you’re trying to verify the ‘only one white move to win’ criteria using a program, it’s much easier to do this with an 8pc db than with a 6pc db.
Bedankt voor je reactie. Ik ben een digibeet en bedacht dat het mogelijk veel geheugenruimte zou schelen als ik de Scandatabase niet zou installeren. Je geeft aan dat Windows 10 niet zo geschikt is. Ik kan eventueel ook Firefox gebruiken. Gaat installeren van Scan daar gemakkelijker mee?
Vr. groet, Gerrit
Firefox is een web browser en geen besturingssysteem.
Het is waar dat bij gelijktijdig gebruik van Kingsrow en Scan (plus eindspeldatabase) dat geheugenruimte kost.
P.S: Kingsrow speelt in de praktijk in de meeste gevallen al fors met de handrem erop. Immers Kingsrow kan 8 processor cores aanspreken (Liefst meer, voor het OS). Om de totale eindspeldatabase in het geheugen te laden is minimaal 64 GB RAM nodig (Liefst veel meer).
Liefst Kingsrow natuurlijk geinstalleeerd op een (aparte) snelle SSD schijf. Voor het geld dat daar voor nodig is kun je natuurlijk ook een behoorlijke tweedehans auto kopen.
Hallo Hilko,
Bedankt voor dit informatieve artikel.
Zelf heb ik Kingsrow. Nu wil ik ook Scan 3.0 installeren. De vraag die ik daarbij heb is of het mogelijk (en verstandig) is om de eindspeldatabase van Scan niet te installeren, aangezien ik voor het eindspel de 8stukken database van Kingsrow kan gebruiken.
Vr. groet,
Gerrit Draaisma
Beste Gerrit,
“-of het mogelijk (en verstandig) is om de eindspeldatabase van Scan niet te installeren-“?
Natuurlijk is het mogelijk om de 6 stukken eindspeldatabase van Scan niet te installeren. Excuus maar de vraag of dat al of niet verstandig is begrijp ik niet helemaal. Er is geen enkele reden om dat niet te doen. Wanneer Kingsrow en Scan uitsluitend als analytisch gereedschap worden gebruikt is het niet direct nodig (Kingsrow eindspeldatabases zijn dan natuurlijk superieur).
P.S. De programmeur van Scan Fabien Letouzey is in het geheel geen Windows adept (Terecht overigens: Windows (10) is een drama en een privacy ramp). Dat betekent wel dat om Scan in een Windows omgeving fatsoenlijk aan de praat te krijgen dat enige tijd en inspanning vergt.
Hilko Koning