Lone minor piece penalty - What did Larry mean?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Lone minor piece penalty - What did Larry mean?

Post by Sven »

CRoberson wrote:You got it. It plays Nde5 expecting dxe5, Nxe5, Qe4, Nxd3, BxR, axb and score it as white is up by 0.82. I think I am over penalizing the white isolated pawns.
And missing the tactical continuation Rd1 that wins the Nd3 by pinning it, being now a rook up for white, as Kevin already pointed out.

Sven
lkaufman
Posts: 5960
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA

Re: Lone minor piece penalty - What did Larry mean?

Post by lkaufman »

CRoberson wrote:In the 1990's, I implemented the lone minor piece penalty suggested by Larry Kaufman in his article published in Chess Life. I did this in NoonianChess and again in Telepath and Ares. However, I think I misinterpreted the article.

Basically, it said apply a penalty to the lone minor piece (different for bishop and knight), because it needs pieces as helpers to be effective.

What did he mean by pieces? Did he mean apply the penalty if I have a bishop and some pawns or did he mean completely lone bishop (no pieces and no pawns).

I interpreted it as lone means nothing else including pawns, but some test positions from a lose in Olivier's tournament make me think he meant apply the penalty disregarding the number of pawns.
I'm almost certain that I meant that the penalty applies regardless of the number of pawns. I had totally forgotten about this; maybe we'll try it in Komodo, although probably other things we do are heavily redundant with this. Perhaps the biggest effect is that if you are up the Exchange (rook for minor piece, regardless of the pawn count), you should try extra hard to exchange all the remaining pieces.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Lone minor piece penalty - What did Larry mean?

Post by bob »

CRoberson wrote:You got it. It plays Nde5 expecting dxe5, Nxe5, Qe4, Nxd3, BxR, axb and score it as white is up by 0.82. I think I am over penalizing the white isolated pawns.
Apparently, my eval is roughly +3 there...

What is the penalty? for the starting position,

Code: Select all

Black(1): sc
note: scores are for the white side
                        +-----------white----------+-----------black----------+
material.......   1.33  |    comp     mg      eg   |    comp     mg      eg   |
pawns..........  -0.84  |   -1.07   -1.04   -1.20  |    0.23    0.25    0.16  |
passed pawns...   0.29  |    0.29    0.30    0.27  |    0.00    0.00    0.00  |
knights........  -0.15  |    0.00    0.00    0.00  |   -0.15   -0.15   -0.15  |
bishops........   0.80  |    0.80    0.74    1.10  |    0.00    0.00    0.00  |
rooks..........  -0.33  |    0.09    0.09    0.09  |   -0.42   -0.45   -0.30  |
queens.........   0.00  |    0.06    0.06    0.06  |   -0.06   -0.06   -0.06  |
kings..........   0.18  |   -0.55   -0.59   -0.40  |    0.73    0.81    0.40  |
development....   0.00  |    0.00    0.00    0.00  |    0.00    0.00    0.00  |
pawn races.....   0.00  +--------------------------+--------------------------+
total..........   1.32
that's a static evaluation dump. Pawns are evaluated as roughly -1.0

for the ending position:

Code: Select all

note: scores are for the white side
                        +-----------white----------+-----------black----------+
material.......   2.12  |    comp     mg      eg   |    comp     mg      eg   |
pawns..........  -0.65  |   -0.60   -0.54   -0.61  |   -0.05    0.01   -0.07  |
passed pawns...   0.00  |    0.00    0.00    0.00  |    0.00    0.00    0.00  |
knights........   0.02  |    0.00    0.00    0.00  |    0.02    0.02    0.02  |
bishops........   0.00  |    0.00    0.00    0.00  |    0.00    0.00    0.00  |
rooks..........   0.46  |    0.46    0.60    0.45  |    0.00    0.00    0.00  |
queens.........   0.00  |    0.00    0.00    0.00  |    0.00    0.00    0.00  |
kings..........  -0.52  |    0.00    0.00    0.00  |   -0.52    0.00   -0.60  |
development....   0.00  |    0.00    0.00    0.00  |    0.00    0.00    0.00  |
pawn races.....   0.00  +--------------------------+--------------------------+
total..........   1.40
CRoberson
Posts: 2056
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Lone minor piece penalty - What did Larry mean?

Post by CRoberson »

[D] 5rk1/p2n1pp1/1rnq3p/8/2QP4/P2BBP2/5P1P/R4RK1 b - - 0 20

In this position, it only counts 4 isolated pawns for white and 1 for black. I chose to not penalize passers as isolated.

Obonus after PawnEval -340
Ebonus after PawnEval -800

The above is from the white perspective in millipawns and covers the sum of both black and white pawn penalties plus the bonus for the one white passer. The opening bonus for a white passer on d4 is 120 millipawns.

The overall final static eval (no search) is +530 millipawns from white's perspective.

This summarizes Ares' static breakdown which is 461 lines long.

Here is the rest:
Ares
## file opened Ares1004vKnockoutPosition.fen
## Entering ParseEPDSuite and Opened data file
A B C D E F G H

8 - - - - - r k - 8
7 p - - n - p p - 7
6 - r n q - - - p 6
5 - - - - - - - - 5
4 - - Q P - - - - 4
3 P - - B B P - - 3
2 - - - - - P - P 2
1 R - - - - R K - 1

A B C D E F G H
Obonus 0 Ebonus 0 after Pawn Bonus
Intial Value 0
Value after PieceValue 0
Value after Material Imbalance adjustement 0
Value after WonEndgames 0
value after DrawnEnding 0
White King and Black King Positions 6 62
value before PawnEval 0
Obonus before PawnEval 0
Ebonus before PawnEval 0
value after Pawn values added 800
value after Ending Pawn values added 833
Pawn Eval
White Pawns
A B C D E F G H

8 - - - - - - - - 8
7 - - - - - - - - 7
6 - - - - - - - - 6
5 - - - - - - - - 5
4 - - - 1 - - - - 4
3 1 - - - - 1 - - 3
2 - - - - - 1 - 1 2
1 - - - - - - - - 1

A B C D E F G H

Black Pawns
A B C D E F G H

8 - - - - - - - - 8
7 1 - - - - 1 1 - 7
6 - - - - - - - 1 6
5 - - - - - - - - 5
4 - - - - - - - - 4
3 - - - - - - - - 3
2 - - - - - - - - 2
1 - - - - - - - - 1

A B C D E F G H
Open Files
A B C D E F G H

8 - 1 1 - 1 - - - 8
7 - 1 1 - 1 - - - 7
6 - 1 1 - 1 - - - 6
5 - 1 1 - 1 - - - 5
4 - 1 1 - 1 - - - 4
3 - 1 1 - 1 - - - 3
2 - 1 1 - 1 - - - 2
1 - 1 1 - 1 - - - 1

A B C D E F G H
Closed Files
A B C D E F G H

8 1 - - 1 - 1 1 1 8
7 1 - - 1 - 1 1 1 7
6 1 - - 1 - 1 1 1 6
5 1 - - 1 - 1 1 1 5
4 1 - - 1 - 1 1 1 4
3 1 - - 1 - 1 1 1 3
2 1 - - 1 - 1 1 1 2
1 1 - - 1 - 1 1 1 1

A B C D E F G H
White Open Files
A B C D E F G H

8 - 1 1 - 1 - 1 - 8
7 - 1 1 - 1 - 1 - 7
6 - 1 1 - 1 - 1 - 6
5 - 1 1 - 1 - 1 - 5
4 - 1 1 - 1 - 1 - 4
3 - 1 1 - 1 - 1 - 3
2 - 1 1 - 1 - 1 - 2
1 - 1 1 - 1 - 1 - 1

A B C D E F G H
Black Open Files
A B C D E F G H

8 - 1 1 1 1 - - - 8
7 - 1 1 1 1 - - - 7
6 - 1 1 1 1 - - - 6
5 - 1 1 1 1 - - - 5
4 - 1 1 1 1 - - - 4
3 - 1 1 1 1 - - - 3
2 - 1 1 1 1 - - - 2
1 - 1 1 1 1 - - - 1

A B C D E F G H
WPasserBonus beginning PawnEval 0
BPasserBonus beginning PawnEval 0
PawnObonus beginning PawnEval 0
PawnEbonus beginning PawnEval 0
White: F pawn
PawnObonus = -100
PawnEbonus = -200
Isolated F pawn
WPasserBonus after hidden passers = 0
Doubled Pawn
White: H pawn
PawnObonus = -190
PawnEbonus = -380
Isolated H pawn
WPasserBonus after hidden passers = 0
White: A pawn
Isolated A pawn
WPasserBonus after hidden passers = 0
White: F pawn
PawnObonus = -380
PawnEbonus = -760
Isolated F pawn
WPasserBonus after hidden passers = 0
White: D pawn
PawnObonus = -490
PawnEbonus = -980
Isolated D pawn
Passed Pawn
PawnObonus = after PAWNCENTER -430
PawnEbonus = after PAWNCENTER -980
White Pawn count 5
White Pawn Value 137
White PawnObonus -430
White PawnEbonus -980
Simple Passer on Rank 4 Column 4
WPasserBonus 120
Black: H pawn
BPasserBonus after hidden passers = 0
Black: A pawn
PawnObonus = -340
PawnEbonus = -800
Isolated A pawn
BPasserBonus after hidden passers = 0
Black: F pawn
BPasserBonus after hidden passers = 0
Black: G pawn
BPasserBonus after hidden passers = 0
PawnObonus = after PAWNCENTER -340
PawnEbonus = after PAWNCENTER -800
Black Pawn count 4
Black Pawn Value 5
Black PawnObonus -340
Black PawnEbonus -800
Obonus after the main Pawn Code -340
Ebonus after the main Pawn Code -800
WPasserBonus after Main Pawn Code 120
BPasserBonus after Main Pawn Code 0
Ebonus after friendly king near white passer -724
Ebonus after opposing king near white passer -800
WPasserBonus after Blocking Adjustment 123
Ebonus after White guaranteed promo Adjustment -800
BPasserBonus after Main Pawn Code 0
Ebonus after Black guaranteed promo Adjustment -800
value after PawnEval 965
Obonus after PawnEval -340
Ebonus after PawnEval -800
Obonus after White Passer bonuses -217
Ebonus after White Passer bonuses -554
Obonus after Black Passer bonuses -217
Ebonus after Black Passer bonuses -554
Obonus after White King piece square -7
Ebonus after White King piece square -704
White King wval after king-king distance 0
White King wval King close to opposing passer 0
Obonus after Black King piece square -217
Ebonus after Black King piece square -554
Black King bval after king-king distance 0
Black King bval King close to opposing passer -56
KingEval Return value 56
value after KingEval 1021
value First Stage O/E Bonus 748
Stage = 4 MAXGAMESTAGE = 24
value after DrawishEnding 748
Value Completely after Rule of Square 748
Ebonus after White Pawns On Opponent Bishop Color 0
Ebonus after Black Pawns On Opponent Bishop Color 0
Obonus after Traps bonuses 0
Ebonus after Traps bonuses 0
Obonus after White Pawn Shield -735
Ebonus after White Pawn Shield 0
Obonus after Black Pawn Shield -700
Ebonus after Black Pawn Shield 0
----------------- Attack on White /Defense Code ------
Piece counts attacking White King
Knights 0 Bishops 0
Rooks 0 Queens 1
Kings 0
AttackCount Piece Attacks 4
AttackCount after PieceAttacks added in 4
AttackCounts value Before AttackCount factored in 0
PawnDefects = 1
AttackCounts value After AttackCount factored in 1030
PieceAttacks = 1
AttackCounts value After scaling 0
AttackCounts value After Tropism Equation 1 factored in 30
OppPieces
A B C D E F G H

8 - - - - - 1 - - 8
7 - - - 1 - - - - 7
6 - 1 1 1 - - - - 6
5 - - - - - - - - 5
4 - - - - - - - - 4
3 - - - - - - - - 3
2 - - - - - - - - 2
1 - - - - - - - - 1

A B C D E F G H
kingfile
A B C D E F G H

8 - - - - - 1 1 1 8
7 - - - - - 1 1 1 7
6 - - - - - 1 1 1 6
5 - - - - - 1 1 1 5
4 - - - - - 1 1 1 4
3 - - - - - 1 1 1 3
2 - - - - - 1 1 1 2
1 - - - - - 1 1 1 1

A B C D E F G H
AttackCounts value After Tropism Equation 2 factored in 40
OppMajors
A B C D E F G H

8 - - - - - 1 - - 8
7 - - - - - - - - 7
6 - 1 - 1 - - - - 6
5 - - - - - - - - 5
4 - - - - - - - - 4
3 - - - - - - - - 3
2 - - - - - - - - 2
1 - - - - - - - - 1

A B C D E F G H
OpenFiles
A B C D E F G H

8 - 1 1 - 1 - - - 8
7 - 1 1 - 1 - - - 7
6 - 1 1 - 1 - - - 6
5 - 1 1 - 1 - - - 5
4 - 1 1 - 1 - - - 4
3 - 1 1 - 1 - - - 3
2 - 1 1 - 1 - - - 2
1 - 1 1 - 1 - - - 1

A B C D E F G H
AttackCounts value After Tropism Equation 3 factored in -20
AttackCounts value After Diagonal Attacks on White King side 0
AttackCounts value After Diagonal Attacks on White QUeen side 0
AttackCounts value After Queen existance adjustment 0
AttackCounts value After defensevalue adjustment -100
Obonus after White King Attack/Defense bonuses -600
Ebonus after White King Attack/Defense bonuses 0
----------------- Attack on Black /Defense Code ------
Piece counts attacking Black King
Knights 0 Bishops 1
Rooks 0 Queens 1
Kings 0
AttackCount Piece Attacks 5
AttackCount after PieceAttacks added in 5
AttackCounts value Before AttackCount factored in 0
PawnDefects = 0
AttackCounts value After AttackCount factored in 655
PieceAttacks = 2
AttackCounts value After scaling 327
AttackCounts value After Tropism Equation 1 factored in 327
OppPieces
A B C D E F G H

8 - - - - - - - - 8
7 - - - - - - - - 7
6 - - - - - - - - 6
5 - - - - - - - - 5
4 - - 1 - - - - - 4
3 - - - 1 1 - - - 3
2 - - - - - - - - 2
1 1 - - - - 1 - - 1

A B C D E F G H
kingfile
A B C D E F G H

8 - - - - - 1 1 1 8
7 - - - - - 1 1 1 7
6 - - - - - 1 1 1 6
5 - - - - - 1 1 1 5
4 - - - - - 1 1 1 4
3 - - - - - 1 1 1 3
2 - - - - - 1 1 1 2
1 - - - - - 1 1 1 1

A B C D E F G H
AttackCounts value After Tropism Equation 2 factored in 327
OppMajors
A B C D E F G H

8 - - - - - - - - 8
7 - - - - - - - - 7
6 - - - - - - - - 6
5 - - - - - - - - 5
4 - - 1 - - - - - 4
3 - - - - - - - - 3
2 - - - - - - - - 2
1 1 - - - - 1 - - 1

A B C D E F G H
OpenFiles
A B C D E F G H

8 - 1 1 - 1 - - - 8
7 - 1 1 - 1 - - - 7
6 - 1 1 - 1 - - - 6
5 - 1 1 - 1 - - - 5
4 - 1 1 - 1 - - - 4
3 - 1 1 - 1 - - - 3
2 - 1 1 - 1 - - - 2
1 - 1 1 - 1 - - - 1

A B C D E F G H
AttackCounts value After Tropism Equation 3 factored in 297
AttackCounts value After Diagonal Attacks on Black QUeen side 297
AttackCounts value After Diagonal Attacks on Black King side 317
AttackCounts value After Queen existance adjustment 317
AttackCounts value After defensevalue adjustment -383
Obonus after Black King Attack/Defense bonuses -983
Ebonus after Black King Attack/Defense bonuses 0
Obonus after White/Black Pawn Storm -983
Ebonus after White/Black Pawn Storm 0
White and Black Majors on 7th 0 0
Obonus after White Majors on 7th bonus -983
Ebonus after White Majors on 7th bonus 0
Obonus after Black Majors on 7th bonus -983
Ebonus after Black Majors on 7th bonus 0
Value before DynamicPieceAdjustments 748
Value after DynamicPieceAdjustments 686
Value after stage scaled bonuses -133
value after PawnPhalanx -133
value after Black EDPAWNBLOCKED -133
value after White EDPAWNBLOCKED -133
value after Black Pieces Attacking backwards pawns -133
Obonus after White Pieces Attacking Center 60
Obonus after Black Pieces Attacking Center 0
Ebonus after Black Pieces Attacking Center 0
White Knight 0 White Knight Value 0
Black Knight on 42
Black Knight Mobility Count 7
Black Knight Mobility SCount 7
Black Knight on 51
Black Knight Mobility Count 4
Black Knight Mobility SCount 4
Black Knight 2 Black Knight Value 0
value after KnightEval -83
Obonus after KnightEval -70
Ebonus after KnightEval -170
White Bishop on 19
White Bishop Obonus after PST 20
White Bishop Ebonus after PST 30
White Bishop Mobility Count 7
White Bishop Obonus after Mobility 310
White Bishop Ebonus after Mobility 320
White Bishop Obonus after Fianchetoe 310
White Bishop on 20
White Bishop Obonus after PST 330
White Bishop Ebonus after PST 350
White Bishop Mobility Count 5
White Bishop Obonus after Mobility 580
White Bishop Ebonus after Mobility 600
White Bishop Obonus after Fianchetoe 580
White Bishop value after Bishop Pair 500
Black Bishop value after Bishop Pair 0
White Bishops 2 White Bishops Value 500
Black Bishops 0 Black Bishops Value 0
value after BishopEval 417
Obonus after BishopEval 510
Ebonus after BishopEval 430
White Rook on 0
White Rook Mobility Count 5
Opening White Rook Mobility 140
Obonus after White Rook Mobility 650
Ending White Rook Mobility 280
Ebonus after White Rook Mobility 710
White Rook on 5
White Rook Mobility Count 4
Opening White Rook Mobility 105
Obonus after White Rook Mobility 755
Ending White Rook Mobility 210
Ebonus after White Rook Mobility 920
White Rooks 2 White Rook Value 0
Black Rook on 41
Black Rook Mobility Count 8
Opening Black Rook Mobility 170
Obonus after Black Rook Mobility 585
Endgame Black Rook Mobility 340
Ebonus after Black Rook Mobility 580
Rook on Open File
Obonus after Rook Open File 265
Ebonus after Rook Open File 440
Black Rook on 61
Black Rook Mobility Count 5
Opening Black Rook Mobility 140
Obonus after Black Rook Mobility 125
Endgame Black Rook Mobility 280
Ebonus after Black Rook Mobility 160
Black Rooks 2 Black Rook Value 0
value after RookEval 417
Obonus after RookEval 125
Ebonus after RookEval 160
White Queen on 26
White Queen Mobility Count 14
White Queen Mobility Opening Value 410
White Queen Mobility Opening Value 820
Obonus after White Queen Mob 535
Ebonus after White Queen Mob 980
White Queen Safe Mobility Count 14
Obonus after White Queen Safe Mob 535
Ebonus after White Queen Safe Mob 980
White Queens 1 White Queen Value 0
Black Queen on 43
Black Queen Mobility Count 15
Black Queen Mobility Opening Value 420
Black Queen Mobility Opening Value 840
Obonus after Black Queen Mob 115
Ebonus after Black Queen Mob 140
Black Queen Safe Mobility Count 15
Obonus after Black Queen Safe Mob 115
Ebonus after Black Queen Safe Mob 140
Black Queens 1 Black Queen Value 0
value after QueenEval 417
Obonus after QueenEval 115
Ebonus after QueenEval 140
Value after Last Stage bonuses 536
Stage 4
White Passer Bonus 123
Black Passer Bonus 0
pieces 10 TotalWPieces 5 TotalBPieces 5
WNumPawns 5 BNumPawns 4
Obonus 115 Ebonus 140
value after HasMatingMaterial Adjustment 536
value after Pawns vs no Pawns Adjustment 536
Total Score (White Perspective) 536
After Pawns nearly equal adjustment: Total Score (White Perspective) 536
value after Clustering idea 530
1
CRoberson
Posts: 2056
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Lone minor piece penalty - What did Larry mean?

Post by CRoberson »

Thanks for the help guys.

There was the tactical issue as Kevin pointed out. This is actually interesting as a pin detector would be something that helps more at blitz than at much longer TC's. It will still help at longer TC's, but I think the gain diminishes with ply. I am aware of some programs with pin detectors - another reason the ranking lists need longer TC's.

Also, comparing Bob's static eval output and mine, I found an issue. I am double penalizing the h and f pawns. They are penalized for being isolated and/or doubled, then they are penalized again for being a bad pawn shield for the king. Easy to fix, but time consuming to tune. Doable though.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Lone minor piece penalty - What did Larry mean?

Post by hgm »

lkaufman wrote: I'm almost certain that I meant that the penalty applies regardless of the number of pawns. I had totally forgotten about this; maybe we'll try it in Komodo, although probably other things we do are heavily redundant with this. Perhaps the biggest effect is that if you are up the Exchange (rook for minor piece, regardless of the pawn count), you should try extra hard to exchange all the remaining pieces.
This is actually yet another manifestation of the more general elephantiasis effect:

When adding, say, Knights on each side of a R vs. B situation, the Rook will lose value because it has to fear the Knights (avoid N vs R trades), while the B side does not have to avoid B vs N trades. So the higher piece (here R) has to be slightly depreciated for each present opponent piece of lower value. (That is, there is a material term C*(hisRooks*myMinors - myRooks*hisMinors) in the evaluation.)

It is the same effect as that causes Q vs BNN to be better than QR vs RBNN, that causes QQQ-QQRB to be favorable for the RB side where Q-RB is highly favorable for the Q side, and that causes QQQ to lose badly against 7N. (In those cases also because of C'*(hisQueens*myMinors - myQueens*hisMinors) and C"*(hisQueens*myRooks - myQueens*hisRooks) eval terms.)