bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] feature request: Automatic rollouts on pos-files


From: Øystein O Johansen
Subject: Re: [Bug-gnubg] feature request: Automatic rollouts on pos-files
Date: Thu, 12 Aug 2004 13:59:16 +0200

Just one word: Python!

#----8<---- Untested code (Written in 3 minutes) ----8<----

import glob

for filename in glob.glob("*.pos"):
     gnubg.command("import pos " + filename)
     gnubg.command("hint")
# FIXME: Maybe you can have an automatic check whenever it is a move or a
cube problem
# How can I check if the dice are rolled or not?
     gnubg.command("rollout =1 =2 =3 =4 =5)  # To rollout the top 5 moves
#    gnubg.command("rollout =cube")  # To rollout a cube decision
     gnubg.command("save match " + filename + ".sgf")

#----8<----  end of untested code ----8<----

Run this python script from gnubg-no-gui.exe with the command:
load python scriptname.py

-Øystein



-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.





reply via email to

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