[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: On game space size
>From Henrik:
If I understood you right, you are testing for board state
validity somehow? Or how do you draw the conclusion that
the probability map is measuring the distribution of legal states?
Validity check:
I picture a go-board as a nxn-matrix.
The values in this matrix can be -1,0 or 1. (black,empty,white)
To validate the boardposition simply check wheter there are any captured stones still on the board. (We do not have to deal with Ko because the board position is legal in itself.)
To search for captured stones one may use a flood-fill technique:
If we want to check wheter there are any 1's in the matrix without liberties we start flooding 0's over all their neighbouring 1's. (leave the -1 alone.) After a few iterations this flooding will end.
If there still are 1's in the matrix those ones have no neighbouring 0's (or they would have been flooded) therefore they are without liberties. So if there still are 1's in the matrix the position is illegal.
(Is this clear ???)
I will prepare an easy to read version of my Matlab program for anyone interested. (After I have removed a just-discoverd bug...)
Pieter