I don't know how to improve tactical play. Game below is a typical game of Skipper. Totally blown away by tactics. I don't reduce captures and checks when LMR. Can you prune captures when razoring/futility pruning ?
In the game below 20 Qc4 seems to me a bad move.
[Trading two minor pieces for a rook and two pawns earlier in the game was bad too (move 15)]
[pgn]
[Site "http://lichess.org/p7qHLUoY"]
[Date "2014.03.21"]
[White "Anonymous"]
[Black "AI-level-7"]
[Result "0-1"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "68"]
[Variant "Standard"]
1. e4 e6 2. Nf3 Be7 3. Nc3 d5 4. Bb5+ c6 5. Bd3 dxe4 6. Bxe4 f5 7. Bd3 Nf6 8. O-O b5 9. a3 Bd6 10. Qe2 O-O 11. Rfe1 a5 12. h3 Rfe8 13. Nd4 a4 14. Qf3 Ra6 15. Ndxb5 cxb5 16. Bxb5 Rb6 17. Bxe8 Qxe8 18. d4 Bb7 19. Qe2 Bc7 20. Qc4 Qg6 21. g4 Nxg4 22. Qxc7 Ne5+ 23. Kf1 Qg2+ 24. Ke2 Qf3+ 25. Kd2 Qxf2+ 26. Kd1 Bf3+ 27. Ne2 Qxd4+ 28. Bd2 Nc4 29. Qc8+ Kf7 30. Qc7+ Kf6 31. Qf4 Nxb2+ 32. Kc1 Nd3+ 33. Kd1 Nf2+ 34. Kc1 Qb2# 0-1
[/pgn]
How to improve tactical play ?
Moderator: Ras
-
ZirconiumX
- Posts: 1362
- Joined: Sun Jul 17, 2011 11:14 am
- Full name: Hannah Ravensloft
Re: How to improve tactical play ?
Looks to me like you might want to add some king safety aspects to your evaluation, like pawn shelters, and pawn storms, and probably king tropism too.Henk wrote:I don't know how to improve tactical play. Game below is a typical game of Skipper. Totally blown away by tactics. I don't reduce captures and checks when LMR. Can you prune captures when razoring/futility pruning ?
In the game below 20 Qc4 seems to me a bad move.
[Trading two minor pieces for a rook and two pawns earlier in the game was bad too (move 15)]
[pgn]
[Site "http://lichess.org/p7qHLUoY"]
[Date "2014.03.21"]
[White "Anonymous"]
[Black "AI-level-7"]
[Result "0-1"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "68"]
[Variant "Standard"]
1. e4 e6 2. Nf3 Be7 3. Nc3 d5 4. Bb5+ c6 5. Bd3 dxe4 6. Bxe4 f5 7. Bd3 Nf6 8. O-O b5 9. a3 Bd6 10. Qe2 O-O 11. Rfe1 a5 12. h3 Rfe8 13. Nd4 a4 14. Qf3 Ra6 15. Ndxb5 cxb5 16. Bxb5 Rb6 17. Bxe8 Qxe8 18. d4 Bb7 19. Qe2 Bc7 20. Qc4 Qg6 21. g4 Nxg4 22. Qxc7 Ne5+ 23. Kf1 Qg2+ 24. Ke2 Qf3+ 25. Kd2 Qxf2+ 26. Kd1 Bf3+ 27. Ne2 Qxd4+ 28. Bd2 Nc4 29. Qc8+ Kf7 30. Qc7+ Kf6 31. Qf4 Nxb2+ 32. Kc1 Nd3+ 33. Kd1 Nf2+ 34. Kc1 Qb2# 0-1
[/pgn]
http://chessprogramming.wikispaces.com/King+Safety
Matthew:out
tu ne cede malis, sed contra audentior ito
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: How to improve tactical play ?
21 g4 destroys the pawn shelter. A real kamikaze move. My piece square table says that pawns f2 g2 and h2 should stay there. Maybe these bonuses are not enough.ZirconiumX wrote:Looks to me like you might want to add some king safety aspects to your evaluation, like pawn shelters, and pawn storms, and probably king tropism too.Henk wrote:I don't know how to improve tactical play. Game below is a typical game of Skipper. Totally blown away by tactics. I don't reduce captures and checks when LMR. Can you prune captures when razoring/futility pruning ?
In the game below 20 Qc4 seems to me a bad move.
[Trading two minor pieces for a rook and two pawns earlier in the game was bad too (move 15)]
[pgn]
[Site "http://lichess.org/p7qHLUoY"]
[Date "2014.03.21"]
[White "Anonymous"]
[Black "AI-level-7"]
[Result "0-1"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "68"]
[Variant "Standard"]
1. e4 e6 2. Nf3 Be7 3. Nc3 d5 4. Bb5+ c6 5. Bd3 dxe4 6. Bxe4 f5 7. Bd3 Nf6 8. O-O b5 9. a3 Bd6 10. Qe2 O-O 11. Rfe1 a5 12. h3 Rfe8 13. Nd4 a4 14. Qf3 Ra6 15. Ndxb5 cxb5 16. Bxb5 Rb6 17. Bxe8 Qxe8 18. d4 Bb7 19. Qe2 Bc7 20. Qc4 Qg6 21. g4 Nxg4 22. Qxc7 Ne5+ 23. Kf1 Qg2+ 24. Ke2 Qf3+ 25. Kd2 Qxf2+ 26. Kd1 Bf3+ 27. Ne2 Qxd4+ 28. Bd2 Nc4 29. Qc8+ Kf7 30. Qc7+ Kf6 31. Qf4 Nxb2+ 32. Kc1 Nd3+ 33. Kd1 Nf2+ 34. Kc1 Qb2# 0-1
[/pgn]
http://chessprogramming.wikispaces.com/King+Safety
Matthew:out
King tropism may be a good idea.
Pawn storms have to do with updating piece square table[pawns] I guess.
-
JVMerlino
- Posts: 1407
- Joined: Wed Mar 08, 2006 10:15 pm
- Location: San Francisco, California
Re: How to improve tactical play ?
Two other moves to be concerned about are 31.Qf4 and 33.Kd1. Both are clearly suboptimal. In particular, 33.Kd1 leads to a Mate in 2 where 33.cxd3 leads to a Mate in 4. There is no good reason why 33.Kd1 should be played by any engine.
jm
jm
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: How to improve tactical play ?
I think my engine just captures the game and returns GAME_OVER. Should I add depth to that value. If there are many king captures that may cost a bit extra CPU time. Normally opponents are chess engines and they normally won't overlook a mate in N. My engine has no mate distance pruning.JVMerlino wrote:Two other moves to be concerned about are 31.Qf4 and 33.Kd1. Both are clearly suboptimal. In particular, 33.Kd1 leads to a Mate in 2 where 33.cxd3 leads to a Mate in 4. There is no good reason why 33.Kd1 should be played by any engine.
jm
-
Ferdy
- Posts: 4853
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: How to improve tactical play ?
Try to improve your speed more depth is better without sacrificing much the quality of move. You can reduce captures and checks with some conditions like how late it is in your move list. But first go over your move ordering methods, debug it completely. Always improve it whenever you can. You can prune captures in futility just guard it with some conditions, like bad captures, late in the move list, node type, not a hash move, bad capture history, and many others.Henk wrote:I don't know how to improve tactical play. Game below is a typical game of Skipper. Totally blown away by tactics. I don't reduce captures and checks when LMR. Can you prune captures when razoring/futility pruning ?
Move 13. Nd4 appears to be bad, perhaps you have to recheck your mobility code as well, there could be bugs there.
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: How to improve tactical play ?
My chess program doesn't have mobility code. Only values in piece square table contain extra mobility points. Computing real mobility seemed to be too expensive for you have to generate all moves.Ferdy wrote:Try to improve your speed more depth is better without sacrificing much the quality of move. You can reduce captures and checks with some conditions like how late it is in your move list. But first go over your move ordering methods, debug it completely. Always improve it whenever you can. You can prune captures in futility just guard it with some conditions, like bad captures, late in the move list, node type, not a hash move, bad capture history, and many others.Henk wrote:I don't know how to improve tactical play. Game below is a typical game of Skipper. Totally blown away by tactics. I don't reduce captures and checks when LMR. Can you prune captures when razoring/futility pruning ?
Move 13. Nd4 appears to be bad, perhaps you have to recheck your mobility code as well, there could be bugs there.
Just found out that my futility pruning doesn't help at all. Maybe the margins are not OK. It doesn't improve speed, so I might as well remove it.
Move ordering of my Chess program needs to be improved. But how ? Currently I use killers and piece square table for that.
-
JVMerlino
- Posts: 1407
- Joined: Wed Mar 08, 2006 10:15 pm
- Location: San Francisco, California
Re: How to improve tactical play ?
Yes, you need to know how far away you are from the root and add/subtract that value from your GAME_OVER value (which I assume is what you use for designating checkmate).Henk wrote:I think my engine just captures the game and returns GAME_OVER. Should I add depth to that value. If there are many king captures that may cost a bit extra CPU time. Normally opponents are chess engines and they normally won't overlook a mate in N. My engine has no mate distance pruning.JVMerlino wrote:Two other moves to be concerned about are 31.Qf4 and 33.Kd1. Both are clearly suboptimal. In particular, 33.Kd1 leads to a Mate in 2 where 33.cxd3 leads to a Mate in 4. There is no good reason why 33.Kd1 should be played by any engine.
jm
Typically, in your search, if you have determined that there are no legal moves and the side to move is in check, you return (-CHECKMATE + ply), where "ply" is the distance you are from the root of the search.
This will allow your engine to play optimal moves when it is near mate (both for your engine or for the opponent).
Similar tricks are necessary when saving/probing hash table values near mate or when endgame tablebases give a Mate in N score.
jm
-
Eelco de Groot
- Posts: 4704
- Joined: Sun Mar 12, 2006 2:40 am
- Full name: Eelco de Groot
Re: How to improve tactical play ?
Move 15 was not bad actually, after three minutes it is still in the top three, only a little worse maybe than b4 but black has no choice but to go into the exchange so the initiative is for your engine, and that also counts for something where after b4 it is less forced, an engine might as well give the exchange a few extra pawn points here; in short the calculation of the exchanges seems okay, there's nothing wrong with it.
[d]1nbqr1k1/6pp/r1pbpn2/1p3p2/p2N4/P1NB1Q1P/1PPP1PP1/R1B1R1K1 w - -
27 3:26 -0.73 15.b4 axb3 16.Nxb3 Nbd7 17.Bf1 Ne5
18.Qd1 Ra7 19.d4 Nf7 20.Bb2 Bc7
21.g3 Qd6 22.Bg2 f4 23.Qf3 fxg3
24.Qxg3 Qe7 25.Qe3 Rf8 26.Nc5 Qd6
27.f4 Nd5 28.Nxd5 (471.602.164) 2284
26 3:26 -0.80 15.b3 Bc5 16.Nde2 axb3 17.cxb3 g6
18.Bb1 Qe7 19.d4 Bxa3 20.Bd3 Bxc1
21.Raxc1 e5 22.Qg3 e4 23.Bxb5 cxb5
24.Qxb8 e3 25.Nd5 Nxd5 26.Rxc8 exf2+
27.Kxf2 Qe3+ 28.Kf1 (471.602.164) 2284
26 3:26 -0.94 15.Ndxb5 cxb5 16.Bxb5 Rb6 17.Bxe8 Qxe8
18.Qe3 Qc6 19.d4 Na6 20.Qf3 Qxf3
21.gxf3 Bd7 22.Ne2 Rc6 23.c3 Nd5
24.Bd2 Nac7 25.Rab1 f4 26.Kg2 g5
27.Rbc1 Rc4 28.Rh1 (471.602.164) 2284
best move: b2-b4 time: 3:26.483 min n/s: 2.284.119 nodes: 471.602.164
21.g4 is bad, but your engine plays all the moves after move 21 just like it should, Qxc7, Ke2, Kd2 are correct but nothing helps anymore. If you can just teach it that the white king position is really bad there after 20 Qc4 Qg6 21. g4, and especially at the end of te variation it sees here, I think your engine will know more about king safety.
[d]1nbqr1k1/6pp/r1pbpn2/1p3p2/p2N4/P1NB1Q1P/1PPP1PP1/R1B1R1K1 w - -
27 3:26 -0.73 15.b4 axb3 16.Nxb3 Nbd7 17.Bf1 Ne5
18.Qd1 Ra7 19.d4 Nf7 20.Bb2 Bc7
21.g3 Qd6 22.Bg2 f4 23.Qf3 fxg3
24.Qxg3 Qe7 25.Qe3 Rf8 26.Nc5 Qd6
27.f4 Nd5 28.Nxd5 (471.602.164) 2284
26 3:26 -0.80 15.b3 Bc5 16.Nde2 axb3 17.cxb3 g6
18.Bb1 Qe7 19.d4 Bxa3 20.Bd3 Bxc1
21.Raxc1 e5 22.Qg3 e4 23.Bxb5 cxb5
24.Qxb8 e3 25.Nd5 Nxd5 26.Rxc8 exf2+
27.Kxf2 Qe3+ 28.Kf1 (471.602.164) 2284
26 3:26 -0.94 15.Ndxb5 cxb5 16.Bxb5 Rb6 17.Bxe8 Qxe8
18.Qe3 Qc6 19.d4 Na6 20.Qf3 Qxf3
21.gxf3 Bd7 22.Ne2 Rc6 23.c3 Nd5
24.Bd2 Nac7 25.Rab1 f4 26.Kg2 g5
27.Rbc1 Rc4 28.Rh1 (471.602.164) 2284
best move: b2-b4 time: 3:26.483 min n/s: 2.284.119 nodes: 471.602.164
21.g4 is bad, but your engine plays all the moves after move 21 just like it should, Qxc7, Ke2, Kd2 are correct but nothing helps anymore. If you can just teach it that the white king position is really bad there after 20 Qc4 Qg6 21. g4, and especially at the end of te variation it sees here, I think your engine will know more about king safety.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: How to improve tactical play ?
[edit] Correction: futility pruning does improve my program significantly. I think I tested the wrong versions yesterday.Henk wrote:My chess program doesn't have mobility code. Only values in piece square table contain extra mobility points. Computing real mobility seemed to be too expensive for you have to generate all moves.Ferdy wrote:Try to improve your speed more depth is better without sacrificing much the quality of move. You can reduce captures and checks with some conditions like how late it is in your move list. But first go over your move ordering methods, debug it completely. Always improve it whenever you can. You can prune captures in futility just guard it with some conditions, like bad captures, late in the move list, node type, not a hash move, bad capture history, and many others.Henk wrote:I don't know how to improve tactical play. Game below is a typical game of Skipper. Totally blown away by tactics. I don't reduce captures and checks when LMR. Can you prune captures when razoring/futility pruning ?
Move 13. Nd4 appears to be bad, perhaps you have to recheck your mobility code as well, there could be bugs there.
Just found out that my futility pruning doesn't help at all. Maybe the margins are not OK. It doesn't improve speed, so I might as well remove it.
Move ordering of my Chess program needs to be improved. But how ? Currently I use killers and piece square table for that.