Author: Robert Hyatt
Date: 11:42:27 09/20/99
Go up one level in this thread
OK... I now have some working code. It is not perfected, by any stretch yet, but it works in two pieces, and one of the two pieces is really good, from an accuracy point of view. Here is what I have done: 1. I have written a piece of code that is very good at enumerating candidate passers in a possition. Nothing fancy except that bitboards help a lot in discovering which pawns are candidate passers. I produce an 8-bit vector for each side with a 1 on a file for a candidate passer being present, a 0 if no candidate is on that file... 2. I am using this in a way that is conservative at present, but which works pretty well. If white has a candidate, I compare the 'outsideness' of that candidate against real passers and candidate passers for the other side, and give a bonus (that is bigger as material comes off) if it has an outside candidate passer. Here are a couple of examples: +---+---+---+---+---+---+---+---+ 8 | | | | | | | *K| | +---+---+---+---+---+---+---+---+ 7 | *P| *P| | | | *P| *P| *P| +---+---+---+---+---+---+---+---+ 6 | | | | | | | | | +---+---+---+---+---+---+---+---+ 5 | | | | | | | | | +---+---+---+---+---+---+---+---+ 4 | | | | | | | | | +---+---+---+---+---+---+---+---+ 3 | | | | | | | P | | +---+---+---+---+---+---+---+---+ 2 | P | P | P | | | | P | | +---+---+---+---+---+---+---+---+ 1 | | | | | | | K | | +---+---+---+---+---+---+---+---+ a b c d e f g h (fen 6k1/pp3ppp/8/8/8/6P1/PPP3P1/6K1/ w) old (16.18 crafty) evaluates this as -36 (black is better) because of those two doubled kingside pawns. new crafty says +.36 because white has a potential outside passer on the c file, black can't force a passer without the king helping. Better... Here is a test of that code, as it is not very well known that two doubled pawns can stop a majority, when a duo can't, as in the previous example. +---+---+---+---+---+---+---+---+ 8 | | | | | | | *K| | +---+---+---+---+---+---+---+---+ 7 | *P| *P| | | | *P| *P| *P| +---+---+---+---+---+---+---+---+ 6 | | | | | | | | | +---+---+---+---+---+---+---+---+ 5 | | | | | | | | | +---+---+---+---+---+---+---+---+ 4 | | | | | | *B| | | +---+---+---+---+---+---+---+---+ 3 | | | | | | | N | | +---+---+---+---+---+---+---+---+ 2 | P | P | P | | | P | P | K | +---+---+---+---+---+---+---+---+ 1 | | | | | | | | | +---+---+---+---+---+---+---+---+ a b c d e f g h This is the position prior to the last one. I (as black) played Bxg3. Old crafty promptly plays Kxg3 and now it has to watch out for the passed black pawn on the h file (eventually). new crafty plays fxg3 and black isn't going to make any passer. How this is going to work in games is anybody's guess... the outside passed pawn code has pretty well stood the test of time, this is just taking in one level more abstract. More after I run it a while to see how it behaves. BTW, as I mentioned, this has not slowed me down one bit. In fact, in adding this, I consolidated several flags into one pawn hash entry to make room for the two new bitmaps (8 bits each) and actually the new code is a bit faster than the old (without this majority stuff)... If you have a position you'd like to see it evaluate, let me know. Best kinds are those that don't need a search, so we can see what it understands or doesn't understand with pure evaluation. Maybe its endgame strength will increase a little more with this. It certainly seems reasonable at present to assume so... Bob
This page took 0.01 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.