herzbube / littlego

Little Go. An iOS application that lets you play the game of Go on the iPhone or iPad.
https://littlego.herzbube.ch/
Apache License 2.0
140 stars 54 forks source link

Add superko handling #169

Closed herzbube closed 11 years ago

herzbube commented 11 years ago

Little Go does not currently know about superko rules. Fuego was configured to not use superko rules (issue #171) so that Fuego and Little Go have agreement on the rules.

Little Go should be able to detect superko. In addition, a preference should be added that lets the user enable/disable superko. Superko should be disabled by default.

herzbube commented 11 years ago

The following .sgf file sets the stage for a superko on a 7x7 board. To trigger the superko, black must play B7.

(;SZ[7]KM[6.5]
DT[2013-07-26];B[dd];W[dc];B[gf];W[ed];B[ec];W[eb];B[fc];W[cd];B[de]
;W[cc];B[ef];W[ce];B[bf];W[fb];B[gb];W[fd];B[gd];W[fe];B[ff]
;W[gc];B[ee];W[cf];B[fc];W[ec];B[fa];W[ea];B[ge];W[bg];B[gc]
;W[cg];B[db];W[];B[ga];W[];B[da];W[];B[ag];W[];B[af]
;W[];B[df];W[];B[dg];W[];B[be];W[];B[bd];W[bc];B[ad]
;W[];B[ac];W[ab];B[cb];W[bb];B[ba];W[ca];B[cb];W[];B[da]
;W[];B[aa];W[ca])
herzbube commented 11 years ago

Superko can be easily detected with Zobrist hashing.

herzbube commented 11 years ago

Positional superko

Situational superko

Also see Sensei's Library.