Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
flok

Hi,

We all know the shannon evaulation algorithm: 1 point for a pawn, 3 points for a knight or bishop, 5 points for rooks, 9 for queens, 0.1 for each move, subtracting ½ point for each doubled pawn, backward pawn, and isolated pawn.
Now I was wondering: since then, were any additional parameters invented? If so: which ones?

hgm
Posts: 23795
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

King safety.

flok

Re: additions to the shannon algorithm?

hgm wrote:King safety.
How is that defined? And what value?

thanks

hgm
Posts: 23795
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: additions to the shannon algorithm?

Every program defines that differently, and it is the major factor that separates strong engines from weak engines.

For a castled (white) King it is usually implemented as a bonus for being on g1 or c1/b1, and give a penalty for each missing Pawn on f2/g2/h2 or a2/b2/c2, with an extra large penalty if there is no pawn in the file at all. You could also give a penalty for each square from which a King could be checked by a slider, or for each square next to the King that is attacked by an enemy piece (perhaps reducing the penalty if the square is also defended by a friendly piece other than the King). And a penalty if the opponent has a half-open file opposite to your King fortress.

The value of these respective penalties can be made dependent on the amount and type of material the opponent has: the less material he has, the less valuable King safety will be in general. In a Pawn ending you don't have to worry about it at all. And you don't have to worry about open files if the opponent has no Q or R, and not about diagonal checks if the opponent does not have corresponding B or Q.

King safety is a major evaluation term, and can easily be worth 200 - 500 cP.

Uri Blass
Posts: 8611
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: additions to the shannon algorithm?

flok wrote:Hi,

We all know the shannon evaulation algorithm: 1 point for a pawn, 3 points for a knight or bishop, 5 points for rooks, 9 for queens, 0.1 for each move, subtracting ½ point for each doubled pawn, backward pawn, and isolated pawn.
Now I was wondering: since then, were any additional parameters invented? If so: which ones?
I did not know it but this is not a good algorithm.

kinght and bishop should be more than rook and pawn so we simply increase the value of knight and bishop.

substracting 1/2 pawns for double pawns backward pawn or isolated pawn is clearly too much.

king safety is important but also mobility is important(maybe it is included in 0.1 for each move but 0.1 for each move is not clearly defined.

king safety is based on attacking squares near the king when the idea is that you give a bonus for heavy pieces that attack squares near the king.

Uri

hgm
Posts: 23795
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: additions to the shannon algorithm?

A very elementary term that is still missing (apart from piece-square tables, which could be seen as a poor-man's substitute for mobility) is an elephantiasis correction. This term is not very large in normal Chess, but can get substantial (> 100 cP) in games with multiple Queen-class pieces.

Bassically, this is a non-linear material term, that discounts the value of high pieces for each lower piece the opponent has. This term causes a Q to be worth less than R+B in the presence of 4 other Queens (2 black, two white), why a sole Q is worth a lot more than R+B. (Or in other words QQQ < QQRB while Q > RB.)

ernest
Posts: 1864
Joined: Wed Mar 08, 2006 7:30 pm

Re: additions to the shannon algorithm?

Have a look at Larry Kaufman's work (he now works on Rybka):

The Evaluation of Material Imbalances in Chess
http://home.comcast.net/~danheisman/Art ... alance.htm

http://home.comcast.net/~danheisman/Art ... _pawns.htm

Gian-Carlo Pascutto
Posts: 1191
Joined: Sat Dec 13, 2008 6:00 pm
Contact:

Re: additions to the shannon algorithm?

I'm surprised nobody mentions passed pawns

Graham Banks
Posts: 33258
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: additions to the shannon algorithm?

Gian-Carlo Pascutto wrote:I'm surprised nobody mentions passed pawns
I am not a programmer, but from my observations through the testing I've done, the evaluation of king safety, passed pawns and mobility stand out as key areas in defining an engine's strength. Correct material evaluation is also a factor, and the values mentioned originally need to be refined better.