[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] Superko and suicide
From: |
Gunnar Farnebäck |
Subject: |
[gnugo-devel] Superko and suicide |
Date: |
Sun, 30 Apr 2006 21:09:49 +0200 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI) |
Prompted by the use of New Zealand rules in the Computer Olympiad I
have at long last implemented superko detection and working suicide
options. See tickets #132 and #134 at http://trac.gnugo.org/gnugo for
more information and the patch.
After the patch there are four different ko rule options
--simple-ko, only forbid immediate recapture of a normal ko (default),
--no-ko, allow any kind of board repetition,
--positional-superko, forbid repetition of a previous position,
--situational-superko, forbid repetition of a previous position with
the same player to move,
and three different suicide options
--forbid-suicide, all suicide moves forbidden (default),
--allow-suicide, allow suicide but not of single stones,
--allow-all-suicide, allow all suicide moves.
GNU Go itself still won't generate suicide moves, neither will it
recapture a simple ko with --no-ko. It may play superko repetitions
when such rules are not used, however.
Summary of changes:
- new static functions really_do_trymove() and is_superko_violation()
in board.c
- store board hashes in the move history
- is_legal() does no longer depend on allow_suicide
- new function is_allowed_move() to determine legality with respect to
current suicide and ko rules
- new global variables suicide_rule and ko_rule
- replace illegal moves with passes near the end of do_genmove()
- reevaluate_ko_threats() revised
- look for ko threats also if best move is a superko violation,
assuming superko rules are used
- new suicide options --forbid-suicide (default) and
--allow-all-suicide, in addition to the earlier --allow-suicide
- new ko rule options --simple-ko (default), --no-ko,
positional-superko, and --situational-superko
- use is_allowed_move() instead of is_legal() in play_gtp.c,
play_ascii.c, and play_solo.c
/Gunnar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] Superko and suicide,
Gunnar Farnebäck <=