Computer Chess Club Archives




Subject: Re: not using nullmove?

Author: martin fierz

Date: 04:09:29 02/16/04

Go up one level in this thread

On February 16, 2004 at 05:57:50, Tord Romstad wrote:

>On February 15, 2004 at 17:08:43, martin fierz wrote:
>>On February 15, 2004 at 14:08:18, Christophe Theron wrote:
>>>On February 15, 2004 at 08:53:42, martin fierz wrote:
>>>>On February 14, 2004 at 13:16:15, Christophe Theron wrote:
>>>>>What I have always tried to do is to hide the details of what's inside Chess
>>>>>Tiger (in order to protect my work a little bit) but still explain what my
>>>>>methodology (or work philosophy) was (in order to somehow give back to the
>>>>>I think it's important to have strong guidelines in your work. Some of them come
>>>>>from your knowledge of information processing in general (be careful not to
>>>>>create bugs, don't waste resources, never trust Microsoft...), and some of them
>>>>>are specific to the domain of chess programming and took me years to figure out.
>>>>>For example:
>>>>>* don't compute something in advance if you are not sure you will use it,
>>>>>because chances are that you will get a cutoff before you need it (remember it's
>>>>>just a guideline - sometimes you can break this rule).
>>>>>* you need a very accurate way of measuring progress, or you will not make
>>>>>progress at all.
>>>>>* Any change can make your program significantly weaker. You need to test your
>>>>>changes (with the method you have built) very often.
>>>>>* People believe that chess is about evaluation, but actually it's all about
>>>>>search (I'm trying very hard to break this rule, because it must be wrong from a
>>>>>mathematical point of view, but it's really difficult).
>>>>i'm not sure i agree with this one - but then i don't quite know what you mean
>>>>with that sentence :-)
>>>From a mathematical point of view, a perfect evaluation would make search mostly
>>>useless: a 1-ply search would be enough to play perfectly.
>>of course, but such an eval doesn't exist and there is no point even discussing
>>it :-)
>>>So in theory there is no reason to favor search over evaluation, and you can
>>>even replace search by evaluation.
>>>In practice, it is extremely difficult to gain the equivalent strength of just
>>>one more ply of search by an improvement in the evaluation.
>>>Once you have build a resonably simple evaluation that takes material, pawn
>>>structure and piece centralization into account, it's hell to make it
>>>significantly better.
>>of course, you have a long-developed engine with a balanced evaluation function.
>>mine is 7.5 months old, and therefore is still pretty bad ;-)
>I had no idea it was so young.  Considering the young age of your engine,
>I think Muse is extremely impressive.

well, i have been programming checkers for 7 years now, so i have some
experience in writing game-playing programs - that of course got me started with
my chess engine very quickly. many things like negamax, hashing, move ordering +
it's importance and so on are very easy+clear to me. muse now does most of the
standard stuff, so it's not too surprising that it's playing sort of sensibly -
however, it does lots of stuff in a bad way. for example, i know my evaluation
still needs a lot of tuning. my SEE and qsearch-good-check-detection don't
detect x-ray attacks. my whole program is slow because of some serious
inefficiencies. i wouldn't mind being a factor 2 or so slower than crafty - but
a factor 5-6 seems excessive...

apart from that, i am also a rather strong chess player (cough), for a chess
programmer at least - which makes it easier for me to find holes in my eval than
for others IMO.

>>that's why i believe i can still make lots of progress in that direction.
>>incidentally, that is probably true for most amateurs. these days, i use frenzee
>>1.46 and gothmog 0.4.5 as sparring partners for my engine. i believe these are
>>both quite decent amateur engines (of course not top amateurs, but still...). in
>>any case, i can see some holes in their evaluation functions!
>This is very interesting.  There are a few glaring holes in my evaluation
>function which I am perfectly aware of, but I am sure there are other
>holes which are obvious to you, but which are hard to see for a weak
>chess player like myself.  What do you consider to be the most serious
>holes in Gothmog's eval?

i think the worst thing i've seen in gothmog is your scoring of connected
passers. hint: even if you have connected passers on d6+c7 as white, they are
not worth all that much if black has a bishop on the c8-h3 diagonal, or has a
king in front of those pawns. i have seen gothmog lose more than once against
muse because it seems to think that these two passers were worth a piece or more
- which they are clearly not. of course i can't be 100% sure that your connected
passer eval is bad in this respect, but i am rather sure it is - you should
check it!
i've seen other things which i don't like but they are harder to pinpoint as
exactly as this one. and of course, even if i found some holes i wouldn't tell
you because gothmog is still beating muse up easily in my tests ;-)

>>>On the other hand, improving the search is by comparison much easier. At least
>>>in the first years of developpement of your chess engine.
>>i hope you're right!
>>>I would not say that nullmove is a pruning system that depends that much on
>>>evaluation. I would say that nullmove adds its share of strength to your
>>>program. This share is quite fixed and will not vary depending on the quality of
>>>your evaluation.
>>i guess this depends on what you do. if you do plain null-move and have a
>>bean-counter eval (no high positional scores), i don't believe you because of
>>king safety. if one side has a strong attack but no direct mate, null-move will
>>fail high for the side which has a big material advantage but is under serious
>>attack, if there is no direct win. there are different ways to solve this; you
>>can either use what some people here term speculative evaluation which can give
>>you a big score for your kingsafety. then you won't fail high any more that much
>>under attack. or you can disallow null-moving if you detect this kind of
>>situation on the board. one version uses the evaluation, the other the search.
>>perhaps you're right and the way to go is with the search, but IMO both can
>I agree.  I use the evaluation function do decide whether or not to do
>a null move search, and also to choose the null move reduction factor
>(which can be anywhere between 1 and 4, depending on the position).
>>>> if you
>>>>evaluate better, you have a greater chance of searching/extending important
>>>>lines and pruning the irrelevant lines.
>>>I wouldn't rely on evaluation for this.
>>then what would you rely on? i never said the evaluation should only return a
>>score. you can think of evaluation in a broader sense: not only does it evaluate
>>the position on the board, it also tells you whether you should prune or extend.
>>that is a separate part of the evaluation of course, and has nothing to do with
>>the number it returns. that is at least the way the chess engine in my brain
>>works :-)
>>you can of course say that is not the evaluation, that is a seperate function
>>which belongs to the search. but a lot of what that function would do is already
>>contained in the evaluation function...
>This, too, very much resembles what I do.  The evaluation function doesn't
>just return a single value, it computes separate values for king safety,
>pawn structure, passed pawns, mobility, and so on.  It also locates pinned
>and hanging pieces, and detects some simple mate threats.  All of this
>information is used in the search.  Whenever a move is made, the position
>is evaluated and I compare the results at the present node with the results
>at the previous node.  If a move does not increase any of the evaluation
>components, and it does not attack a piece, threaten mate or anything
>similar, I prune the move or reduce the search depth.  If a move threatens
>mate or dramatically increases the king safety or passed pawn eval, I
>make an extension.

in fact, i'm not doing this - yet. it's on my todo list of course, but as i
wrote i first would like to make my engine "decent" with the standard
techniques. once i'm satisfied with it, i'll start fiddling with this kind of



This page took 0.05 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.