Search found 460 matches

by Joost Buijs
Sun Aug 14, 2016 15:27
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Yesterday ( = Saturday) I tried to debug the Magic code which I had started the weeks before. It also now works (as the Perft numbers are the same), but for an unknown reason it is not faster. I only use Magic for the King Moves, so not the King Capture detection (or alike). It is possible that usi...
by Joost Buijs
Sat Aug 13, 2016 22:20
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Joost, I have now also written some routines to calculate the Magic Numbers. I encountered the same problem as you, for the squares 23 and 28 , so I also might need to increase the table with a factor of 2. I used the random approach, more or less based on the info in https://chessprogramming.wikis...
by Joost Buijs
Fri Aug 12, 2016 20:13
Forum: Draughts, Computer, Internet
Topic: Downloadable 8-piece db and open source driver
Replies: 27
Views: 23033

Re: Downloadable 8-piece db and open source driver

Although I'm on vacation I still have some time for the hobby in the evening hours, I have my computer at home running and can log into it remotely with my laptop. I put most of your database on SSD and tried how fast I could probe all permutations for (2,2,1,1), this took roughly 261 seconds for al...
by Joost Buijs
Wed Aug 10, 2016 10:27
Forum: Draughts, Computer, Internet
Topic: Downloadable 8-piece db and open source driver
Replies: 27
Views: 23033

Re: Downloadable 8-piece db and open source driver

Thanks! This is very helpful. I couldn't resist to try your database code, it compiles without a hitch and I had it working in my program within a few minutes. The only thing I had to do was to convert my board-representation from 'bm,wm,bk,wk' to 'bp,wp,k'. I'm on the verge of generating a DTW data...
by Joost Buijs
Sat Aug 06, 2016 09:21
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Joost, you are right for normal man moves and captures, the traditional bitboard and shift operations work best. Magic is only relevant for King Captures (although I don't have an idea yet how to implement this in an easy way), and King moves (sliders). Bert For each occupancy I have 4 masks for th...
by Joost Buijs
Thu Aug 04, 2016 20:03
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Bert, Nice to hear that you are also busy with magic multiplication for move-generation. When you are generating king-moves it helps, for men-moves it is unnecessary, I generate these in the normal way. Generating magic numbers works best when the number of 1-bits in the multiplier are not too high,...
by Joost Buijs
Mon Jul 25, 2016 07:45
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Your results seem to be quite comparable to mine. Don't forget that I'm using the Intel compiler which has a better optimization compared to MSVC. Anyway, the differences are so small that they are not relevant for game play at all. I'm off now to retrograde analysis, which is full of pitfalls when ...
by Joost Buijs
Sun Jul 24, 2016 14:09
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Out of curiosity I also tried MSVC PGO, it is not as efficient as the one from Intel but it still does something. I compared with the standard optimization Maximize speed (/O2), Intrinsics Yes (/Oi), Favor fast code (/Ot) and Omit frame pointers (/Oy). With MSVC PGO: position 1 nps +6.5% position 2 ...
by Joost Buijs
Sun Jul 24, 2016 12:28
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Bert, I used the PGO from the Intel compiler, I guess the PGO from MSVC is about the same. First you have to instrument your program for optimization, then you have to let the program run for some time to let it resolve branches etc., after this you can run the optimization pass. With MSVC it is: st...
by Joost Buijs
Sat Jul 23, 2016 17:11
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Since the times to optimize with PGO seemed a little bit short to me I added some extra depth, 1 ply for the first two positions and 2 plies for the last position. Now I get this: m m m m m m m m m m m m m m m m m m m m - - - - - - - - - - M M M M M M M M M M M M M M M M M M M M perft( 1) nodes 9 ti...
by Joost Buijs
Sat Jul 23, 2016 15:40
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Bert, I used the latest version of my move-generator, run it at 4 GHz. and optimized it with PGO. These are the results I get: m m m m m m m m m m m m m m m m m m m m - - - - - - - - - - M M M M M M M M M M M M M M M M M M M M perft( 1) nodes 9 time 0.0000000 nps 0 perft( 2) nodes 81 time 0.0000003 ...
by Joost Buijs
Sat Jul 23, 2016 12:41
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

I have a 8-core Intel i7-5960X, but for Perft I only use 1 core. The processor is water-cooled, is overclocked and runs at 4 GHz. I use the Microsoft Visual Studio 2015, which nowadays is available as a free download. Bert This is exactly the same setup as I have over here, i7-5960X, normally I run...
by Joost Buijs
Sat Jul 23, 2016 07:40
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Bert Your perft() runs very fast, on what kind of computer CPU/clock frequency you measured this? Which compiler you used? It was not my goal to make the fastest perft() per se, but to make a move-generator that performs a few times better than the one in my old mailbox program. The perft() in my ol...
by Joost Buijs
Thu Jul 21, 2016 19:31
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

Thanks! At the moment it is a little bit too hot at the attic where I have my computers (no AC), when temperatures are back to normal I will try to compare your solution with mine. Basically I can check it by storing the 4 bit-boards together with the hash-key and see how many false positives will o...
by Joost Buijs
Thu Jul 21, 2016 07:48
Forum: Draughts, Computer, Internet
Topic: Perft
Replies: 256
Views: 189868

Re: Perft

I also abandoned Zobrist hashing. When you base the movelist on the new positions (so 3 bitboards), than deriving the info for the Zobrist update might be time consuming. Therefore I also implemented a hash-signature, based upon bitboards (in my case 4 bitboards, as I use whiteman, blackman, whitek...