Genboard by lightvector · Pull Request #347 · lightvector/KataGo

Adds some scripts that allow training a neural net so that when given a partial section of a 19x19 board, can "plausibly" fill in the rest of the board. A pretrained 10 block 128 channel neural net with alternating global pooling is provided here. The net is ONLY trained on single rectangular known sections, so there is no guarantee about what it does if given known regions of other shapes.
genboard10.zip

Usage looks like:

python3 genboard_run.py \
       -model THE_MODEL_FILE.data \
       -board '
?????????????...???/
?????????????.o.???/
?????????????..o???/
?????????????..o???/
?????????????..o???/
?????????????..o???/
?????????????...???/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
???????????????????/
' \
       -turn 15 \
       -turnstdev 0 \
       -source -1 \
       -n 2 \
       -batchsize 5
  • Turn tells the neural net APPROXIMATELY what turn number to target.
  • Turn stdev makes the neural net try to randomize turn by that standard deviation.
  • Source tells the neural net to try to mimic different sources of training data, for the pretrained neural net, -1 is Fox, 0 is GoGod, and 1 is KGS. I don't know if the neural net has actually picked up on any persistent differences between these three data sources, but in theory if there are consistent differences between them, then source tells the net which one to mimic.

The net doesn't seem to always be the best - sometimes it will put stones on the board with 0 liberties, for example. It might also not obey the constraint that both players have played the same number of moves (or black 1 more), because this is a global thing that may understandably be hard for a neural net to do. But it typically generates very Go-like patterns, particularly in the opening.