Perft calculation got my interest and I ask:
Is it number of possible positions AFTER x plies? Or UNTIL x plies? Is it
counting DIFFERENT positions or ALL positions? Or is it may be actually counting different GAMES?
thanks Jouni
What is perft(x) exactly meaning?
Moderators: hgm, Rebel, chrisw
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: What is perft(x) exactly meaning?
Perft(n) is the number of different move paths of exactly length N from the given position, usually the initial array position.
-
- Posts: 27808
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: What is perft(x) exactly meaning?
It counts different games of exactly x plies. So if you are checkmated in less than x plies it does not count. But repdraws are ignored.
-
- Posts: 718
- Joined: Fri Mar 20, 2009 8:59 pm
Re: What is perft(x) exactly meaning?
for the initial position:
perft(0) == 1 (the root node)
perft(1) == 20 (20 legal moves from the initial position)
perft(2) == 400 (20 legal responses for each of the 20 legal moves)
etc.
Note node count is different than perft numbers. You'd expect the node count for perft(2) to be 421 due to 21 internal nodes.
The mates thing threw me off originally.
1. f4 e6
2. g4 Qh4#
Shows up in perft(4) but in perft(5)
The "correct" perft numbers can be found here
If you remove transpositions, it'd look more like this
There's a bunch of cross-referenced sequences related to chess there, though they're mostly just fun for curiosity's sake.
perft(0) == 1 (the root node)
perft(1) == 20 (20 legal moves from the initial position)
perft(2) == 400 (20 legal responses for each of the 20 legal moves)
etc.
Note node count is different than perft numbers. You'd expect the node count for perft(2) to be 421 due to 21 internal nodes.
The mates thing threw me off originally.
1. f4 e6
2. g4 Qh4#
Shows up in perft(4) but in perft(5)
The "correct" perft numbers can be found here
If you remove transpositions, it'd look more like this
There's a bunch of cross-referenced sequences related to chess there, though they're mostly just fun for curiosity's sake.
-
- Posts: 3245
- Joined: Thu Mar 09, 2006 9:10 am
Re: What is perft(x) exactly meaning?
It is the total number of legal moves at ply x, if all legal paths to ply x are considered.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
http://www.chess.hylogic.de
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: What is perft(x) exactly meaning?
It counts every node for a search to depth (n), counting each interior and tip node that is reached. It is not "iterative" so perft(5) does not include perft(1) through perft(4) nodes...Jouni wrote:Perft calculation got my interest and I ask:
Is it number of possible positions AFTER x plies? Or UNTIL x plies? Is it
counting DIFFERENT positions or ALL positions? Or is it may be actually counting different GAMES?
thanks Jouni
-
- Posts: 718
- Joined: Fri Mar 20, 2009 8:59 pm
Re: What is perft(x) exactly meaning?
Wat? Crafty does not count interior nodes in perft, only tips. perft(2) shows 400, not 421...