Author: Russell Reagan
Date: 14:24:42 08/21/02
Go up one level in this thread
On August 21, 2002 at 16:33:46, Dann Corbit wrote: >On August 21, 2002 at 07:05:22, Miguel A. Ballicora wrote: >[snip] >>When you design an engine you should design it with the engine in mind, not with >>the protocol in mind. > >I don't think that can be fully successful. As with any project, there are >interface requirements. The engine must interface with some sort of GUI or with >another engine, and they must understand each other. Hence, the design *must* >consider that interface. If done as an afterthought, I suspect the >implementation will be sub-optimal. Why not just design the engine with a nice set of engine commands, for example: ENG_SetInitialTime(int minutes); ENG_SetIncrement(int seconds); ENG_SetWhiteToMove(); ENG_SetBlackToMove(); ... Then when you get a winboard command, ex. "level 0 5 3" becomes: GetInput(input); ParseArgs(input,args); int minutes = atoi(args[2]); int increment = atoi(args[3]); ENG_SetInitialTime(minutes); ENG_SetIncrement(increment); or whatever. If you create your own set of engine commands, that are not related to any particular protocol, you can implement whichever protocol you'd like as long as your custom engine commands cover the required cases. I think it's better to write a "chess engine" and add support for various GUI's later (while keeping it in mind from the beginning), rather than writing an "xboard engine" or "uci engine". That way, 10 years from now when Winboard and UCI are no longer supported (or whatever the case is) and there are new protocols, you don't have to tear down your engine and hack in support for another protocol. You just write a new input handler, and it calls the appropriate engine functions based upon the input and the specified protocol. That's what makes the most sense to me. It's not like your engine is going to lose 100 ELO points because you didn't think about implementing Winboard support until the engine was half way finished. Russell
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.