[computer-go] GoGui and python
Has anyone here tried using GoGui with python? I thought the print statement would send commands well enough, but it doesn't seem to. Here's some very simple code: command = raw_input() print = myName\n Obviously, this is a toy example, but GoGui responds with the program never responded to the name command. If I write out to a file, I can see my response just fine. Has anyone here used GoGui before? Is there a better gtp gui to use? The only example I've found anywhere is a Delphi example using some Windows primatives. I'd like to avoid that if I can. Thanks for you time. THN ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] GoGui and python
command = raw_input() print = myName\n Obviously, this is a toy example, but GoGui responds with the program never responded to the name command. If I write out to a file, I can see my response just fine. Have you tried flushing stdout after print? (or setting up stdout to not buffer?). A quick google confirmed python is buffering stdout, but I couldn't find the flush command. Darren -- Darren Cook http://dcook.org/mlsn/ (English-Japanese-German-Chinese free dictionary) http://dcook.org/work/ (About me and my work) http://dcook.org/work/charts/ (My flash charting demos) ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] GoGui and python
Yeah, flushing stdout should be all you need to do to make this work. To do this, import sys sys.stdout.flush() Good luck :) On 8/24/07, Darren Cook [EMAIL PROTECTED] wrote: command = raw_input() print = myName\n Obviously, this is a toy example, but GoGui responds with the program never responded to the name command. If I write out to a file, I can see my response just fine. Have you tried flushing stdout after print? (or setting up stdout to not buffer?). A quick google confirmed python is buffering stdout, but I couldn't find the flush command. Darren -- Darren Cook http://dcook.org/mlsn/ (English-Japanese-German-Chinese free dictionary) http://dcook.org/work/ (About me and my work) http://dcook.org/work/charts/ (My flash charting demos) ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] GoGui and python
Thomas, On Fri, 2007-08-24 at 17:26 -0500, Thomas Nelson wrote: command = raw_input() print = myName\n the following is taken directly from the protocol specification: - 2.6 Response Structure If successful, the engine returns a response of the form =[id] result Here '=' indicates success, id is the identity number given in the command, and result is a piece of text ending with two consecutive newlines. - Please note the two consecutive newlines. As others have already pointed out, you have to flush the output if it is buffered. Hellwig ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] GoGui and python
He has two consecutive newlines since print adds one unless the print statement has a comma at the end. - George On 8/24/07, Hellwig Geisse [EMAIL PROTECTED] wrote: Thomas, On Fri, 2007-08-24 at 17:26 -0500, Thomas Nelson wrote: command = raw_input() print = myName\n the following is taken directly from the protocol specification: - 2.6 Response Structure If successful, the engine returns a response of the form =[id] result Here '=' indicates success, id is the identity number given in the command, and result is a piece of text ending with two consecutive newlines. - Please note the two consecutive newlines. As others have already pointed out, you have to flush the output if it is buffered. Hellwig ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] GoGui and python
On Fri, 2007-08-24 at 19:11 -0400, George Dahl wrote: He has two consecutive newlines since print adds one unless the print statement has a comma at the end. - George Ah, thanks, didn't know that. I suspected this to be the error because the two newlines in responses are in my experience the most overlooked detail in the GTP spec. Hellwig ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
[computer-go] Distributed Alpha-Beta Papers?
Can someone recommend a good paper on distributed alpha-beta searching? Not necessarily for Go; I'm just interested in reading up on the subject. Thanks, - Phil___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Distributed Alpha-Beta Papers?
If you have an ACM subscription, the following should give you some interesting info: R. Finkel, U. Manber. 1987. DIB - A distributed implementation of backtracking. ACM Transactions on Programming Languages and Systems, 9(2):235–256. On 8/25/07, Phil G [EMAIL PROTECTED] wrote: Can someone recommend a good paper on distributed alpha-beta searching? Not necessarily for Go; I'm just interested in reading up on the subject. Thanks, - Phil ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/
Re: [computer-go] Distributed Alpha-Beta Papers?
Er, sorry for the double-post, just thought I should mention that you can find the abstract for the paper at this link: http://portal.acm.org/citation.cfm?id=24067coll=portaldl=ACM Or just read it here: DIB is a general-purpose package that allows a wide range of applications such as recursive backtrack, branch and bound, and alpha-beta search to be implemented on a multicomputer. It is very easy to use. The application program needs to specify only the root of the recursion tree, the computation to be performed at each node, and how to generate children at each node. In addition, the application program may optionally specify how to synthesize values of tree nodes from their children's values and how to disseminate information (such as bounds) either globally or locally in the tree. DIB uses a distributed algorithm, transparent to the application programmer, that divides the problem into subproblems and dynamically allocates them to any number of (potentially nonhomogeneous) machines. This algorithm requires only minimal support from the distributed operating system. DIB can recover from failures of machines even if they are not detected. DIB currently runs on the Crystal multicomputer at the University of Wisconsin-Madison. Many applications have been implemented quite easily, including exhaustive traversal (N queens, knight's tour, negamax tree evaluation), branch and bound (traveling salesman) and alpha-beta search (the game of NIM). Speedup is excellent for exhaustive traversal and quite good for branch and bound. On 8/25/07, Adrian Petrescu [EMAIL PROTECTED] wrote: If you have an ACM subscription, the following should give you some interesting info: R. Finkel, U. Manber. 1987. DIB - A distributed implementation of backtracking. ACM Transactions on Programming Languages and Systems, 9(2):235–256. On 8/25/07, Phil G [EMAIL PROTECTED] wrote: Can someone recommend a good paper on distributed alpha-beta searching? Not necessarily for Go; I'm just interested in reading up on the subject. Thanks, - Phil ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/ ___ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/