Alternating scores during ID

Discussion of chess software programming and technical issues.

Moderator: Ras

micron
Posts: 155
Joined: Mon Feb 15, 2010 9:33 am
Location: New Zealand

Alternating scores during ID

Post by micron »

My engine Spandrel shows regular alternation of scores during iterative deepening from the start position. Scores for odd depths are greater than for even depths, initially by about a quarter of a pawn, reducing to about one eighth.

Code: Select all

 1   0.28  c4
 2   0.00  c4 c5 
 3   0.24  c4 c5 Nc3 
 4   0.04  c4 c5 d4 e6 
 5   0.24  c4 c5 Nc3 Nc6 Nf3 
 6   0.04  c4 c5 Nf3 Nc6 d4 e6 
 7   0.20  c4 c5 Nf3 Nc6 d4 cxd4 Nxd4 
 8   0.04  c4 c5 Nf3 Nc6 Nc3 Nf6 d4 e6 
 9   0.22  d4 c5 dxc5 Na6 Nc3 e6 Qd4 Nxc5 Bf4 
10   0.04  d4 c5 dxc5 Na6 Nc3 Nxc5 b4 Na6 Ba3 Nf6 
11   0.20  e3 e5 d4 exd4 exd4 Nc6 d5 Ne5 c3 Bc5 Bf4 
12   0.08  e3 e5 d4 exd4 exd4 Nf6 Nf3 Be7 Bd3 O-O O-O c5 
13   0.24  e4 e5 Nf3 Nf6 Nc3 Nc6 Bb5 Bb4 O-O O-O d3 d6 Be3 
14   0.06  e4 e5 Nf3 Nf6 Nc3 Nc6 Bb5 Bb4 O-O O-O a3 Bxc3 dxc3 Nxe4 
15   0.18  e4 e5 Nf3 Nf6 Nxe5 Qe7 d4 d6 Nf3 Qxe4+ Be3 Ng4 Nbd2 Qe7 Nc4 Nxe3 
16   0.18  e4 e5 Nf3 Nf6 Nc3 Nc6 Bc4 Bc5 O-O O-O a3 Bb6 d3 d6 Be3 Be6 
17   0.22  e4 e5 Nf3 Nf6 d4 exd4 e5 Ne4 Qxd4 d5 exd6e.p. Nxd6 Be3 Nc6 Qf4 Bf5 c4 
18   0.12  e4 e6 Nc3 d5 d4 c6 Nf3 Nf6 exd5 exd5 Bd3 Be7 O-O O-O Bf4 Be6 Ng5 Bg4 
19   0.26  e4 e6 Nc3 d5 d4 Bb4 exd5 exd5 a3 Bxc3+ bxc3 Ne7 Nf3 O-O Be2 Bf5 O-O Re8 Bf4 c6 
20   0.12  e4 e6 Nf3 d5 exd5 exd5 c4 Nf6 cxd5 Nxd5 Bc4 Qe7+ Be2 Be6 Nd4 Nc6 Nxe6 Qxe6 O-O O-O-O d4
Is the alternation a reasonable expression of white's first-move advantage?

Robert P.
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: Alternating scores during ID

Post by Edmund »

Much has been said on this topic in a thread from 14 years ago:
http://groups.google.com/group/rec.game ... b00afc9dc4

regards
Edmund
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Alternating scores during ID

Post by wgarvin »

This "odd-even effect" has been discussed here before, here's a thread from about 2 years ago:
http://talkchess.com/forum/viewtopic.php?t=28167

I remember suggesting in that thread that a side-to-move bonus should be set to about half the average value of being able to play one move (about half the value of a tempo). Reason being that on average, side-to-move will get to play 0.5 moves more than the opponent before the game is over, so (all else being equal) if the outcome of the game isn't decided yet, side-to-move should have a slightly better chance of forcing a win.
Ferdy
Posts: 4851
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Alternating scores during ID

Post by Ferdy »

micron wrote:My engine Spandrel shows regular alternation of scores during iterative deepening from the start position. Scores for odd depths are greater than for even depths, initially by about a quarter of a pawn, reducing to about one eighth.

Code: Select all

 1   0.28  c4
 2   0.00  c4 c5 
 3   0.24  c4 c5 Nc3 
 4   0.04  c4 c5 d4 e6 
 5   0.24  c4 c5 Nc3 Nc6 Nf3 
 6   0.04  c4 c5 Nf3 Nc6 d4 e6 
 7   0.20  c4 c5 Nf3 Nc6 d4 cxd4 Nxd4 
 8   0.04  c4 c5 Nf3 Nc6 Nc3 Nf6 d4 e6 
 9   0.22  d4 c5 dxc5 Na6 Nc3 e6 Qd4 Nxc5 Bf4 
10   0.04  d4 c5 dxc5 Na6 Nc3 Nxc5 b4 Na6 Ba3 Nf6 
11   0.20  e3 e5 d4 exd4 exd4 Nc6 d5 Ne5 c3 Bc5 Bf4 
12   0.08  e3 e5 d4 exd4 exd4 Nf6 Nf3 Be7 Bd3 O-O O-O c5 
13   0.24  e4 e5 Nf3 Nf6 Nc3 Nc6 Bb5 Bb4 O-O O-O d3 d6 Be3 
14   0.06  e4 e5 Nf3 Nf6 Nc3 Nc6 Bb5 Bb4 O-O O-O a3 Bxc3 dxc3 Nxe4 
15   0.18  e4 e5 Nf3 Nf6 Nxe5 Qe7 d4 d6 Nf3 Qxe4+ Be3 Ng4 Nbd2 Qe7 Nc4 Nxe3 
16   0.18  e4 e5 Nf3 Nf6 Nc3 Nc6 Bc4 Bc5 O-O O-O a3 Bb6 d3 d6 Be3 Be6 
17   0.22  e4 e5 Nf3 Nf6 d4 exd4 e5 Ne4 Qxd4 d5 exd6e.p. Nxd6 Be3 Nc6 Qf4 Bf5 c4 
18   0.12  e4 e6 Nc3 d5 d4 c6 Nf3 Nf6 exd5 exd5 Bd3 Be7 O-O O-O Bf4 Be6 Ng5 Bg4 
19   0.26  e4 e6 Nc3 d5 d4 Bb4 exd5 exd5 a3 Bxc3+ bxc3 Ne7 Nf3 O-O Be2 Bf5 O-O Re8 Bf4 c6 
20   0.12  e4 e6 Nf3 d5 exd5 exd5 c4 Nf6 cxd5 Nxd5 Bc4 Qe7+ Be2 Be6 Nd4 Nc6 Nxe6 Qxe6 O-O O-O-O d4
Is the alternation a reasonable expression of white's first-move advantage?

Robert P.
Yes it is always an advantage to play first in the early part of the game. The way the score are progressing, it is also a sign of a bugless program. Probably also evaluation of pawn structures should be tuned and improved. Piece interaction to pawn structures should be added and tuned.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Alternating scores during ID

Post by Sven »

By adding a "side to move bonus" to your evaluation function, where the bonus could be about +0.10 ... +0.15 in the opening (maybe less?) and decreasing towards the endgame, your odd-even effect would certainly disappear.

Btw, regarding the PV example you have shown I'd like to add that the final PV of your program looks a bit unusual. The position after

Code: Select all

e4 e6 Nf3 d5 exd5 exd5 c4 Nf6 cxd5 Nxd5 Bc4 Qe7+ Be2 Be6 Nd4 Nc6 Nxe6 Qxe6 O-O O-O-O d4
is clearly much better for black, due to the weak pawn on d4 and other positional factors (in fact Black wins the pawn, e.g. Nf6 Be3 Bc5 -+). So there could also be another problem with your evaluation.

Sven