gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

答复: [gnugo-devel] Patch suggest


From: 易野
Subject: 答复: [gnugo-devel] Patch suggest
Date: Fri, 22 Sep 2006 15:35:38 +0800

Hi,

On 9/21/06, George Zhong <address@hidden> wrote:
hi, there, I read out two code bugs from the source of 3.7.10, through I am not sure.
As I do not install CVS, can I put report the way here?

It would be easier to  read if you could generate a "diff", but this is also ok.

1.
reading.c line 2552
 
    if (potential_move == NO_MOVE
 || !is_self_atari(potential_move, other))                     
      continue;
 
    approxlib(potential_move, other, 1, libs2);
amend:
 
    if (potential_move == NO_MOVE
 || is_self_atari(potential_move, other))                     
      continue;
 
    /* do not consider the move self atari, and it may return not liberty in 'libs2' */
    approxlib(potential_move, other, 1, libs2);

Actually, the point of this routine is to generate sacrifice moves that cause a shortage of liberty, so we DO want self-ataris here.
 
I work out the problem, to avoid the illegal move, Ko should be considered. Following amend is a simplified solution:
 
    if (potential_move == NO_MOVE || is_ko(potential_move, other, NULL)
    || !is_self_atari(potential_move, other))
      continue;
 
Zhong
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]