Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is this possible?

Author: Russell Reagan

Date: 22:51:05 09/24/02

Go up one level in this thread


On September 24, 2002 at 19:10:18, Arshad Syed wrote:

>I am planning to write my own engine soon. Preferably I would like to code the
>search engine in Assembly Language since nodes/sec is a very important factor
>for me. Is it easy to interface Winboard with Assembly language code?
>
>
>Thanks,
>Arshad

While getting high nps may be a "very important factor" for you, it's not a very
important factor in determining how strong your engine is. Forward pruning will
be much more important, unless all you care about is getting a lot of nps. Just
know that high nps does not equal strong chess engine.

In addition to that, I don't think it's a very good idea to write it in
assembly. C will be just as fast (or faster) unless you are a real assembler
guru. The added bonus of using C/C++ is that you won't have to rewrite your
program when you get a new computer, or when new processors become available.

Imagine the horror when you've spent the last several years writing your beloved
chess program, and now it's a few years later, and the newest processors have
all kinds of new features that the latest compilers are eating up. All of us
will spend a matter of minutes (if that) recompiling while you spend another few
years porting to the new processor, adding new optimizations for the new
processor, and so on. Of course, by the time you get finished doing that, there
will be new processors out and...

Anyway, write maybe a few routines in ASM, like if you use bitboards there are
some good candidates for ASM, but it's also trivial to write those in C, so if a
new processor came out and the ASM didn't work anymore, you could write it in C
in a few minutes and you're engine would still work.

If you're dead set on using ASM, then yes, it's possible. I've learned the hard
way that you shouldn't worry about optimization until later. Choose good
algorithms and a good design, then optimize the hot spots after it's all working
and write them in ASM then if you want.

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.