| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In the tactical reading code in ‘reading.c’, the code generating the moves which are tried are all hand coded in C, for efficiency. There is much to be said for another type of reading, in which the moves to be tried are generated from a pattern database.
GNU Go does three main types of pattern based reading. First, there is the OWL code (Optics with Limit Negotiation) which attempts to read out to a point where the code in ‘engine/optics.c’ (see section Eyes and Half Eyes) can be used to evaluate it. Like the tactical reading code, a persistent cache is employed to maintain some of the owl data from move to move. This is an essential speedup without which GNU Go would play too slowly.
Secondly, there is the ‘engine/combination.c’ which attempts to find combinations—situations where a series of threats eventually culminates in one that cannot be parried.
Finally there is the semeai module. A semeai is
a capturing race between two adjacent DEAD or CRITICAL
dragons of opposite colors. The principal function,
owl_analyze_semeai() is contained in ‘owl.c’.
Due to the complex nature of semeais, the results of
this function are more frequently wrong than the usual
owl code.
| 12.1 The Owl Code | Life and death reading | |
| 12.2 Combination reading | Combinations |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The life and death code in ‘optics.c’, described elsewhere (see section Eyes and Half Eyes), works reasonably well as long as the position is in a terminal position, which we define to be one where there are no moves left which can expand the eye space, or limit it. In situations where the dragon is surrounded, yet has room to thrash around a bit making eyes, a simple application of the graph-based analysis will not work. Instead, a bit of reading is needed to reach a terminal position.
The defender tries to expand his eyespace, the attacker to limit it, and when neither finds an effective move, the position is evaluated. We call this type of life and death reading Optics With Limit-negotiation (OWL). The module which implements it is