Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Simple optimization question

Author: Tord Romstad

Date: 09:36:38 01/09/04

Go up one level in this thread


On January 09, 2004 at 12:15:35, Gerd Isenberg wrote:

>On January 09, 2004 at 08:40:53, Tord Romstad wrote:
>
>>On January 09, 2004 at 07:03:23, martin fierz wrote:
>>
>>>don't do it! even if this happened to be faster - which i don't think - having
>>>readable code is much more important IMO. i believe most chess programs are
>>>limited by bugs in their playing strength, not by speed. 10% more speed is worth
>>>a handful of elo at best, not spending time on studying obfuscated code and not
>>>having bugs is worth much more than that!
>>
>>Yeah, bugs are arguably the most important factor at all.  I found a really
>>horrible one last night:
>>
>>In my passed pawn evaluation, I increase the passed pawn bonus considerably
>>if it has reached the 6th or 7th rank and the static exchange evaluator
>>decides that the pawn can safely advance.  Or rather, that was what I thought
>>I did.  It turned out that I did precisely the opposite:  I gave the passed
>>pawns a bonus for *not* being able to advance.
>>
>>The really amazing thing is that this bug must have been in my engine for
>>a really long time (at least half a year, I think), and I haven't even
>>suspected that something was wrong until now.  I wonder how many points
>>this bug has cost me in various tournaments ...
>>
>>Tord
>
>I remember Chrilly Donninger's statement about the win with Nimzo-Guernica
>against Ed Schoeder's Gideon, WMCCC, Munich 93. Ed was amazed by Nimzo's endgame
>knowledge - which was caused by a similar passed pawn bug ;-)

:-)

But at least in my case, the bug does not seem to have been beneficial.
A 100-game blitz match between my old version and a new version with
the bug fixed (no other changes) ended 61-39 in favor of the new version.
It is not often you can improve the engine by changing only one line of
code!  If anything, this proves that Martin's is very right when stating
that fixing bugs is more important than everything else.

By the way, my bug didn't only affect passed pawn evaluation, but also
the evaluation of isolated and backward pawns.  For instance, backward
pawns were given a bonus for not being able to advance.  I'm beginning
to understand why my engine has always ended up with ugly pawn structures.

Tord



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.