gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Re: how to specify constraints inside pattern?


From: Evan Berggren Daniel
Subject: Re: [gnugo-devel] Re: how to specify constraints inside pattern?
Date: Fri, 4 Apr 2003 18:11:25 -0500 (EST)

On Fri, 4 Apr 2003, kevin yong wrote:

> Hi, Evan:
>
>   please give me some help to understand how the
> pattern works:
>
>
> >From patterns.texi:
>
> To give a simple example we consider a connection
> pattern:
>
> Pattern Conn311
>
> O*.
> ?XO
>
> :8,C,NULL
>
> O*a
> ?BO
>
> ;oplay_attack_either(*,a,a,B)

oplay_attack_either is a psuedofunction.  What it means is, play moves
starting with o and alternating colors, at the points specified in the
parameter list, not including the last two parameters.  Then, check
whether either of the last two parameters can be attacked.

the 'o' at the front means start with o playing the first stone.
attack_either takes two parameters, so that means all but the last two
relate to the oplay part of the function.  * and a are the places for the
two moves to go -- O move at *, X move at a.  The fact that it is X trying
to attack is deduced from the fact that a and B are O strings.

>
> Here we have given the label ?a? to the empty spot to
> the right of the considered move and the label ?B? to
> the ?X? stone in the pattern.
>
> In this example we have a reading constraint which
> should be interpreted as:
>
> "Play an ?O? stone at ?*? followed by an ?X? stone at
> ?a?. Accept the pattern if ?O? now can capture either
> at ?a? or at ?B? (or both strings)."
>
>
> Now let me try to interprete original pattern D301:
>
> Pattern D301
>
> X..?
> O.*.
> O..?
>
> :8,Eb,value(80)
>
> X..?
> O.*a
> O..?
>
> ;owl_escape_value(a) > 1
>
> my interpretation:
> O move at *, then check owl_escape_value about ?a? >
> 1. Here, we don?t mean X next move at ?a?, do we?

There are no moves invloved here.  There is an array of owl escape values
for every point on the board, which has already been computed when the
pattern gets matched.  What is meant is, look up the escape value
corresponding to 'a', and make sure it is greater than 0.  Logically, make
sure there is something friendly to run towards.

>
>
> Now, try to interprete the modification we try to put
> on D301:
>
> Pattern D301
>
> X..?
> O.*.
> O..?
>
> :8,Eb,value(80)
>
> X..?
> B.*a
> B..?
>
> ;owl_escape_value(a) > 1 && !oplay_attack(*,B)
>
> my interpretation:
> ?O? move at ?*?, then oplay_attack on ?B?, and it must
> NOT success.

This means:

first, check whether we can escape in that direction.  If so, then try an
O move at *; if the string B can be attacked, the pattern does not match.

>
> Should it be xplay_attack on ?B?? I tried:
>
> ;owl_escape_value(a) > 1 && !xplay_attack(*,B)

That is incorrect.  That would mean try an X move at *, and then try
attacking the B string, and match only if that fails.

>
> but the pattern still got matched.
>
> What we want to check here is: O move at *, then let X
> attack ?B? to see if success. If no, accept pattern.
> Then for this specific case 13x13:6, X attack on ?B?
> string will be success, because ?B? strings don?t have
> enough liberties. Then pattern should be rejected for
> 13x13:6.
>
> So, I still don?t think I have understand this fully
> yet.

That is the correct interpretation.  After the change, the pattern should
not match; are you sure it is still this pattern matching and not some
other pattern?  If you use the sgf traces, owl will tell you which pattern
suggested the move.

Evan Daniel




reply via email to

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