Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genboard #347

Merged
merged 6 commits into from
Nov 13, 2020
Merged

Genboard #347

merged 6 commits into from
Nov 13, 2020

Conversation

lightvector
Copy link
Owner

@lightvector lightvector commented Nov 12, 2020

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.

@lightvector lightvector merged commit 78cafee into master Nov 13, 2020
@lightvector lightvector deleted the genboard branch December 22, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant