From: H.G.Muller Date: Thu, 12 Apr 2018 13:22:04 +0000 (+0200) Subject: Group demotions with non-captures X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a77ab067b85c7477e804ecf1af1cdea23c41400e;p=crazywa.git 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. --- 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?)