Re: [Computer-go] 25x25 experiment

2016-06-23 Thread Urban Hafner
On Mon, Apr 27, 2015 at 2:24 PM, Detlef Schmicker  wrote:

> Sorry, it is not,
>
>
> but I offer my trained DCNN http://physik.de/net.tgz
>
> it has about 44% prediction rate and uses only the position
>
> it a a caffe file which is quite easy to use:
>
>

Sorry to reply to a message that that’s over a year old. I just managed to
integrate Caffe with my Go bot which is written in Rust. Unfortunately the
Rust binding doesn’t return the output of the net when I run the forward.
Instead it requires me to find the right blob my name. Looking at the
prototxt file I assumes that the blob would be named softmax, but when I do
that I get an error. That could either mean that I just picked the wrong
blob (could it be ip or ip_zw?) or that getting the blob isn’t even enough
to get at the output.

Does anybody who tried out this net remember what they did to get it to
work? I know it’s a long shot but it would be great if I could get this to
work. Or rather I have this working but I don’t even know if I’m even using
data that does make sense.

Cheers,

Urban


> void Engine::getCNN(Go::Board *board,Go::Color col, float result[])
> {
>   int size=board->getSize();
> float *data;
> data= new float[2*size*size];
> //fprintf(stderr,"2\n");
> if (col==Go::BLACK) {
>   for (int j=0;j for (int k=0;k   {//fprintf(stderr,"%d %d %d\n",i,j,k);
>   if (board->getColor(Go::Position::xy2pos(j,k,size))==Go::BLACK)
>   {
>   data[j*size+k]=1.0;
>   data[size*size+size*j+k]=0.0;
>   }
>   else if
> (board->getColor(Go::Position::xy2pos(j,k,size))==Go::WHITE)
>   {
>   data[j*size+k]=0.0;
>   data[size*size+size*j+k]=1.0;
>   }
>   else
>   {
>   data[j*size+k]=0.0;
>   data[size*size+size*j+k]=0.0;
>   }
> }
> }
> if (col==Go::WHITE) {
>   for (int j=0;j for (int k=0;k   {//fprintf(stderr,"%d %d %d\n",i,j,k);
>   if (board->getColor(Go::Position::xy2pos(j,k,size))==Go::BLACK)
>   {
>   data[j*size+k]=0.0;
>   data[size*size+size*j+k]=1.0;
>   }
>   else if
> (board->getColor(Go::Position::xy2pos(j,k,size))==Go::WHITE)
>   {
>   data[j*size+k]=1.0;
>   data[size*size+size*j+k]=0.0;
>   }
>   else
>   {
>   data[j*size+k]=0.0;
>   data[size*size+size*j+k]=0.0;
>   }
> }
> }
>
>
>   Blob *b=new Blob(1,2,size,size);
>   b->set_cpu_data(data);
>   vector bottom;
>   bottom.push_back(b);
>   const vector& rr = caffe_test_net->Forward(bottom);
>   //for (int j=0;j<19;j++)
> //{
> //for (int k=0;k<19;k++)
> //{
> //fprintf(stderr,"%5.3f ",rr[0]->cpu_data()[j*19+k]);
> //}
> //fprintf(stderr,"\n");
> //}
>   for (int i=0;i   result[i]=rr[0]->cpu_data()[i];
> if (result[i]<0.1) result[i]=0.1;
>   }
>   delete[] data;
>   delete b;
>
> }
>
>
>
> Am 27.04.2015 um 13:44 schrieb Petr Baudis:
>
>> On Mon, Apr 27, 2015 at 12:35:05PM +0200, Detlef Schmicker wrote:
>>
>>> I dont see a reason, why there should be any problems using it with
>>> DNN on 19x19 trained network. If a 25x25 will be sheduled, I will
>>> take part :)
>>>
>> I'm sorry for being unclear!  I actually meant DCNN as a standalone
>> player, not part of MCTS.  Is it possible to run oakfoam's DCNN
>> implementation like that?  (Have you measured its stength?)
>>
>> Thanks,
>>
>> Petr Baudis
>> ___
>> Computer-go mailing list
>> Computer-go@computer-go.org
>> http://computer-go.org/mailman/listinfo/computer-go
>>
>>
> ___
> Computer-go mailing list
> Computer-go@computer-go.org
> http://computer-go.org/mailman/listinfo/computer-go
>



-- 
Blog: http://bettong.net/
Twitter: https://twitter.com/ujh
Homepage: http://www.urbanhafner.com/
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-05-01 Thread Aja Huang
On Wed, Apr 29, 2015 at 5:54 PM, Detlef Schmicker d...@physik.de wrote:

  I did not test 100k playouts, I was lower than 2k playouts in all my
 tests. No I am not sure we are stronger than Fuego, I should run on KGS...
 (possibly after the 19x19 tournament on sunday)
 We won against hirabot (1d if playing with 10k playouts on KGS I think) in
 19x19 slow bot tournament and played about even with aya and pachi in 13x13.


Running your program on KGS sounds a good idea. If you want to compare with
our MCTS + 12-layer CNN, using uniform random playouts and completely
removing your hand-crafted features and rules everywhere in MCTS (except
the features fed into CNN) would be pretty close to our experimental
settings in Section 6. If your program can reach 1.5d-2d on KGS, then you
have a CNN as strong as our 12-layer one.

Aja
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-04-29 Thread Detlef Schmicker
My net should behave very similar to Christopher Clark 
http://arxiv.org/find/cs/1/au:+Clark_C/0/1/0/all/0/1, Amos Storkey 
http://arxiv.org/find/cs/1/au:+Storkey_A/0/1/0/all/0/1, but I will not 
do a standalone player, sorry. I have integrated it into our MC tree 
search...
In our way of integrating the net into MC Christopher Clark 
http://arxiv.org/find/cs/1/au:+Clark_C/0/1/0/all/0/1, Amos Storkey 
http://arxiv.org/find/cs/1/au:+Storkey_A/0/1/0/all/0/1 is 
significantly (60ELO) stronger than your net (I did a net similar to 
yours (not all features, but last move features), with a little  above 
50% prediction rate), therefore I am using the net without last move 
feature.


But it may be, that last move features come from our original gammas 
anyway, which are mixed with CNN values...


Am 28.04.2015 um 18:26 schrieb Aja Huang:


On Mon, Apr 27, 2015 at 2:12 PM, Detlef Schmicker d...@physik.de 
mailto:d...@physik.de wrote:


I did not do any playing tests without MC! On CGOS 13x13 I have
two players (NiceGo) with 50 and 1k playouts running at the moment...


Maybe you can play your CNN of 44% prediction rate on KGS and compare 
it with DCNNigo which is solid KGS 5k at the moment. Our 12-layer CNN 
described in the paper is 600 Elo stronger than GnuGo, about 2k on KGS.


Aja



___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go


___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-04-29 Thread Hiroshi Yamashita
The winrates may depend strongly on the opponent: On CGOS with 1k we 
have quite different winrates against aya_1k and fuego_10k or pachi_10k, 
which are about equal strong there.


I was also very surprised this. Is is simple chemistory?
Why don't you run NiceGo without DCNN, that has similar strength to 
NiceGo210-1k.
I will run pachi and fuego for a while.

http://cgos.boardspace.net/13x13/cross/NiceGo210-1k.html
rating   win/all   winrate
Gnugo-3.7.10-a1  1800138 / 17180.70
mogoRel3_10k 1953 12 /  2352.17
pachi10_Pat_10k  2064  1 /  17 5.88
fuego1604_10k2163  2 /  30 6.67
Aya781c_1k   2192 79 / 24931.73

Hiroshi Yamashita

___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-04-28 Thread Petr Baudis
  Hi!

On Mon, Apr 27, 2015 at 02:24:42PM +0200, Detlef Schmicker wrote:
 but I offer my trained DCNN http://physik.de/net.tgz
 
 it has about 44% prediction rate and uses only the position

  Thanks so much for sharing this!  It's a little too raw for me
personally to spend much time playing with it at this point (now I just
hoped to try to pair it up with other opponents) but maybe others will
make use of it.

Petr Baudis
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

[Computer-go] 25x25 experiment

2015-04-27 Thread Petr Baudis
On Sun, Apr 26, 2015 at 11:26:42PM +0200, Petr Baudis wrote:
 On Sun, Apr 26, 2015 at 12:17:01PM +0200, remi.cou...@free.fr wrote:
  Hi,
  
  I thought it might be fun to have a tournament on a very large board. It 
  might also motivate research into more clever adaptive playouts. Maybe a 
  KGS tournament? What do you think?
 
 That's a cool idea - even though I wonder if 39x39 is maybe too extreme
 (I guess the motivation is maximum size KGS allows).
 
 I think that actually, GNUGo could become stronger than even the top
 MCTS programs at some point when expanding the board size, but it's hard
 for me to estimate exactly when - if at 25x25 or at 49x49...

I've let play Pachi (in the same configuration that ranks it as 2d on
KGS, but with 15s/move) to play GNUGo for a few games on 25x25 just to
see how it would go.  I'm attaching three SGFs if anyone would like to
take a look, Pachi never had trouble beating GNUGo.

Couple of observations:

(i) The speed is only about 60% playouts in the same time compared
to 19x19.

(ii) GNUGo needs to be recompiled to work on larger boards, modify
the MAX_BOARD #define in engine/board.h.  (Same with Pachi.)

(iii) As-is, Pachi might get into stack overflow trouble if ran on
larger boards than 25x25.

(iv) 25x25 is the last board size where columns can be represented by
single English alphabet letters.  This is the reason for the GTP
limitation, but might trigger other limitations in debug routines etc.

(v) The very first game (not included), Pachi lost completely.
I discovered that my max playout length was 600 moves; bumping that
to 1200 made things boring again.

(vi) Some typically fast operations take much longer on large boards,
e.g. tree pruning (because much wider tree breadth; on 19x19 it's
rarely more than 100ms but it can take seconds on 25x25 for some
reason); this would actually make Pachi occassionally lose byoyomi
periods by a second or two without a manual time allocation adjustment.

And a conjencture:

(vii) (Even) games against GNUGo still aren't interesting on 25x25.
The same factors that might benefit GNUGo compared to MCTS programs
should also benefit DNN players and the difference might be more
visible because a DNN should be much stronger than GNUGo.  I wonder
if the oakfoam or any other effort on building an open source DNN
implementation can already play standalone games and how well it works?

-- 
Petr Baudis
If you do not work on an important problem, it's unlikely
you'll do important work.  -- R. Hamming
http://www.cs.virginia.edu/~robins/YouAndYourResearch.html


z3-0.sgf
Description: application/go-sgf


z4-0.sgf
Description: application/go-sgf


z5-0.sgf
Description: application/go-sgf
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-04-27 Thread Detlef Schmicker
oakfoam has BOARDSIZE_MAX set to 25, but it seems it is only used to say 
unsupported board size at the moment :)
I think the reason was gtp, but it was set long before I joined the 
project 



I dont see a reason, why there should be any problems using it with DNN 
on 19x19 trained network. If a 25x25 will be sheduled, I will take part :)



Detlef


Am 27.04.2015 um 12:00 schrieb Petr Baudis:

On Sun, Apr 26, 2015 at 11:26:42PM +0200, Petr Baudis wrote:

On Sun, Apr 26, 2015 at 12:17:01PM +0200, remi.cou...@free.fr wrote:

Hi,

I thought it might be fun to have a tournament on a very large board. It might 
also motivate research into more clever adaptive playouts. Maybe a KGS 
tournament? What do you think?

That's a cool idea - even though I wonder if 39x39 is maybe too extreme
(I guess the motivation is maximum size KGS allows).

I think that actually, GNUGo could become stronger than even the top
MCTS programs at some point when expanding the board size, but it's hard
for me to estimate exactly when - if at 25x25 or at 49x49...

I've let play Pachi (in the same configuration that ranks it as 2d on
KGS, but with 15s/move) to play GNUGo for a few games on 25x25 just to
see how it would go.  I'm attaching three SGFs if anyone would like to
take a look, Pachi never had trouble beating GNUGo.

Couple of observations:

(i) The speed is only about 60% playouts in the same time compared
to 19x19.

(ii) GNUGo needs to be recompiled to work on larger boards, modify
the MAX_BOARD #define in engine/board.h.  (Same with Pachi.)

(iii) As-is, Pachi might get into stack overflow trouble if ran on
larger boards than 25x25.

(iv) 25x25 is the last board size where columns can be represented by
single English alphabet letters.  This is the reason for the GTP
limitation, but might trigger other limitations in debug routines etc.

(v) The very first game (not included), Pachi lost completely.
I discovered that my max playout length was 600 moves; bumping that
to 1200 made things boring again.

(vi) Some typically fast operations take much longer on large boards,
e.g. tree pruning (because much wider tree breadth; on 19x19 it's
rarely more than 100ms but it can take seconds on 25x25 for some
reason); this would actually make Pachi occassionally lose byoyomi
periods by a second or two without a manual time allocation adjustment.

And a conjencture:

(vii) (Even) games against GNUGo still aren't interesting on 25x25.
The same factors that might benefit GNUGo compared to MCTS programs
should also benefit DNN players and the difference might be more
visible because a DNN should be much stronger than GNUGo.  I wonder
if the oakfoam or any other effort on building an open source DNN
implementation can already play standalone games and how well it works?



___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go


___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-04-27 Thread Detlef Schmicker

Sorry, it is not,


but I offer my trained DCNN http://physik.de/net.tgz

it has about 44% prediction rate and uses only the position

it a a caffe file which is quite easy to use:

void Engine::getCNN(Go::Board *board,Go::Color col, float result[])
{
  int size=board-getSize();
float *data;
data= new float[2*size*size];
//fprintf(stderr,2\n);
if (col==Go::BLACK) {
  for (int j=0;jsize;j++)
for (int k=0;ksize;k++)
  {//fprintf(stderr,%d %d %d\n,i,j,k);
  if (board-getColor(Go::Position::xy2pos(j,k,size))==Go::BLACK)
  {
  data[j*size+k]=1.0;
  data[size*size+size*j+k]=0.0;
  }
  else if 
(board-getColor(Go::Position::xy2pos(j,k,size))==Go::WHITE)

  {
  data[j*size+k]=0.0;
  data[size*size+size*j+k]=1.0;
  }
  else
  {
  data[j*size+k]=0.0;
  data[size*size+size*j+k]=0.0;
  }
}
}
if (col==Go::WHITE) {
  for (int j=0;jsize;j++)
for (int k=0;ksize;k++)
  {//fprintf(stderr,%d %d %d\n,i,j,k);
  if (board-getColor(Go::Position::xy2pos(j,k,size))==Go::BLACK)
  {
  data[j*size+k]=0.0;
  data[size*size+size*j+k]=1.0;
  }
  else if 
(board-getColor(Go::Position::xy2pos(j,k,size))==Go::WHITE)

  {
  data[j*size+k]=1.0;
  data[size*size+size*j+k]=0.0;
  }
  else
  {
  data[j*size+k]=0.0;
  data[size*size+size*j+k]=0.0;
  }
}
}


  Blobfloat *b=new Blobfloat(1,2,size,size);
  b-set_cpu_data(data);
  vectorBlobfloat* bottom;
  bottom.push_back(b);
  const vectorBlobfloat* rr = caffe_test_net-Forward(bottom);
  //for (int j=0;j19;j++)
//{
//for (int k=0;k19;k++)
//{
//fprintf(stderr,%5.3f ,rr[0]-cpu_data()[j*19+k]);
//}
//fprintf(stderr,\n);
//}
  for (int i=0;isize*size;i++) {
  result[i]=rr[0]-cpu_data()[i];
if (result[i]0.1) result[i]=0.1;
  }
  delete[] data;
  delete b;
}



Am 27.04.2015 um 13:44 schrieb Petr Baudis:

On Mon, Apr 27, 2015 at 12:35:05PM +0200, Detlef Schmicker wrote:

I dont see a reason, why there should be any problems using it with
DNN on 19x19 trained network. If a 25x25 will be sheduled, I will
take part :)

I'm sorry for being unclear!  I actually meant DCNN as a standalone
player, not part of MCTS.  Is it possible to run oakfoam's DCNN
implementation like that?  (Have you measured its stength?)

Thanks,

Petr Baudis
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go



___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] 25x25 experiment

2015-04-27 Thread Petr Baudis
On Mon, Apr 27, 2015 at 12:35:05PM +0200, Detlef Schmicker wrote:
 I dont see a reason, why there should be any problems using it with
 DNN on 19x19 trained network. If a 25x25 will be sheduled, I will
 take part :)

I'm sorry for being unclear!  I actually meant DCNN as a standalone
player, not part of MCTS.  Is it possible to run oakfoam's DCNN
implementation like that?  (Have you measured its stength?)

Thanks,

Petr Baudis
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go