Author: Dan Newman
Date: 02:10:33 02/03/01
Go up one level in this thread
On February 02, 2001 at 07:18:07, Severi Salminen wrote: >>MY CAPTURE GENERATION ALSO CREATES MOVE BITBOARDS AT THE EXPENSE OF A FEW >>MACHINE INSTRUCTIONS. I SAVE THESE MOVE BITBOARDS SO THAT GENMOVES DOES NOT >>HAVE TO RE-CREATE THEM. MY MOVE GENERATION AMOUNTS TO EXTRACTING THE MOVES FROM >>THE BITBOARD. > >You'd go faster if your capture generation would _not_ create move bitboards at >all. Remember: in true search you generate captures maybe 100x times than >non_captures. > In my program I've measured (on WAC again) about 10 times as many calls to generate_captures() as to genereate_non_captures(). But even with the factor of 10 rather than 100, it is still probably a win to do as little of the non-capture work as you can in generate_captures(). In fact, if you do something to speed up the capture generator that slows down the non-capture generator, it may well be worth it. The last time I profiled my 0x88 program I found the capture generator used 17.5% of the cpu time and the non-capture 2.2%... >>ALMOST 15,000,000 MPS ON A Pentium III 550Mhz xeon processor. >>THE NEXT TEST DOES GENCAPS AND GENMOVES IN THE SAME FOR LOOP. ZERO CAPTURES ARE >>GENERATED WHICH SLOWS THE MOVE GENERATION DOWN BY ABOUT 4 MILLION MPS. > >This is what Crafty's perf does. It generates _both_ captures and non_captures. >So your 11,000,000 is the right figure to compare. > >>[D]8/8/pppppppK/NBBR1NRp/nbbrqnrP/PPPPPPPk/8/Q7 w >> >>I USED THE BOARD POSITION ABOVE (WHICH SOMEONE POSTED A FEW MONTHS AGO) WHICH >>WAS DESCRIBED AS HIGH-CAPTURES, MATE-IN-ONE, AND RAN THE PERFORMANCE TEST >>AGAIN... > >Good position. I'll test this also. This will measure the speed of actually >saving the moves to a list for later use. > >>Bitboard Capture Generations Made= 65,000,000 >>Bitboard Capture Generations Per Second= 16,573,177 >> >>Bitboard Move Generations After CapGens Made= 22,000,000 >>Bitboard Move Generations After CapGens Per Second= 10,669,253 >> >>Bitboard Capture/Move Generations Made= 87,000,000 >>Bitboard Capture/Move Generations Per Second= 19,133,495 > >This shows that you are doing too much in gen_captures() and too little in >gen_non_captures() as your combined number is better than the captures-only >number - it should be vice versa. Try to remove the non_capture parts in your >gen_captures() and move them to the gen_non_captures() function - even if you >had to do something twice (btw, what is it?). And if possible post the results. >You might go a lot faster. I think we may start a new thread as this is starting >to disappear from the board soon... > >Severi You do end up doing some things twice: looping constructs mainly I think. In 0x88 you end up looping through the piece list and scanning the board for each piece twice. With bitboards you end up extracting piece from-square coordinates and doing some table lookups twice. But I suspect it's worth it in both cases. -Dan.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.