Author: Russell Reagan
Date: 00:45:12 11/11/03
Go up one level in this thread
On November 10, 2003 at 17:37:22, martin fierz wrote: >i use a similar approach in my checkers program (hashtable etc.). the problem >for my chess program is that this means i have to write a PGN-parser to read the >lines i enter in chessbase (or the games i select from chessbase). and i just >hoped i could do without that ;-) You might be able to avoid some PGN parsing by using std::map in C++, and just stuffing lines into a map, and mapping those strings of moves to the move to play. This suffers from not handling transpositions though. I would personally take the time to implement something to my liking, and not do it half way to save a few hours of work. Most of us work on our programs for years and years anyway, so what is an extra day or so to add something the correct way? You'll be happier when it's done the right way. I can't count the number of times I've tried to hurry through some portion that I've written numerous times before (FEN parser is one I've written over and over), and almost always when I hurry through it, it doesn't work right and I end up spending a lot of time debugging. It's better to do it right the first time.
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.