gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Pattern VA49


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] Pattern VA49
Date: Sat, 01 Dec 2007 21:05:35 +0100
User-agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071008)

Emanuele Cisbani wrote:
I'm discovering how to "debugging" at patterns-level.

<shell>
$ gnugo.exe --trace -l cisba01.sgf 2>&1 | tail -n 13

Top moves:
1. H5  2.44
2. J10 2.25
3. A1  0.71
4. P5  0.19
5. Q5  0.19
6. F9  0.10
7. N7  0.10
Checking safety of a white move at H5
Move generation likes H5 with value 2.44
genmove() recommends H5 with value 2.44
white (O) move H5

</shell>

Move H5 is clearly wrong.

Indeed.

I'm adding some context for those who haven't looked at the sgf file:

 8 X O O . O O X . X X X X X O X X X O . 8
 7 X X O O O X . X X O O X . O O X X O . 7
 6 . . X O X . X O O O X O O O O O X O . 6
 5 . X . X . X O . O X X X O X . . X O O 5
 4 . . . X X X X O . O X X X X O O O O X 4
 3 X X X O X O O . . O O O X X X O X X X 3
 2 O X O O O . . . . . . O O X . X X . . 2
 1 . O O . . . . . . . . O X X . . . . . 1
   A B C D E F G H J K L M N O P Q R S T

<shell>
$ gnugo.exe --trace -l cisba01.sgf --decide-owl H4
finished examine_position
owl_attack H4
Pattern VA49 found at H5 with value 35
Variation 13: ALIVE (2 or more secure eyes)
H4 cannot be attacked (14 variations)
owl_defend H4
Pattern VA49 found at H5 with value 35
Variation 13: ALIVE (2 or more secure eyes)
H4 is alive as it stands
</shell>

Can I conclude that pattern VA49 has a bug?

Not at all. As it stands the H4 dragon is perfectly alive and safe, which is exactly what the owl reading says. It's questionable why VA49 is shown in these traces but in this case it's involved in the calculation of the number of eyes for the dragon (where it does a dubious job, but that's an algorithm weakness, not a pattern mistake).

It's first time I try to debug a pattern.
Someone can help me?

The real problem is the line "Checking safety of a white move at H5" above. That is where it should be detected that playing H5 is a blunder.

I'm afraid it's difficult to find out what's going wrong there without single-stepping the code, starting with the call to blunder_size() in engine/utils.c.

My guess is that it's not detected as a tactical blunder because H5 can reach a sufficient number of liberties (5) and it's not detected as an atari_atari blunder because after W H5 - B H3 - W J4 - B G2 - W F2 black needs to play J2 which is not found as a tactical attack move on H5. Finally it's not detected as an owl blunder because the connectivity would need to be reconsidered. If my guess is correct the best fix is to recompute dragons in detect_owl_blunder(). I believe we have sufficient infrastructure for this, but it would require quite a bit of familiarity with the code to implement it.

/Gunnar




reply via email to

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