1 #ifndef ZZGO_TACTICS_SELFATARI_H
2 #define ZZGO_TACTICS_SELFATARI_H
4 /* A fairly reliable elf-atari detector. */
9 /* Check if this move is undesirable self-atari (resulting group would have
10 * only single liberty and not capture anything; ko is allowed); we mostly
11 * want to avoid these moves. The function actually does a rather elaborate
12 * tactical check, allowing self-atari moves that are nakade, eye falsification
14 static bool is_bad_selfatari(struct board
*b
, enum stone color
, coord_t to
);
17 bool is_bad_selfatari_slow(struct board
*b
, enum stone color
, coord_t to
);
19 is_bad_selfatari(struct board
*b
, enum stone color
, coord_t to
)
21 /* More than one immediate liberty, thumbs up! */
22 if (immediate_liberty_count(b
, to
) > 1)
25 return is_bad_selfatari_slow(b
, color
, to
);