[Computer-go] CNN with 54% prediction on KGS 6d+ data

Detlef Schmicker ds2 at physik.de
Tue Dec 8 07:13:42 PST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

as somebody ask I will offer my actual CNN for testing.

It has 54% prediction on KGS 6d+ data (which I thought would be state
of the art when I started training, but it is not anymore:).

it has:
1
2
3
> 4 libs playing color
1
2
3
> 4 libs opponent color
Empty points
last move
second last move
third last move
forth last move

input layers, and it is fully convolutional, so with just editing the
golast19.prototxt file you can use it for 13x13 as well, as I did on
last sunday. It was used in November tournament as well.

You can find it
http://physik.de/CNNlast.tar.gz



If you try here some points I like to get discussion:

- - it seems to me, that the playouts get much more important with such
a strong move prediction. Often the move prediction seems better the
playouts (I use 8000 at the moment against pachi 32000 with about 70%
winrate on 19x19, but with an extremely focused progressive widening
(a=400, a=20 was usual).

- - live and death becomes worse. My interpretation is, that the strong
CNN does not play moves, which obviously do not help to get a group
life, but would help the playouts to recognize the group is dead.
(http://physik.de/example.sgf top black group was with weaker move
prediction read very dead, with good CNN it was 30% alive or so :(


OK, hope you try it, as you know our engine oakfoam is open source :)
We just merged all the CNN stuff into the main branch!
https://bitbucket.org/francoisvn/oakfoam/wiki/Home
http://oakfoam.com


Do the very best with the CNN

Detlef




code:
if (col==Go::BLACK) {
	  for (int j=0;j<size;j++)
	    for (int k=0;k<size;k++)
		  {
        for (int l=0;l<caffe_test_net_input_dim;l++)
data[l*size*size+size*j+k]=0;
        //fprintf(stderr,"%d %d %d\n",i,j,k);
        int pos=Go::Position::xy2pos(j,k,size);
        int libs=0;
        if (board->inGroup(pos))
libs=board->getGroup(pos)->numRealLibs()-1;
        if (libs>3) libs=3;
        if (board->getColor(pos)==Go::BLACK)
	          {
			  data[(0+libs)*size*size + size*j + k]=1.0;
			  //data[size*size+size*j+k]=0.0;
			  }
	      else if (board->getColor(pos)==Go::WHITE)
		      {
			  //data[j*size+k]=0.0;
			  data[(4+libs)*size*size + size*j + k]=1.0;
			  }
	      else if
(board->getColor(Go::Position::xy2pos(j,k,size))==Go::EMPTY)
	      {
			    data[8*size*size + size*j + k]=1.0;
			  }
	    }
	}
	if (col==Go::WHITE) {
	  for (int j=0;j<size;j++)
	    for (int k=0;k<size;k++)
		  {//fprintf(stderr,"%d %d %d\n",i,j,k);
        for (int l=0;l<caffe_test_net_input_dim;l++)
data[l*size*size+size*j+k]=0;
        //fprintf(stderr,"%d %d %d\n",i,j,k);
        int pos=Go::Position::xy2pos(j,k,size);
        int libs=0;
        if (board->inGroup(pos))
libs=board->getGroup(pos)->numRealLibs()-1;
        if (libs>3) libs=3;
        if (board->getColor(pos)==Go::BLACK)
	          {
			  data[(4+libs)*size*size + size*j + k]=1.0;
			  //data[size*size+size*j+k]=0.0;
			  }
	      else if (board->getColor(pos)==Go::WHITE)
		      {
			  //data[j*size+k]=0.0;
			  data[(0+libs)*size*size + size*j + k]=1.0;
			  }
	      else if (board->getColor(pos)==Go::EMPTY)
	      {
			    data[8*size*size + size*j + k]=1.0;
			  }
    }
	}
if (caffe_test_net_input_dim > 9) {
  if (board->getLastMove().isNormal()) {
    int j=Go::Position::pos2x(board->getLastMove().getPosition(),size);
    int k=Go::Position::pos2y(board->getLastMove().getPosition(),size);
    data[9*size*size+size*j+k]=1.0;
  }
  if (board->getSecondLastMove().isNormal()) {
    int
j=Go::Position::pos2x(board->getSecondLastMove().getPosition(),size);
    int
k=Go::Position::pos2y(board->getSecondLastMove().getPosition(),size);
    data[10*size*size+size*j+k]=1.0;
  }
  if (board->getThirdLastMove().isNormal()) {
    int
j=Go::Position::pos2x(board->getThirdLastMove().getPosition(),size);
    int
k=Go::Position::pos2y(board->getThirdLastMove().getPosition(),size);
    data[11*size*size+size*j+k]=1.0;
  }
  if (board->getForthLastMove().isNormal()) {
    int
j=Go::Position::pos2x(board->getForthLastMove().getPosition(),size);
    int
k=Go::Position::pos2y(board->getForthLastMove().getPosition(),size);
    data[12*size*size+size*j+k]=1.0;
  }
}

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJWZvOlAAoJEInWdHg+Znf4t8cP/2a9fE7rVb3Hz9wvdMkvVkFS
4Y3AomVx8i56jexVyXuzKihfizVRM7x6lBiwjYBhj4Rm9UFWjj2ZvDzBGCm3Sy4I
SpG8D01VnzVR6iC1YTu3ecv9Wo4pTjc7NL5pAxiZDB0V7OTRklfZAYsX4mWyHygn
cr1pIb79/9QfBf/johmuutXJIwYfVG9ShR1+udbxs3aU3QDAbJJ4eTs8oj+NqFpg
JolEEEg3wY693e77SqbUbjxR3kSsysoz9h1nKnR/ZjHByqlwNvSz9ho9eU0rKhaK
GSQ22/c1VPIZhr24FYBbYNYweOzDtonLpuUFCPSnYVels3h/I/LlqV3MeDo6wuZ2
QCPp5+11o4JzvEt7A4zfJCtEOEH0W2/+IjRcIkAVOo65OV/pPsz2EjHehMU6PC6m
vXA/kPx0jqUm1qSb0qCgMq5ZvSqfpcCY7JOlkEwkDBS1fty9sU0hqst3zXR0KGtn
rFuoREmQYi/mkjZfS2Q4AHiZUDbDZUKzRegUA+gR/eKAmJsmWeTDEI9ZAXgxL0cB
p1HGBNDEUKGk+ruq0gIe5vYygyBcJV0BbbBnweDjeZnlG8vLUAVoMF6V/q3gkZb1
P61rfE4d9dohfGBsZ+UWltRyWMj09ieR2G2zCDpIXyxEuoV6CTAlLzDuhmqFa2ma
Fp3lK/uLhOucXwBtStdx
=E47K
-----END PGP SIGNATURE-----



More information about the Computer-go mailing list