Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old January 22nd 04, 03:34 AM
Martin Wilber
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

I am thinking about using crafty to analyze a collection of games in pgn
format on linux. If anyone has some shell scripts to help in doing this
or some pointers on settings, etc, it would be much appreciated.

Marty
  #2   Report Post  
Old January 22nd 04, 04:41 AM
Robert Hyatt
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

Martin Wilber wrote:
I am thinking about using crafty to analyze a collection of games in pgn
format on linux. If anyone has some shell scripts to help in doing this
or some pointers on settings, etc, it would be much appreciated.


Marty



Combine all the games into one file and then (making sure that the
name is consistent in the pgn) do this

crafty
annotate games.pgn hyatt 1-999 -.5 60

or something similar.

Another choice is a pretty simple shell script if you have a bunch
of individual pgn games (one per file, say) and you want to keep them
separate. If that is what you want, reply and I'll show you a simple
shell script to make that happen as well...

--
Robert M. Hyatt, Ph.D. Computer and Information Sciences
University of Alabama at Birmingham
(205) 934-2213 136A Campbell Hall
(205) 934-5473 FAX Birmingham, AL 35294-1170
  #3   Report Post  
Old January 22nd 04, 07:02 AM
Cesar A. K. Grossmann
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

Robert Hyatt wrote:

crafty
annotate games.pgn hyatt 1-999 -.5 60


'hyatt'?

Crafty v19.8 (1 cpus)

White(1): help annotate
annotate[h] filename b|w|bw moves margin time [n]
where filename is the input file with game moves, while the
output will be written to filename.can. the input file is
PGN-compatible with one addition, the ability to request that
alternative moves also be analyzed at any point. to do this
at the point where you have alternative moves, simply include
them in braces {move1, move2}, and Crafty will then search
them also. b/w/bw indicates whether to annotate only the white
side (w), the black side (b) or both (bw). moves indicates
which moves to annotate. a single value says start at the
indicated move and go through the entire game. a range (20-30)
annoates the given range only. margin is the difference between
the search value for the move played in the game, and the best move
crafty found, before a comment is generated (pawn=1.0). time is
the time limit per move in seconds. if the optional "n" is
appended, this produces N best moves/scores/PV's, rather than
just the very best move. it won't display any move that is worse
than the actual game move played, but you can use -N to force
Crafty to produce N PV's regardless of how bad they get.
using 'annotateh' produces an HTML file with bitmapped
board displays where analysis was displayed.

-o=O=o-

Crafty can do the analysis of a FEN position?

[]s
--
César A. K. Grossmann
  #4   Report Post  
Old January 22nd 04, 08:39 AM
Steven Wayne
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

On Thu, 22 Jan 2004 05:02:05 -0200, Cesar A. K. Grossmann
wrote:
Robert Hyatt wrote:

crafty
annotate games.pgn hyatt 1-999 -.5 60


'hyatt'?


Player name. Can also be w or b for the colour.

Steven
--
Are you confident that you appear to be professional in your
electronic communication? Consider this:
A: No
Q: Can I top post?
  #5   Report Post  
Old January 22nd 04, 04:11 PM
Robert Hyatt
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

Cesar A. K. Grossmann wrote:
Robert Hyatt wrote:

crafty
annotate games.pgn hyatt 1-999 -.5 60


'hyatt'?


Yes. For years you have been able to enter the players name,
rather than a particular side to annotate for. This lets you
enter your games where you played either white or black, and it
will only annotate the side with the player named "hyatt" or
whatever you want.

Looks like (from the below output) that the change to the annotate
command help got lost. I'll fix it.


Crafty v19.8 (1 cpus)


White(1): help annotate
annotate[h] filename b|w|bw moves margin time [n]
where filename is the input file with game moves, while the
output will be written to filename.can. the input file is
PGN-compatible with one addition, the ability to request that
alternative moves also be analyzed at any point. to do this
at the point where you have alternative moves, simply include
them in braces {move1, move2}, and Crafty will then search
them also. b/w/bw indicates whether to annotate only the white
side (w), the black side (b) or both (bw). moves indicates
which moves to annotate. a single value says start at the
indicated move and go through the entire game. a range (20-30)
annoates the given range only. margin is the difference between
the search value for the move played in the game, and the best move
crafty found, before a comment is generated (pawn=1.0). time is
the time limit per move in seconds. if the optional "n" is
appended, this produces N best moves/scores/PV's, rather than
just the very best move. it won't display any move that is worse
than the actual game move played, but you can use -N to force
Crafty to produce N PV's regardless of how bad they get.
using 'annotateh' produces an HTML file with bitmapped
board displays where analysis was displayed.


-o=O=o-


Crafty can do the analysis of a FEN position?


yes...



--
Robert M. Hyatt, Ph.D. Computer and Information Sciences
University of Alabama at Birmingham
(205) 934-2213 136A Campbell Hall
(205) 934-5473 FAX Birmingham, AL 35294-1170


  #6   Report Post  
Old January 22nd 04, 10:40 PM
Joel Mayes
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

•In article , Robert Hyatt wrote:
•Cesar A. K. Grossmann wrote:
•Robert Hyatt wrote:

crafty
annotate games.pgn hyatt 1-999 -.5 60


'hyatt'?


Yes. For years you have been able to enter the players name,
rather than a particular side to annotate for. This lets you
enter your games where you played either white or black, and it
will only annotate the side with the player named "hyatt" or
whatever you want.

Looks like (from the below output) that the change to the annotate
command help got lost. I'll fix it.

Crafty v19.8 (1 cpus)

White(1): help annotate
annotate[h] filename b|w|bw moves margin time [n]


Also the annotatet command isn't listed in the doc or the 'help
annotate' output, I only found it by getting so frustrated at the
number of steps required to annotate and print up a nice copy of my
games that I dived into the source code to add this feature my self,
only to find it was all ready there!



--
| Joel Mayes | /~\ ASCII Ribbon campaign
| Accordionist | \_/ stop HTML mail and news
| Musician | / \
| Music Teacher |
  #8   Report Post  
Old January 23rd 04, 01:00 AM
Robert Hyatt
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

Joel Mayes wrote:
In article , Robert Hyatt wrote:
Cesar A. K. Grossmann wrote:
Robert Hyatt wrote:

crafty
annotate games.pgn hyatt 1-999 -.5 60

'hyatt'?


Yes. For years you have been able to enter the players name,
rather than a particular side to annotate for. This lets you
enter your games where you played either white or black, and it
will only annotate the side with the player named "hyatt" or
whatever you want.

Looks like (from the below output) that the change to the annotate
command help got lost. I'll fix it.

Crafty v19.8 (1 cpus)

White(1): help annotate
annotate[h] filename b|w|bw moves margin time [n]


Also the annotatet command isn't listed in the doc or the 'help
annotate' output, I only found it by getting so frustrated at the
number of steps required to annotate and print up a nice copy of my
games that I dived into the source code to add this feature my self,
only to find it was all ready there!


I think it is in the help annotate command, or maybe there was just
a hint in the bare "help" command.

Annotateh was _just_ added so the docs have not caught up with the
recent additions to 19.9 yet...




--
| Joel Mayes | /~\ ASCII Ribbon campaign
| Accordionist | \_/ stop HTML mail and news
| Musician | / \
| Music Teacher |


--
Robert M. Hyatt, Ph.D. Computer and Information Sciences
University of Alabama at Birmingham
(205) 934-2213 136A Campbell Hall
(205) 934-5473 FAX Birmingham, AL 35294-1170
  #9   Report Post  
Old January 23rd 04, 01:07 AM
Robert Hyatt
 
Posts: n/a
Default How to use crafty to automatically analyze many games on linux

Martin Wilber wrote:
In article ,
says...
Another choice is a pretty simple shell script if you have a bunch
of individual pgn games (one per file, say) and you want to keep them
separate. If that is what you want, reply and I'll show you a simple
shell script to make that happen as well...


I would appreciate the shell script as I have both separate and combined
pgn files to process.



Try this:

I assume you put all the files into the same directory with Crafty,
and that they all end with .pgn. I further assume that you have the
PGN header tags set up correctly with your name. I'll use "hyatt"
here for my example.

#!/bin/csh
foreach pgnfile (*.pgn)
echo "annotate $pgnfile hyatt 1-9999 .5 180" infile
echo "quit" infile
crafty infile
end

That is all you need. Note that the annotate command will annotate
for the side with the player PGN tagged as "hyatt", that the window
is .5 (comment if a move is 1/2 pawn better than the move played
in the game) with a time limit of 180 seconds per move.

When you finish you will have a bunch of xxx.pgn.can files with
the comments. You could change the annotate to annotateh to get
html-output that will look even nicer.

Bob

thanks


Marty


--
Robert M. Hyatt, Ph.D. Computer and Information Sciences
University of Alabama at Birmingham
(205) 934-2213 136A Campbell Hall
(205) 934-5473 FAX Birmingham, AL 35294-1170
  #10   Report Post  
Old January 23rd 04, 09:33 AM
David Richerby
 
Posts: n/a
Default Scripting languages (OT) (was How to use crafty to automatically analyze many games on linux)

Robert Hyatt wrote:
#!/bin/csh


I'd strongly recommend not writing scripts in csh:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

It has broken redirection, builtins that don't work like commands, poor
signal handling, broken quoting, broken expression evaluation and a broken
script checker. In short, it's not suitable for any script much more
complicated than the one you posted -- why bother learning two scripting
languages?


Dave.

--
David Richerby Expensive Zen Hi-Fi (TM): it's like a
www.chiark.greenend.org.uk/~davidr/ music system that puts you in touch
with the universe but it'll break
the bank!
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
poor crafty perf after compile on Linux 2.6.1 jake johnson rec.games.chess.computer (Computer Chess) 2 January 18th 04 10:20 AM
Crafty 19.6 on Windows with GCC successfully compiled! 100% !! Michael Loggel rec.games.chess.computer (Computer Chess) 11 December 10th 03 03:02 PM
Is Crafty better than Fritz in closed opening games? Alberich rec.games.chess.computer (Computer Chess) 2 December 4th 03 08:01 PM
Compiling Crafty 19.5 on linux Neko rec.games.chess.computer (Computer Chess) 14 November 30th 03 12:25 AM
Crafty Learning Robert Hyatt rec.games.chess.computer (Computer Chess) 0 July 9th 03 08:44 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright ©2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017