Author: Patrick N
Date: 09:44:12 09/29/03
Go up one level in this thread
On September 29, 2003 at 12:35:01, Gian-Carlo Pascutto wrote: >On September 29, 2003 at 12:32:53, Patrick N wrote: > >>On September 29, 2003 at 11:54:55, Gian-Carlo Pascutto wrote: >> >>>On September 29, 2003 at 11:49:20, Edward Seid wrote: >>> >>>> score = -AlphaBeta(deep - 1, -beta, -alpha) >>> >>>[...] >>> >>>> ' The following lines are what I need feedback on... are they correct? >>>> If alpha >= beta Then >>>> Return alpha >>>> End If >>>> If score > alpha Then >>>> alpha = score >>>> End If >>> >>>Reverse them. >>> >>>E.g. >>> >>>if score > alpha then alpha = score; >>>if alpha > beta then return alpha; >>> >>>-- >>>GCP >> >>I agree with reversing them, but you also want the second line to read: >>if alpha > beta then return beta; >> >>This way if the score exceeds beta (fail high) you return beta >>-Patrick > >No. > >There is no need whatsoever to return beta there. > >-- >GCP You are right. Depends on if you are doing fail-hard or or fail-soft. If you return beta, you are doing fail-hard. With alpha, fail-soft. I find fail-hard to be easier to understand. I like to know that my search is going to return a value that is somewhere between alpha and beta. :) -Patrick
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.