Finding the move

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Finding the move

Post by outAtime »

Evert wrote:
outAtime wrote:I find it difficult to see what would cause this switch since the knight appears well posted on the central square, PST etc would make it difficult to move Ng6. Any ideas? How do these engines decide to switch from Bd7 to Ng6?
Well, I have no idea why it does it, but Jazz does switch to Ng6 at 11 ply and seems to stick with it. Note that it seems to badly misevaluate the position (based on the evaluation by stronger engines posted earlier), or at least not like it very much for black, with a score around -0.5.

[ 1] -1.02 0.00 0 (EBR = 0.00) 0 / 0 Nxf3
[ 2] -0.46 0.00 384 (EBR = 20.34) 4 / 0 Nxf3 Rxf3 Bd4 Kh2
[ 3] -0.05 0.01 1002 (EBR = 1.42) 5 / 0 Nxf3 Rxf3 Bd4 Kh2 Qe1
[ 4] -0.42 0.03 4490 (EBR = 4.91) 6 / 0 Nxf3 Rxf3 Bd4 Kh2 Qe1 Re2
[ 5] -0.49 0.07 17902 (EBR = 2.10) 7 / 0 Nxf3 Rxf3 Bd4 Kf1 Kh8 Re2 Qd8
[ 6] -0.64 0.10 34021 (EBR = 0.80) 8 / 0 Nxf3 Rxf3 Bd4 Kf1 Re8 Re2 Be5 Re3
[ 7] -0.61 0.16 70705 (EBR = 1.87) 9 / 0 Nxf3 Rxf3 Bd4 Kg2 Re8 Nb5 Be5 Bxe5 dxe5
[ 8] -0.77 0.26 131229 (EBR = 1.54) 10 / 0 Nxf3 Rxf3 Bd4 Kg2 Re8 Nb5 Be5 Bxe5 dxe5 Rd3
[ 9] -0.77 0.45 272995 (EBR = 2.01) 11 / 0 Nxf3 Rxf3 Bd4 Kh2 Qe1 Qd1 Qxd1 Rxd1 Rf6 Re1 Rg6
[10] -0.72 0.77 525615 (EBR = 1.68) 12 / 3 Nxf3 Rxf3 Bd4 Kh2 Re8 Nb5 Be5 Bxe5 dxe5 Rd3 f4 Nc3 fxg3 Rxg3 Kh8
<11> 4.66 3680762 -0.81 -> -0.57 13 / 0 Ng6 Ne2 Nxf4 Nxf4 Qg5 Bh5 Be5 h4 Qh6 Rg2 Kh8
[11] -0.57 4.78 3775344 (EBR = 12.47) 11 / 0 Ng6 Ne2 Nxf4 Nxf4 Qg5 Bh5 Be5 h4 Qh6 Rg2 Kh8
[12] -0.50 7.68 6227151 (EBR = 0.72) 12 / 0 Ng6 Ne2 Nxf4 Nxf4 Qg5 Bh5 Be5 h4 Qh6 Rg2 Kh8 Qf3
[13] -0.59 14.38 11899703 (EBR = 2.31) 14 / 0 Ng6 Ne2 Nxf4 Nxf4 Qg5 Bh5 Be5 h4 Qh6 Qd1 Bd4 Kh1 Qg7 Qb3
[14] -0.59 23.98 20040165 (EBR = 1.43) 14 / 5 Ng6 Ne2 Nxf4 Nxf4 Qg5 Kh2 Be5 Bh1 Re8 Re2 Kh8 Re1 Bd7 Qxb7 Bxf4 gxf4 Rxe2 Rxe2 Qxf4
[15] -0.59 39.63 33623841 (EBR = 1.63) 15 / 0 Ng6 Ne2 Nxf4 Nxf4 Qg5 Kh2 Be5 Bh1 Re8 Re2 Kh8 Qb5 Rg8 Re3 Qh6
[16] -0.55 134.07 109520874 (EBR = 6.03) 17 / 0 Ng6 Ne2 Bd7 Kh2 Rb8 a4 Kh8 Bh5 Be5 Bxe5 dxe5 Qe3 Rg8 d6 Qe6 Qxc5 Bxa4
--> Ng6 -0.55
Its interesting to me that you are getting alot of Nxf3, then a switch at 11 ply. Im not having trouble discarding Nxf3, Im having trouble discarding just about everything else :)
outAtime
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Finding the move

Post by outAtime »

I think id rather it look at Nxf3 for 10 ply, than switch to Ng6 rather than look at Nxf3 for 3 or 4 ply then switch to Bd7 and never get off it, or a7-a6 :p
outAtime
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: Finding the move

Post by F. Bluemers »

outAtime wrote:Is there any particular eval element which helps strong engines to find 19... Ng6 here?

Image

Rybka 3 and Stockfish 1.6.3 both have a look at Nxf3 (quickly rejected) and Bd7, eventually switching to Ng6. I find it difficult to see what would cause this switch since the knight appears well posted on the central square, PST etc would make it difficult to move Ng6. Any ideas? How do these engines decide to switch from Bd7 to Ng6?
Maybe better search??
It might not have to do with eval after all...
Anyway,I think it's a bad idea to tune an engine with one position.
Once it will play the move you like,it will do worse in ten(or more) other positions.
Best
Fonzy
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: Finding the move

Post by gladius »

GarboChess JS has only a mobility+psq eval, and it picks Ng6 at depth 10. Given some stronger engines like Houdini take longer to find it, I'd say it's just search luck.

Ply:10 Score:181 Nodes:2184140 NPS:151245 Ng6 Re2 Qd8 Bd2 f4 g4 Bd4+ Kh1 Qh4 Rh2 Re8
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Finding the move

Post by Ferdy »

no, well it seems increasing the score for knight attacking a bishop will not help the knight move away from a square where it is _already_ attacking a bishop to a (worse (PST etc)) square to attack a different bishop :)
[d]r1b2rk1/pp2q1bp/3p4/2pPnp2/2P2B2/1QN2BPP/PP1R4/5RK1 b - - 4 19
do like this:
1. add/tune score for knights that attack opp bishops, (guess you already have this)
2. add/tune score for bishops that attack opp knights

if knight is in e5, yes it attacks a bishop in f3, but the knight in e5 is also attacked by a bishop in f4. OTOH if the knight is in g6 it now attacks bishop at f4, and the knight in g6 is not attacked by any other opp pieces.
And also if the knight is in g6, the bishop in g7 now attacks opp knight in c3 :)

These works for me, but then again tuning these eval to improve overall strength is probably not enough, you also need to tune other parts of your program, like its relationships with pst values, knight move reduction heuristics, knight move extension, knight move open file blockade and many others, this will take a lot of testing time.