Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Rebel's long checks concept in QS

Author: Uri Blass

Date: 14:37:36 01/24/04

Go up one level in this thread


On January 24, 2004 at 12:38:07, milix wrote:

>Ok, I tried the ideas posted here but no success.
>My new code goes like this:
>
>quiescent(alpha, beta, mate_score, checks_depth)
>{
>   score = full_evaluate()
>   if (score >= beta) return score // or beta, same effect
>   if (score > alpha) alpha = score
>
>   if (side_to_move_is_in_check)
>      generate_legal_moves()
>      if (no_legal_moves) return -mate_score
>      else if (only_one_legal_move) checks_depth = checks_depth + 3
>      else if (only_two_legal_moves) checks_depth = checks_depth + 2
>   else if (checks_depth > 0)
>      generate_good_equal_captures_queenpromotions_and_checks()
>   else generate_good_equal_captures_queenpromotions()
>   sort_the_moves()
>
>   if (checks_depth < 0) checks_depth = 0
>   if (checks_depth > 3) checks_depth = 3
>
>   for each move in the list {
>      make_the_move()
>      score = -quiescent(-beta, -alpha, mate_score-1, checks_depth-1)
>      undo_the_move()
>      if (score >= beta) return score // or beta, same effect
>      if (score > alpha) alpha = score;
>   }
>
>   return alpha
>}
>
>Tried to
>   if (checks_depth <= 0 and score >= beta) return score
>but QS exploded.
>
>Tried Ed's suggestion to call QS with alpha=LOWVALUE (=MATE_SCORE-SOME_MARGINE)
>but failed also.
>
>My main search is a PVS Alpha-Beta and for this test i search only in depth 1. I
>use no extensions, no TT (only a repetion-check wich works ok). My move-list
>sorting algorithm is a SEE which puts checks on the top (for this test).
>I call my main search from root search as
>
>alpha_beta(1, -INFINITY, +INFINITY, MATE_SCORE)
>
>For the test position
>
>FEN "2k4r/ppp5/2p1b1Q1/4q3/3bP3/3B2P1/PPP1N2P/5R1K b - - 0 1"
>
>I got (briefly):
>
>.......
> After QS Score for Bd4xb2 is -1.05
>Trying move Rxh2
>GOING TO QS WITH Rxh2: SIDE TO MOVE IS IN CHECK
>-----------------------------------------------
> QS called with args (-3000000, 1046, 299999, 3)
> Generated moves for White: Kxh2
>  QS move played Kh1xh2
>  QS called with args (-1046, -1034, 299998, 2)
>  Generated moves for Black: Qh8 Bg1 Bxa2 Qxg3 Qh5
>   QS move played Qe5-h8
>   QS called with args (1034, 1046, 299997, 1)
>   Generated moves for White: Qh5 Qh7 Qh6 Kg2
>    QS move played Qg6-h5
>    QS called with args (-1046, -6263, 299996, 0)
>    score=6263
>   score=-1046
>   QS move played Bd4-g1
>......
>and missed the mate.
>
>When I icreased checks_depth by 4 (or 3 points) it again missed the mate.
>
>Finally, it suggests Bd4xb2 in all cases....

1)You cannot expect qsearch to return mate in this position without exploding
the tree.

It is not a mate when all white moves are forced and after Rxh2+ Kxh2 Qh8+ white
has some replies to check.

The mate in 30 that Rebel can find in depth 1 is a different example and all the
defender moves are forced.

I get

depth=3 +99.89 h8h2 h1h2 e5h8 g6h7 h8h7 h2g2 e6h3 g2f3 h7h5 f3f4 h5g4
Nodes: 1918 NPS: 191800
Time: 00:00:00.01

white has some replies even later in the tree after Bh3+

2)Your order of moves is wrong if the only move that you search after Rxh2+ Kxh2
Qh8+ Qh5 is Bg1+ and you should search first capturing the queen(Qxh5+) that is
a good capture.

Uri



This page took 0.01 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.