World Draughts Forum

It is currently Fri Sep 22, 2017 07:14

All times are UTC+01:00




Post new topic  Reply to topic  [ 247 posts ]  Go to page Previous 113 14 15 16 17
Author Message
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 09:40 
Offline

Joined: Wed Apr 14, 2004 15:04
Posts: 1550
BertTuyt wrote:
A weekend in Holland.
Full bulk counting, but should still be a little beter :D
Code:
Perft(11)       N = 1665861398     7.35 sec.    KN/sec = 226647
Perft(9)        N = 1216917193     3.95 sec.    KN/sec = 308080
Perft(15)       N = 346184885      2.38 sec.    KN/sec = 145455

Bert


What are your machine specs, Bert?

My latest results: Ubuntu Linux 16.04 in a VirtualBox on Windows 10 @3.6 GHz, gcc 7.2 PGO build
Code:
info depth 11 leafs   1665861398 time   6849 243227 knps
info depth  9 leafs   1216917193 time   3490 348687 knps
info depth 15 leafs    346184885 time   2486 139254 knps


2 out of 3 are fastest, the final position doesn't respond to PGO at all


Top
   
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 10:39 
Offline

Joined: Wed Sep 01, 2004 18:42
Posts: 1293
Rein, 8 core Intel, 4 GHz.

Attached the source, so all may use, or propose improvements.

Bert


Attachments:
CMoveGen128.zip [3.31 KiB]
Downloaded 9 times
Top
   
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 10:45 
Offline

Joined: Wed Apr 14, 2004 15:04
Posts: 1550
BertTuyt wrote:
Rein, 8 core Intel, 4 GHz.

Attached the source, so all may use, or propose improvements.

Bert


I noticed that Harm, Ed, and you use these ray masks for king jumps. It took me a long time to fully understand how they work, but they are very clever! However, because the ray masks are of constant length and shifted per origin square, they interact with the ghost squares in a tricky way. I managed to improve (well, On My Machine TM) this by making a table of square-specific jump detection masks. This allows some early "cut-offs" in my capture routine. I'll write something longer about it when I have some more time.

Another thing that I do differently is king move generation: I use what the chess programming wiki calls the Classical Approach In One Run, which is 5 table lookups XOR-ed together, and then a single bit-serialization for each king origin square.

On my TODO list is generalizing my capture routine to generate both moves, GUI moves with path info as well as successor positions from the same routine.

My source is here: https://github.com/rhalbersma/dctl/tree ... ons/detail (warning, template-heavy code!). Feel free to ask anything.


Top
   
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 10:57 
Offline

Joined: Wed Sep 01, 2004 18:42
Posts: 1293
I noticed that Harm, Ed, and you use these ray masks for king jumps

Rein, I implemented the ray mask while studying the Moby Dam code from Harm.
I thought this was a very clever approach, and therefore also implemented this.
So all credits to him.

Bert


Top
   
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 10:59 
Offline

Joined: Wed Apr 14, 2004 15:04
Posts: 1550
BertTuyt wrote:
I noticed that Harm, Ed, and you use these ray masks for king jumps

Rein, I implemented the ray mask while studying the Moby Dam code from Harm.
I thought this was a very clever approach, and therefore also implemented this.
So all credits to him.

Bert


Yes, Harm's program is a great piece of work. It reads very easily, compiles fast and its perft is fastest of all.


Top
   
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 13:00 
Offline

Joined: Wed Sep 01, 2004 18:42
Posts: 1293
Rein, now doing a Verify for 13P DB.
When observing the task manager I didnt see the 4.0 GHz speed.
But the 3.5 GHz - 3.6 GHz (which seems to me the Turbo Speed).
So I might need to rerun the Perft(), when the Verify has finished.

In the past I had the feeling that Windows 10 changed Power Balance Plan Settings, after an update.
Or things in the BIOS are modified, will have a look at it.

Bert


Top
   
 Post subject: Re: Perft
PostPosted: Sat Aug 26, 2017 22:17 
Offline

Joined: Wed Sep 01, 2004 18:42
Posts: 1293
With PGO and 4 GHz .

Code:
pos XW XB 20 20
Perft(1)        N = 9      0.00 sec.    KN/sec = 0
Perft(2)        N = 81     0.00 sec.    KN/sec = 0
Perft(3)        N = 658    0.00 sec.    KN/sec = 0
Perft(4)        N = 4265           0.00 sec.    KN/sec = 0
Perft(5)        N = 27117          0.00 sec.    KN/sec = 0
Perft(6)        N = 167140         0.00 sec.    KN/sec = 0
Perft(7)        N = 1049442        0.00 sec.    KN/sec = 0
Perft(8)        N = 6483961        0.02 sec.    KN/sec = 324198
Perft(9)        N = 41022423       0.15 sec.    KN/sec = 273482
Perft(10)       N = 258895763      1.08 sec.    KN/sec = 239718
Perft(11)       N = 1665861398     6.16 sec.    KN/sec = 270432
pos XW XB 17 2
Perft(1)        N = 14     0.00 sec.    KN/sec = 0
Perft(2)        N = 55     0.00 sec.    KN/sec = 0
Perft(3)        N = 1168           0.00 sec.    KN/sec = 0
Perft(4)        N = 5432           0.00 sec.    KN/sec = 0
Perft(5)        N = 87195          0.00 sec.    KN/sec = 0
Perft(6)        N = 629010         0.00 sec.    KN/sec = 0
Perft(7)        N = 9041010        0.02 sec.    KN/sec = 452050
Perft(8)        N = 86724219       0.24 sec.    KN/sec = 361350
Perft(9)        N = 1216917193     3.83 sec.    KN/sec = 317732
pos XW XB 10 10
Perft(1)        N = 6      0.00 sec.    KN/sec = 0
Perft(2)        N = 12     0.00 sec.    KN/sec = 0
Perft(3)        N = 30     0.00 sec.    KN/sec = 0
Perft(4)        N = 73     0.00 sec.    KN/sec = 0
Perft(5)        N = 215    0.00 sec.    KN/sec = 0
Perft(6)        N = 590    0.00 sec.    KN/sec = 0
Perft(7)        N = 1944           0.00 sec.    KN/sec = 0
Perft(8)        N = 6269           0.00 sec.    KN/sec = 0
Perft(9)        N = 22369          0.00 sec.    KN/sec = 0
Perft(10)       N = 88050          0.00 sec.    KN/sec = 0
Perft(11)       N = 377436         0.00 sec.    KN/sec = 0
Perft(12)       N = 1910989        0.01 sec.    KN/sec = 191098
Perft(13)       N = 9872645        0.07 sec.    KN/sec = 141037
Perft(14)       N = 58360286       0.40 sec.    KN/sec = 145900
Perft(15)       N = 346184885      2.24 sec.    KN/sec = 154546
Press any key to continue . . .


Bert


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 247 posts ]  Go to page Previous 113 14 15 16 17

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited