[Computer-go] Pachi on cygwin
Don Dailey
dailey.don at gmail.com
Sun Jan 29 05:35:45 PST 2012
I think you need to set up the stdin and stdout file handles to flush
automatically.
I think this code does that for gcc,
setvbuf(stdout, NULL, _IONBF, 0 );
setvbuf(stdin, NULL, _IONBF, 0 );
or maybe just
setbuf(stdout, NULL);
setbuf(stdin, NULL);
If you set this up correctly you do not need to flush after every print of
a line, i.e. fflush(stdout);
Don
On Sun, Jan 29, 2012 at 12:11 AM, Michael Williams <
michaelwilliams75 at gmail.com> wrote:
> I just build the latest Pachi on the patest Cygwin. I got some warnings
> but no errors. It does not crash when I run it. It does show it's
> thinking process when I give it a genmove command. But when it is done
> thinking, it does not print the result and prompt for the next command as
> expected. Instead it just hangs. Any ideas?
>
> $ ./pachi.exe
> Random seed: 1327809195
> play b e5
> IN: play b e5
> got move 1,5,5
> Fresh board with random seed 1327809195
> Warning: Cannot promote move node! Several play commands in row?
> Move: 1 Komi: 0.0 Handicap: 0 Captures B: 0 W: 0
> A B C D E F G H J A B C D E F G H J
> +-------------------+ +-------------------+
> 9 | . . . . . . . . . | 9 | : : : : : : : : : |
> 8 | . . . . . . . . . | 8 | : : : : : : : : : |
> 7 | . . . . . . . . . | 7 | : : : : : : : : : |
> 6 | . . . . . . . . . | 6 | : : : : : : : : : |
> 5 | . . . . X). . . . | 5 | : : : : : : : : : |
> 4 | . . . . . . . . . | 4 | : : : : : : : : : |
> 3 | . . . . . . . . . | 3 | : : : : : : : : : |
> 2 | . . . . . . . . . | 2 | : : : : : : : : : |
> 1 | . . . . . . . . . | 1 | : : : : : : : : : |
> +-------------------+ +-------------------+
> =
> genmove w
> IN: genmove w
> Fresh board with random seed 1327809195
> [10000] best 0.395954 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.396)
> F6(0.397) F7(0.423) F8(0.410)
> [20000] best 0.405934 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.406)
> F6(0.388) G7(0.394) F7(0.423)
> [30000] best 0.412510 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.413)
> F6(0.385) G7(0.387) G8(0.393)
> [40000] best 0.417998 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.418)
> F6(0.385) G7(0.387) G8(0.392)
> [50000] best 0.420043 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.420)
> F7(0.431) F6(0.385) G7(0.386)
> [60000] best 0.420043 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.420)
> F7(0.428) F6(0.385) G7(0.386)
> [70000] best 0.420043 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.420)
> F7(0.425) F6(0.385) G7(0.386)
> [80000] best 0.420043 komi 0.0 | seq E6 F6 F7 D6 | can E6(0.420)
> F7(0.430) F6(0.385) G7(0.386)
>
>
>
> _______________________________________________
> Computer-go mailing list
> Computer-go at dvandva.org
> http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://computer-go.org/pipermail/computer-go/attachments/20120129/54217dde/attachment.html>
More information about the Computer-go
mailing list