@@ -46,7 +46,7 @@ int MyCut(typePos* Position, int value, int depth)
4646 int height , move , i , singular ;
4747 TransDeclare ();
4848 int trans_depth , move_depth = 0 , trans_move = 0 , Value , cnt ;
49- int v , extend , new_depth , move_is_check ;
49+ int v , extend , new_depth , half_depth , near_half_depth , move_is_check ;
5050 typeNext NextMove [1 ];
5151 typeDynamic * Pos0 = Position -> Dyn ;
5252 uint64 zob = Position -> Dyn -> Hash ;
@@ -150,17 +150,20 @@ int MyCut(typePos* Position, int value, int depth)
150150 singular = 0 ;
151151 if (depth >= MinTransMoveDepth && trans_move && MyOK (Position , trans_move ))
152152 {
153- v = MyExclude (Position , value - depth , depth - DepthRed , trans_move & 0x7fff );
153+ half_depth = depth >> 1 ;
154+ near_half_depth = depth - (MIN (12 , half_depth ));
155+ v = MyExclude (Position , value - depth , near_half_depth , trans_move & 0x7fff );
154156 CheckHalt ();
155157 if (v < value - depth )
156158 {
157159 singular ++ ;
158160 height = Height (Position );
159161 if (height << 2 <= depth )
160162 singular ++ ;
161- v = MyExclude (Position , value - ValueRed , depth - DepthRed , trans_move & 0x7fff );
163+
164+ v = MyExclude (Position , value - half_depth , near_half_depth , trans_move & 0x7fff );
162165 CheckHalt ();
163- if (v < value - ValueRed )
166+ if (v < value - half_depth )
164167 {
165168 singular ++ ;
166169 if (height << 3 <= depth )
@@ -295,10 +298,10 @@ int MyCut(typePos* Position, int value, int depth)
295298 HashUpperCut (Position , depth , v );
296299 return (v );
297300 }
298- int MyCutCheck (typePos * Position , int value , int depth )
301+ int MyCutCheck (typePos * Position , int value , int depth )
299302 {
300303 int height , move , cnt , Reduction , extend ;
301- int trans_depth , move_depth = 0 , trans_move = 0 , Value , new_depth , v , i ;
304+ int trans_depth , move_depth = 0 , trans_move = 0 , Value , new_depth , near_half_depth , v , i ;
302305 TransDeclare ();
303306 typeMoveList List [256 ], * list , * p , * q ;
304307 uint64 zob = Position -> Dyn -> Hash ;
@@ -363,15 +366,16 @@ int MyCutCheck(typePos * Position, int value, int depth)
363366 singular = 0 ;
364367 if (depth >= MinTransMoveDepth && trans_move )
365368 {
366- v = MyExcludeCheck (Position , value - depth , depth - DepthRed , trans_move & 0x7fff );
369+ near_half_depth = depth - (MIN (12 , depth >> 1 ));
370+ v = MyExcludeCheck (Position , value - depth , near_half_depth , trans_move & 0x7fff );
367371 CheckHalt ();
368372 if (v < value - depth )
369373 {
370374 singular ++ ;
371375 height = Height (Position );
372376 if (height << 2 <= depth )
373377 singular ++ ;
374- v = MyExcludeCheck (Position , value - 2 * depth , depth - DepthRed , trans_move & 0x7fff );
378+ v = MyExcludeCheck (Position , value - 2 * depth , near_half_depth , trans_move & 0x7fff );
375379 CheckHalt ();
376380 if (v < value - 2 * depth )
377381 {
0 commit comments