Scan

Discussion about development of draughts in the time of computer and Internet.
Post Reply
Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Scan

Post by Ed Gilbert » Sun Oct 25, 2015 14:57

Someone asked me if I would compile a 32-bit Windows executable of scan. I have done that and placed it in the same zip file with the 64-bit version for computers without the popcount intrinsic. Link: http://edgilbert.org/InternationalDraug ... ources.zip

I had to make a few changes because of the change in the size of size_t. Also, when I first ran it, it crashed while loading the 6-piece db, I think because it needs a little more than 2gb of ram to load. It worked ok with up to 5 pieces. But then I remembered the largeaddressaware linker switch, which lets it address up to 3gb, and that gave it enough to work with 6 pieces.

The 32-bit version of the compiler is a little fussier and generates more warnings than the 64-bit version. Most of these looked harmless, like complaints about loss of precision when assigning a double to a float. However there is a warning from tuple.cpp that looks suspicious:

>src\tuple.cpp(137): warning C4146: unary minus operator applied to unsigned type, result still unsigned

Line 137 is this statement: return bit_t(-bit(sq + 1));

Fabien, did you intend to use a one's complement here instead of a two's complement?

-- Ed

Krzysztof Grzelak
Posts: 1368
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: Scan

Post by Krzysztof Grzelak » Sun Oct 25, 2015 15:53

Ed I tried to download but unfortunately it goes.

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: Scan

Post by BertTuyt » Sun Oct 25, 2015 20:05

At the very beginning I thank you for Gui Bert. Unfortunately, not everything is working properly. It does not work properly record party, unfortunately you need to improve. The program after saving the party does not show the correct beat, so x. Please make a DXP program.
Krzysztof , thanks for the post, as I mentioned I did not implement all (neither test all), so I will dig into this one, and solve it.
A DXP implementation is also something on the list of things to do, but the GUIDE source is quite huge, so I can only improve these things step by step...

Bert

Fabien Letouzey
Posts: 299
Joined: Tue Jul 07, 2015 07:48
Real name: Fabien Letouzey

Re: Scan

Post by Fabien Letouzey » Mon Oct 26, 2015 08:44

Ed Gilbert wrote:Line 137 is this statement: return bit_t(-bit(sq + 1));

Fabien, did you intend to use a one's complement here instead of a two's complement?
No, the code is correct (MSB bit filling).
http://fmjd.org/bb3/viewtopic.php?p=113111#p113111

Catherine
Posts: 129
Joined: Tue Aug 14, 2012 22:24
Real name: Catherine Bourneuf

Re: Scan

Post by Catherine » Tue Nov 17, 2015 18:37

Hi to all

I'am writting to expose the fact that Scan playing DXP games dont recognize some multi-move like: 46x37x28x39.
I played a dxp game Scan 2.0 vs Dam 2.2 and the game stopped after this "error" mentionned by Scan 2.0
It's a bug or a knowed problem?
Thank for advice and help if possible.

Harm Jetten
Posts: 43
Joined: Thu Sep 24, 2009 18:17

Re: Scan

Post by Harm Jetten » Tue Nov 17, 2015 23:46

Catherine, I am not aware of any problems with multi-part captures, either with Scan or Dam 2.2.
If you saved the game or made a screenshot please post them to the board or mail it to me, so I can investigate.

Sidiki
Posts: 321
Joined: Thu Jan 15, 2015 16:28
Real name: Coulibaly Sidiki

Re: Scan

Post by Sidiki » Sun Nov 22, 2015 02:37

Hi Catherine and other
i played a dxp game with Kingsrow 1.56 against Scan 2.0 and got a invalid move after several game of course. I don't know if it of this problem that Catherine written about.
Thank.
SCAN_ILLEGAL_MOVE[1].JPG
SCAN_ILLEGAL_MOVE[1].JPG (200.31 KiB) Viewed 14575 times

Fabien Letouzey
Posts: 299
Joined: Tue Jul 07, 2015 07:48
Real name: Fabien Letouzey

Re: Scan

Post by Fabien Letouzey » Sun Nov 22, 2015 08:51

Sidiki wrote:i played a dxp game with Kingsrow 1.56 against Scan 2.0 and got a invalid move after several game of course. I don't know if it of this problem that Catherine written about.
Thanks, this gives more context.

I'm having trouble understanding Kingsrow's move list in your screenshot. It looks like the position is after white's move 40 but:
- 38. ... 18-23 has not been played on the board
- there is no move 39 for white (!)

I will look into it regardless but things would be easier with a DXP log file. However I see that I did not provide such an option; my bad.

Fabien.

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Scan

Post by Ed Gilbert » Sun Nov 22, 2015 13:34

Kingsrow creates a logfile that has the position and search result of each search. But in the latest version just released it does not write this information in dxp mode. The reason is that the way the file writes are done, if they take any time, the time gets added to kingsrow's search time. Usually the file write time was not measurable, but every once in a while it was, and I was trying to tighten up its time management during quick dxp games. I should probably make it an option to write the logfile during dxp games. Kingsrow also has a DXP window that shows all the dxp messages sent and received, but it looks like that window was not open during Sidiki's game.

Sidiki was running a version that still wrote the logfile. If that file is still present, it can help us understand what happened. The file gets overwritten each time kingsrow is launched.

I have played several thousand games between kingsrow and scan and have not seen any problems. But I once had a bug with ambiguous moves that only showed up after tens of thousands of games.

-- Ed

Sidiki
Posts: 321
Joined: Thu Jan 15, 2015 16:28
Real name: Coulibaly Sidiki

Re: Scan

Post by Sidiki » Thu Nov 26, 2015 04:31

Hi all,
I runed another dxp games programmed to be 1580 games ie 10 dxp games opposed Kingsrow 1.57 (32 bits) against Scan 2.0 (32 bits)
major parameter:
dxp time: 1 min / 100 moves
The match had been stopped by the "error" illegal move with this perspective for Kingsrow: 45 wins, 193 losses, 542 draws, 0 unknowns

I joined the screen capture, the logfile of Kingsrow and the dxp game. I don't Know if the bug is only under 32 bit's version of Scan, but i hope that this elements can help to find what's wrong. Thanks.
Kingsrow logfile.Zip
(411.3 KiB) Downloaded 499 times
dxpgames.pdn
(903.39 KiB) Downloaded 493 times
Scan 2.0 error2.JPG
Scan 2.0 error2.JPG (286.24 KiB) Viewed 14450 times

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Scan

Post by Ed Gilbert » Thu Nov 26, 2015 04:47

Hi Sidiki,

I cannot open the zip file. On 2 computers it complains it is an invalid archive. Can you email me the logfile directly?

Also, if you still have the program in the state shown on the screen capture, can you copy the game to the clipboard using CTRL-C and paste it into an email to me (or post to the Forum)? The file of pdn games does not include this one because it is only updated when the game is over, and this one did not finish.

Thanks.

-- Ed

Sidiki
Posts: 321
Joined: Thu Jan 15, 2015 16:28
Real name: Coulibaly Sidiki

Re: Scan

Post by Sidiki » Thu Nov 26, 2015 05:39

Hi Ed,
unfortunatally, i closed the program, i will run another game. However this is another zip of logfile.
Kingsrow.zip
(635.7 KiB) Downloaded 545 times

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Scan

Post by Ed Gilbert » Thu Nov 26, 2015 17:06

Actually I'm wondering how you can run both kingsrow and scan simultaneously on a 32-bit computer unless you take steps to reduce the memory they normally would use. 32-bit Windows can only use a maximum 4GB of memory. Windows itself must use at least 1GB, perhaps even 1.5GB. Scan, if running with the 6-piece db uses about 2.2GB. That doesn't leave much left for another program. Kingsrow with its default settings will use close to 2GB on a 32-bit computer. Kingsrow and scan must be fighting each other to use whatever memory they can grab, and there's probably a lot of swapping to virtual memory disk going on during a match. I wouldn't be surprised if this glitch in the match is due to a memory allocation failing in either kingsrow or scan during the match.

IFAIK the only way to get scan to use less than 2GB of memory is to set bb-size to 5 in the scan.ini file. Kingsrow will use the sum of its egdb cache and hashtable sizes. You can set the egdb cache to 1000mb or even less, use a small hashtable, and restrict it to use a maximum of 7-pieces egdb.

-- Ed

Sidiki
Posts: 321
Joined: Thu Jan 15, 2015 16:28
Real name: Coulibaly Sidiki

Re: Scan

Post by Sidiki » Thu Nov 26, 2015 20:14

Hi Ed,

I use only the 5 egdb of Scan and the 6 egdb of Kingsrow.
With Kingsrow, i use 128 mb for both parameters
This is my Scan's setting:
book = true
book-margin = 0
threads = 2
tt-size = 24
bb-size = 5

dxp-server = true
dxp-host = 127.0.0.1
dxp-port = 27531
dxp-initiator = false
dxp-time = 1
dxp-moves = 100
dxp-board = true
dxp-search = true

Perhaps, is it enough?! I precise that my computer has 1 Go of Ram.

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Scan

Post by Ed Gilbert » Fri Nov 27, 2015 13:52

Sidiki, I noticed in your log file that you have the kingsrow "Search Threads" setting set to 8. This is probably incorrect for your PC as I doubt it has 8 cores. You should set it to a number no greater than the number of cores in your cpu. Setting it to 8 if you only have 1 or 2 cores can disrupt the kingsrow UI and may be the cause of the match hangups that you found.

Also, for quick matches like 1 minute games, you should use a smaller hashtable for better performance. 32MB is a better size for that time setting.

-- Ed

Post Reply