mvanthoor wrote: ↑Tue Apr 14, 2020 10:07 am
Lazy promotions aren't even possible with the current rules of chess. If you delay your promotion and then put the piece down on the next move, you're doing a piece drop. It exists in shogi for example (but I don't know if you can do it with promotions; I don't play shogi). You're changing the game.
I didn't propose changing the rules, just the search algorithm.
I'm afraid you're mixing up between two unrelated shogi concepts. There are non-promotions, and then there are piece drops, although both have limitations w.r.t. "stale" squares, e.g. you cannot drop a pawn onto the last rank, and you must promote one once it gets there.
Why would you split the search in four? You just add each promotion to your move list:
Yes, and then proceed to search those four branches. My idea was to postpone splitting the search until depth-2.
1. The perft state contains a shift variable initialised to 0.
2. Whenever a pawn is promoted, shift increases by 2 (with the pawn entering a state of superposition).
3. Whenever a superimposed piece is moved, shift decreases by 2 (with the piece becoming singular).
4. shift is applied to the leaf count at every depth, including 0.
I hope to publish the code as soon as I weed out the bugs (my perft(7) is now 119,060,320).
leanchess wrote: ↑Wed Apr 15, 2020 5:50 pm
My perft now works as follows.
1. The perft state contains a shift variable initialised to 0.
2. Whenever a pawn is promoted, shift increases by 2 (with the pawn entering a state of superposition).
3. Whenever a superimposed piece is moved, shift decreases by 2 (with the piece becoming singular).
4. shift is applied to the leaf count at every depth, including 0.
I hope to publish the code as soon as I weed out the bugs (my perft(7) is now 119,060,320).
What happens when a king in check by some subset of the possible promotions is trying to move, or a king not in check tries to move into a square attacked by some subset?
leanchess wrote: ↑Wed Apr 15, 2020 5:50 pm3. Whenever a superimposed piece is moved
I still doubt you'll get a correct perft whenever the super-imposed piece gives check or even just limits the available king squares in the opponent's next turn, i.e. before the piece has moved.
Also, you won't notice the problem in perft 7 from the initial position because that's not deep enough to have a promotion. In 7 alternating plies, a white pawn can only get to rank 7. Rank 8 requires perft 9, and the following black king moves even perft 10. The easy way out is to choose a position where promotion isn't that far ahead.
Terje wrote: ↑Wed Apr 15, 2020 6:09 pmWhat happens when a king in check by some subset of the possible promotions is trying to move, or a king not in check tries to move into a square attacked by some subset?
So far, that problem has been hand-waved away, but perft in a suitable position will tell the truth.
Terje wrote: ↑Wed Apr 15, 2020 6:09 pmWhat happens when a king in check by some subset of the possible promotions is trying to move, or a king not in check tries to move into a square attacked by some subset?
Ras wrote: ↑Wed Apr 15, 2020 6:16 pm
I still doubt you'll get a correct perft whenever the super-imposed piece gives check or even just limits the available king squares in the opponent's next turn, i.e. before the piece has moved.
My implementation detects either king captures or depth 0 checks. The former don't apply to superposition, while the latter account for all possible states.
Also, you won't notice the problem in perft 7 from the initial position because that's not deep enough to have a promotion. In 7 alternating plies, a white pawn can only get to rank 7. Rank 8 requires perft 9, and the following black king moves even perft 10. The easy way out is to choose a position where promotion isn't that far ahead.
I'm well aware of that. It just seems pointless to test against advanced positions before SP is 100% correct. I'd really appreciate any suggestions w.r.t those missing leaves.
Terje wrote: ↑Wed Apr 15, 2020 6:09 pmWhat happens when a king in check by some subset of the possible promotions is trying to move, or a king not in check tries to move into a square attacked by some subset?
Ras wrote: ↑Wed Apr 15, 2020 6:16 pm
I still doubt you'll get a correct perft whenever the super-imposed piece gives check or even just limits the available king squares in the opponent's next turn, i.e. before the piece has moved.
My implementation detects either king captures or depth 0 checks. The former don't apply to superposition, while the latter account for all possible states.
Also, you won't notice the problem in perft 7 from the initial position because that's not deep enough to have a promotion. In 7 alternating plies, a white pawn can only get to rank 7. Rank 8 requires perft 9, and the following black king moves even perft 10. The easy way out is to choose a position where promotion isn't that far ahead.
I'm well aware of that. It just seems pointless to test against advanced positions before SP is 100% correct. I'd really appreciate any suggestions w.r.t those missing leaves.
Can you categorize the move types?
Castle moves, capture moves, e.p. capture moves, promotion moves, etc?
I guess that it is a special case move that is causing difficulties.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
has some special positions designed to test different facets of move generation
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.