From a77ab067b85c7477e804ecf1af1cdea23c41400e Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 12 Apr 2018 15:22:04 +0200 Subject: [PATCH] Group demotions with non-captures Promotions in Kyoto Shogi are not moves that deserve to be treated as captures. This would search basically all moves in QS, and would hardly sort any moves by history. Now that demotions are treated as non-captures QS search explosion is much less of a problem. --- dropper.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dropper.c b/dropper.c index ee8bc83..24a1e62 100644 --- a/dropper.c +++ b/dropper.c @@ -941,7 +941,8 @@ MoveGen (int stm, MoveStack *m, int castle) moveStack[slot] = move | from << 8 | to; } if(promote & stm) { // promotion is (also?) possible - moveStack[--m->firstMove] = (move | from << 8 | to + 11) + (vVal[victim-WHITE] + 20 << 24); // put it amongst captures + int slot = (promoDrops && !victim && piece&16 ? moveSP++ : --m->firstMove); // group demotions with non-captures + moveStack[slot] = (move | from << 8 | to + 11) + (vVal[victim-WHITE] + 20 << 24); // put it amongst captures if(!perpLoses) { // only for FIDE Pawns moveStack[--m->firstMove] = move | from << 8 | to - 11 + (stm >> 6)*44; // turn previously-generated deferral into under-promotion // other under-promotions could go here (Capahouse?) -- 1.7.0.4