Author: Uri Blass
Date: 12:00:50 12/12/04
Go up one level in this thread
On December 12, 2004 at 10:57:05, Robert Hyatt wrote: >On December 12, 2004 at 01:20:29, Uri Blass wrote: > >>I want to do blunder check for games of movei not in a single game every time >>but in a pgn file by another program. >> >>The question is if there is some tool commercial or not commercial to support >>doing it automatically >> >>Uri > > >I am not quite sure what you are asking, but Crafty can certainly take a single >PGN file with lots of games, and do a blundercheck for you... If that is what >you want, I can tell you how.. Yes,That is what I want. Thanks for the information that crafty can do it. I did not know it. I read Crafty's source to make book from pgn file (the functions BookUp and ReadPGN) I found no special function that finds the next move in pgn and I had to modify the code that I copied in order to have functions that do it. The point is that a function that only read and remember the information until the next move in pgn file can be useful not only for making a book from pgn file but also to do thing like blunder checking pgn file and doing other things with pgn file like translating pgn file to epd file. Of course it is possible to write long code for every task but I see no reason not to have code to read the next position and use it. Note that the code that I copied is only relevant for reading pgn file and picking information and I did not copy code of Crafty to make the same book or tried to understand all Crafty's code about making book but I wonder if there is a reason that crafty has no functions like the following function that I decided to have in movei and I use in many functions. int get_next_move_in_pgn(void) /*this function read next command from file games that is already opened until it see a new move that mean new interesting position because move was done from it. it returns the move in case of finding a move print error and change global flag from 0 to 1 when it finds error and care to close the file when there are no more moves or 0 in case that it does not find a new move it calculates relevant information like the result of the game during the process */ The problem that I had in understanding Crafty's code to read pgn file(I was not interested in the way Crafty store positions in book but only in reading pgn file) is that the functions seem to me too long to understand. In order not to have too long post I will post the code that I have to readpgn in my next post It is not perfect but I think that it is easier to understand than Crafty's code. The code has nothing to do with book but only with getting information and memorizing it and calculating information based on functions that are defined in movei. I will be happy to hear productive comments for my code. Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.