Author: milix
Date: 09:38:07 01/24/04
Go up one level in this thread
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....
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.