qsearch question

Code, algorithms, languages, construction...
Post Reply
nak3c
Posts: 12
Joined: Sun Jan 06, 2013 7:45 pm

qsearch question

Post by nak3c » Mon Aug 19, 2013 3:28 pm

quick questions about q-search. I have been studying the code of TSCP and winglet and there is part of the q-searching algorithm I cant get my head around. So qsearch is called when you reach a specified depth in alphabeta; the goal is of course to look for a quiet position because if you're in the middle of a capture sequence the evaluation function will greatly favor one side and get cut off, when in fact it could be a good variation. now qsearch usually just calls a capture generator which helps complete those capturing sequences that were left incomplete by alpha-beta. What I dont understand is that TSCP and winglet check the evaluation at EVERY node in quiescence and return if the eval is > beta. something like

x = eval()
if (x>= beta) return beta;
if (x> alpha) alpha = x;

is preformed at every node in TSCP, but wont this just beta cut in the middle of any capturing sequence that favors the side to move? that would be precisly what quiescent is intended to avoid. Thanks for help, Nick

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: qsearch question

Post by hyatt » Mon Aug 19, 2013 7:38 pm

The purpose of q-search is to (a) establish alpha (lower bound, AKA standpat score), and then (b) see if any capture can improve on that value. Any capture that is worse than the stand-pat score is ignored.

It works exactly as you suggest, but it NEVER wants to find "worse" results than what would happen if it just simply "stands pat and does not make a move at all."

Lasse Hansen
Posts: 6
Joined: Mon Aug 19, 2013 7:32 pm
Real Name: Lasse Hansen

Re: qsearch question

Post by Lasse Hansen » Mon Aug 19, 2013 7:40 pm

The point with the beta cutoff using eval score is that a capture sequence may (normally) be abrupted, so if the side to move chooses a non-capture the (eval) score of the position will probably be above beta. I believe this is called stand-pat.

Regards, Lasse

Post Reply