BertTuyt wrote:I assume that this duplicate moves are only possible when the number of killed pieces is greater equal 4.
Yes, and since moves with at least 4 pieces captured are relatively infrequent, it has negligible affect on speed to avoid listing these. If you do store them then your move tables have to be large enough to hold something like 700 - 800 worst case moves. With no redundant moves I think the worst case is less than 128.
-- Ed
This is the highest I can get to on top of my head. There are 18 white kings, each of which can move to 7 squares, so a total of 126 moves. With captures it should be far less. Adding a black piece also reduces the number of available moves.
Last edited by Rein Halbersma on Tue Jan 04, 2011 09:02, edited 1 time in total.
TAILLE wrote:No worry Ed. It is only a misunderstanding of the initial position. I used to list first the men and then the kings. So, I calculated the perft function on the following position :
B:W6,9,10,11,20,21,22,23,30,K31,K33,K37,K41,K42,K43,K44,K46:BK17,K24.
With the good initial position I did not find any discrepancy with your node figures.
This is the highest I can get to on top of my head. There are 18 white kings, each of which can move to 7 squares, so a total of 126 moves. With captures it should be far less. Adding a black piece also reduces the number of available moves.
Just for fun Rein : if there no black pieces that means that it is black to play. The number of possible moves in the position proposed is then 0 !
In the format used by Damy I made the assumption that the number of possible moves is less than 256.
Gérard
This is the highest I can get to on top of my head. There are 18 white kings, each of which can move to 7 squares, so a total of 126 moves. With captures it should be far less. Adding a black piece also reduces the number of available moves.
Just for fun Rein : if there no black pieces that means that it is black to play. The number of possible moves in the position proposed is then 0 !
In the format used by Damy I made the assumption that the number of possible moves is less than 256.
Gérard
Yes, Gérard, I know that the given position is with black to play. It was just meant as an illustration of the maximum number of moves white could have. I also made a small calculation error (there are 16*7 + 2*8=128 moves, I forgot to count the kings on 46 and 5 differently).
So instead take the above position with *white to move*: 16 kings can move to 7 squares and 2 kings (3 and 15) to 6 squares. In total 124 moves. Adding any other pieces will reduce the number of legal moves. But perhaps someone has created a position in which even more moves are legal?
Last edited by Rein Halbersma on Tue Jan 04, 2011 09:03, edited 1 time in total.
Rein Halbersma wrote:[img]http://fmjd.org/dias2/save/12155141766.png[/img]
So instead take the above position with *white to move*: 16 kings can move to 7 squares and 2 kings (3 and 15) to 6 squares. In total 124 moves. Adding any other pieces will reduce the number of legal moves. But perhaps someone has created a position in which even more moves are legal?
Alway for fun Rein :
This position cannot establish the record of 124 moves because this position with white to play is illegal. What was the last bkack move ?
Gérard
Rein Halbersma wrote:<img src="http://fmjd.org/dias2/save/12155141766.png">
So instead take the above position with *white to move*: 16 kings can move to 7 squares and 2 kings (3 and 15) to 6 squares. In total 124 moves. Adding any other pieces will reduce the number of legal moves. But perhaps someone has created a position in which even more moves are legal?
Alway for fun Rein :
This position cannot establish the record of 124 moves because this position with white to play is illegal. What was the last bkack move ?
Gérard
Position after black moved 41-46 (promoting the man to a king): white to move has 14*7+ 2*4 + 5 + 11 = 122 moves. But I guess the next fun question you are going to ask is how could this position be reached from the initial position? I leave that as an excercise for you
The whole point was to show that I agreed with Ed's claim that it is hard to come up with positions that have more than about 128 moves and 122 is the best I can do. So having memory reserved for 256 moves seems overkill.
Last edited by Rein Halbersma on Tue Jan 04, 2011 09:04, edited 1 time in total.
Does your Q6600 show a lot of variation in perft performance the way mine does? I added a command line option to set the process affinity to a particular core, and I found that perft runs almost 50% slower on core 1 than on the other 3. If I don't set the affinity to one of the upper cores then Windows seems to randomly and frequently change the core that perft is running on, thus the inconsistent times. Running on the upper cores the benchmarks are very consistent. I used the functions GetProcessAffinityMask and SetProcessAffinityMask to make this change.
I don't remember my E6700 ever having much of a difference between cores.
Ed, i have now included duplicate-move checking and I now get the same numbers for the initial position.
I run the test several times for Perft(11), and I see little variation:
69.50 sec, 69.37 sec, 69.44 sec, 69.37 sec, 69.45 sec
Bert, your result makes me think there is something wrong with either my processor or motherboard. It seems that any program or thread that uses the first core runs a lot slower than on the other 3. I will ask about this on one of the computer forums and see if anyone else has experienced this. This also means that my parallel search benchmarks are actually better than what I measured. Searching with 4 threads I get a speedup in "time to depth" of not quite 3x, but if all 4 cores were working at the same speed it would be greater than 3x.
BertTuyt wrote:For all friends of this 10x10 miracle world.
In the next diagram, how many man can be captured, and how many really different moves are possible ?