bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] feature request: tuple2string move converter python func


From: Michael Petch
Subject: Re: [Bug-gnubg] feature request: tuple2string move converter python function (inverse parsemove)
Date: Tue, 23 Oct 2012 11:02:35 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 2012-10-23 05:44, bagrat lazaryan wrote:
> occasionally (especially for debug purposes) it may be useful to have such a
> function. that makes moves returned by findbestmove() more human readable. i
> suppose the function would receive the move (tuple of 8 ints) and the board
> and return the string of the standard form. (e. g. (24, 18, 24, 18, 13, 7,
> 13, 7) - "24/18(2) 13/7*(2)"; or (24, 18, 18, 13, 0, 0, 0, 0) - "24/13")

This isn't a bad idea, I contemplated it some time ago too. The external
interface (socket) does something pretty similar. It effectively takes
board state and dumps back the move string. I use the Python interface
for simulations and data extraction, but I could see this being
beneficial for someone who may also be using Python to interface with
another source (a server like FIBS etc).

I could see about producing a function like movetupletostring on the
weekend taking board state and move tuple as parameters. I'm pretty busy
during the week so can't look at it immediately. It should be trivial to
implement.

-- 
Michael Petch
CApp::Sysware Consulting Ltd.
OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304





reply via email to

[Prev in Thread] Current Thread [Next in Thread]