Ticket #44 (new defect)
Problem with tactical defenses in do_owl_defend()
| Reported by: | nando | Owned by: | gnugo |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.8 |
| Component: | source | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | patch: | no |
Description
The starting position (from trevorc:940)














































































The context is the OWL attack of E2. In some variation (W:G1 B:E3 W:E4 B:F1 W:F3), the reading gets to this position:














































































at which point current CVS only tries B:G1 and fails to find a defense. Note: the goal at this point is composed of 3 stones, the E3 string and the F1 ko stone.
In one of my current experiments though, the OWL code does find B:D1 as a "tactical_defense" and I had a hard time figuring out why there was a difference.
Starting at line 2578 of owl.c, there's a piece of code which looks strange to me. The problem is that the owl->goal array is filled with 1's and 2's. And I believe that occasionally, empty intersections where there was a or some goal stones (which got captured) may also still be marked in the goal array.
Is this a bug or a feature ? What was exactly intended here ? I would change for
goalcount += (owl->goal[k] > 0 && board[k] == color);
but I could be missing something (wouldn't be the first time)
