On Thu, 2007-12-06 at 15:07 +0100, Edward de Grijs wrote: > > > To check things even more, I tried to communicate using C with > popen(): > > FILE *ptr; > > if ((ptr = popen("mogo --9 --nbTotalSimulations 3000 > mogoout", > "w")) != NULL) > > { > > fprintf(ptr, "boardsize 9\n"); > > fprintf(ptr, "genmove b\n"); > > sleep(60); > > } > > But the result is the same, after these commands, mogo still continues > to > perform multiple genmoves. I am puzzled here... > > I will look at the ruby script, and there are also twogtp scripts of > gnugo > in python, perl etc. which I could check.
If the output is through a pipe, it is probably 'block-buffered'. Try throwing in a few fflush()es, or set the buffering with setvbuf() et.al. man setvbuf HTH, AvK _______________________________________________ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/