[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] GTP and Tourney in SmartGo 1.4
Don wrote:
> PIPES do not get you to another computer, but a remote shell does.
>
> Unix was designed specifically to make it easy to use tools together
> in a natural way. That's what I'm talking about. You can use either
> rsh or ssh to do this and it's on virtually every unix system.
Yes, as long as the programs can talk on stdio, other forms of
connections can generally be arranged. So, why not try to do it over
TCP?
Computer 1, controller
koeberg.lysator.liu.se% ./twogtp.pike -w 'tcplisten 5678' -b 'tcplisten 5679'
Computer 2, engine playing white
sulitelma:~/gnugo/gnugo-3.4/interface> mkfifo /tmp/fifo
sulitelma:~/gnugo/gnugo-3.4/interface> ./gnugo --quiet --mode gtp < /tmp/fifo | tcpconnect koeberg.lysator.liu.se 5678 > /tmp/fifo
Computer 3, engine playing black
gunnar@virihaure:~/gnugo/savannah/gnugo/interface$ mkfifo /tmp/fifo
gunnar@virihaure:~/gnugo/savannah/gnugo/interface$ ./gnugo --quiet --mode gtp < /tmp/fifo | tcpconnect koeberg.lysator.liu.se 5679 > /tmp/fifo
Worked just fine. Game record at the end.
Some people may want an explanation of what the above means. On
computer 1 I started one of the twogtp programs. Usually the -w option
would specify a command line to start an engine locally, and likewise
-b. This time I started two tcplisten processes instead, waiting for
TCP connections. In summary an engine connecting to port 5678 will
play white and an engine connecting to port 5679 will play black.
On the other two computers I started GNU Go processes. These I wired
up to the tcpconnect program which in turn connected over TCP to
computer number 1. The "<", ">", and "|" symbols are standard unix
redirection and pipe instructions. The named pipe /tmp/fifo created by
mkfifo is slightly messy but needed to in effect set up a
bidirectional pipe between gnugo and tcpconnect.
Naturally a program which itself knows how to connect over TCP to
another computer could have been used as either of the players without
the need for any supporting programs or a unix shell. Obviously such a
program could be running on any operating system.
/Gunnar
(;
GM[1]FF[4]
SZ[19]HA[0]KM[5.5]
PW[GNU Go 3.4 (random seed 1079400595)]
PB[GNU Go 3.5.4 (random seed 1079397578)]
RU[Japanese]
RE[B+27.5]
;B[pd];W[cp];B[qp];W[oq];B[pn];W[lq];B[pq];W[op];B[qk];W[dc];B[eq];W[dn]
;B[cq];W[bq];B[dp];W[co];B[cr];W[cj];B[ce];W[ed];B[dg];W[pf];B[nd];W[qd]
;B[qc];W[qe];B[rc];W[jc];B[qh];W[nf];B[bc];W[br];B[hq];W[pp];B[qq];W[je]
;B[fg];W[oh];B[gd];W[de];B[cf];W[cd];B[bd];W[lo];B[lc];W[ip];B[iq];W[fn]
;B[ej];W[dl];B[hk];W[jr];B[ir];W[jq];B[ih];W[or];B[pr];W[cs];B[ds];W[bs]
;B[dq];W[ch];B[fe];W[fc];B[gc];W[eb];B[kk];W[lf];B[kf];W[ke];B[kg];W[mi]
;B[ki];W[md];B[mc];W[ld];B[bg];W[gb];B[aj];W[hc];B[bk];W[dj];B[dh];W[bj]
;B[bi];W[ek];B[fj];W[bm];B[kb];W[jb];B[rf];W[re];B[qf];W[pe];B[oe];W[in]
;B[pg];W[of];B[lg];W[pi];B[qi];W[ne];B[od];W[ci];B[bh];W[kc];B[lb];W[mg]
;B[po];W[cb];B[ck];W[dk];B[nl];W[sf];B[sg];W[se];B[qg];W[km];B[nn];W[sc]
;B[sb];W[sd];B[rb];W[lh];B[jf];W[kh];B[jh];W[if];B[jg];W[hd];B[he];W[ie]
;B[li];W[hg];B[ge];W[mh];B[hh];W[ll];B[kl];W[mm];B[nm];W[gg];B[gh];W[gl]
;B[hp];W[gk];B[ho];W[io];B[gj];W[hn];B[jl];W[bb];B[oo];W[ps];B[qs];W[os]
;B[js];W[ks];B[is];W[kr];B[np];W[nq];B[mp];W[mo];B[mq];W[mr];B[no];W[ac]
;B[ad];W[ab];B[fp];W[cc];B[af];W[ee];B[ef];W[eo];B[jm];W[jn];B[go];W[hl]
;B[il];W[mn];B[pj];W[oj];B[ok];W[nj];B[ph];W[oi];B[fk];W[fl];B[di];W[cl]
;B[gn];W[lp];B[lj];W[og];B[ja];W[ia];B[ka];W[gm];B[ml];W[im];B[ak];W[lk]
;B[am];W[al];B[bl];W[bn];B[al];W[an];B[ai];W[mk];B[ik];W[df];B[cg];W[fo]
;B[ep];W[do];B[ff];W[nk];B[fd];W[ig];B[mj];W[rd];B[hf];W[gf];B[];W[]
;TW[aa][ba][ca][da][ea][fa][ga][ha][db][fb][hb][ib]
[ec][ic][dd][id][jd][kd][le][me][mf][ng][nh][ni]
[el][cm][dm][em][fm][hm][lm][cn][en][kn][ln][ao]
[bo][jo][ko][ap][bp][jp][kp][aq][kq][ar][lr][nr]
[as][ls][ms][ns]
TB[la][ma][na][oa][pa][qa][ra][sa][mb][nb][ob][pb]
[qb][nc][oc][pc][ae][be][bf][ag][eg][rg][ah][eh]
[fh][rh][sh][ei][fi][gi][hi][ii][ji][ri][si][hj]
[ij][jj][kj][qj][rj][sj][jk][pk][rk][sk][ol][pl]
[ql][rl][sl][om][pm][qm][rm][sm][on][qn][rn][sn]
[qo][ro][so][gp][rp][sp][fq][gq][rq][sq][dr][er]
[fr][gr][hr][qr][rr][sr][es][fs][gs][hs][rs][ss]
)
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go