Engines or Settings for playing down in material?

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

lucasart
Posts: 3243
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Engines or Settings for playing down in material?

Post by lucasart »

titanD wrote:Are there any engines that excel at this or settings you can use on an engine that facilitate this.

I guess you could use one of those engines that lets you specify contempt for draw or some heuristics that correlate with having lots of pieces on the board. But I know nothing about any of this and just notice that I can beat any engine at 15+0 a knight up.

I don't think this should be possible, I'm not a master. The engine picks lots of stupid moves that simplify the position.
This is an interesting problem. What happens in any engine (even the strongest) is that the engine thinks of the opponent as equally skilled. That is the basic assumption of min-max.

Adding Contempt=-DrawValue helps avoid unfought 3-rep draws (where the engine is down in material it will gladly accept the repetition, not knowing the opponent is a human patzer who can easily be swindled).

Really, what you want is a strong disincentive to exchanges pieces, and to open the position making things more tactical. That's where engines shine, and human get steam-rolled (even by "weak" engines).

This is possible, by making the material evaluation asymmetric. Houdini does this if you set Contempt=2, I think. But it probably won't be as extreme as you expect, because Robert surely had a look at the elo tradeoff in self-testing to calibrate it.

Would not be hard to do a Stockfish variant that does what you want.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
User avatar
hgm
Posts: 28514
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Engines or Settings for playing down in material?

Post by hgm »

I don't think you need asymmetric eval for this. The material imbalance induces the asymmetry. A losing disadvantage always counts more heavily as the game simplifies, and proper implementation of trading gradients should automatically prime an engine playing at material odds from simplifying the game. When properly balanced this should even make it avoid material trades that are advantageous, but not advantageous enough to keep it on track towards a final win, considering the simplification it causes. The situation is very similar to Xiangqi, where the draw margin is very large, and you should be careful not to go for gains below what you need to beat the draw margin at the end of the game.

It should of course also taper the contempt towards zero as the game simplifies, so you could set it above the initial odds without hurting to much in the late end-game. It is nice to make it avoid repetition in the early middle-game even when a Rook behind, but once you are down to KRK, it would probably be prudent to take the repetition if your patzer opponent offers you the chance, rather than keeping avoiding it... But a proper implementation of contempt would do that anyway.
titanD
Posts: 94
Joined: Sun Jun 29, 2014 5:41 pm

Re: Engines or Settings for playing down in material?

Post by titanD »

Ferdy wrote:
titanD wrote:
Ferdy wrote: Can you post a sample game or two.
At your request, I did another:

1. e4 e6 2. d4 d5 3. Nc3 Bb4 4. e5 Ne7 5. Nf3 c5 6. dxc5 O-O 7. Bd2 Bd7 8.
a3 Bxc5 9. b4 Bb6 10. a4 Nc6 11. a5 Bc7 12. Bd3 h6 13. Ne2 Nxe5 14. Nxe5
Bxe5 15. c3 Qh4 16. g3 Qh3 17. f4 Qg2 18. Rg1 Qf3 19. Nc1 Qxd1+ 20. Kxd1
Bf6 21. Nb3 Rfc8 22. Nc5 Bc6 23. Kc2 d4 24. c4 Rc7 25. Rae1 Be7 26. f5 exf5
27. Bxf5 Bxc5 28. bxc5 Bb5 29. Bd3 Ba4+ 30. Kb2 Rac8 31. Ka3 Bd7 32. Re7
Bc6 33. Rxc7 Rxc7 34. Re1 Rc8 35. Re7 Kf8 36. Re5 Ra8 37. Bf5 a6 38. Bf4 g5
39. Bd2 Kg7 40. Be4 Kf6 41. Bxc6 bxc6 42. Re4 Rd8 43. h4 Kf5 44. Re7 Rf8
45. hxg5 hxg5 46. Ra7 f6 47. Rxa6 Rc8 48. Rb6 Kg4 49. a6 Kxg3 50. a7 Ra8
51. Rxc6 Rxa7+ 52. Kb4 Ra2 53. Rxf6 Rb2+ 54. Ka5 Ra2+ 55. Kb4 Rb2+ 56. Ka4
Rxd2 57. c6 Ra2+ 58. Kb5 Ra7 59. Kb6 Ra3 60. c7 g4 61. c8=Q *
Which side were you playing?

I expected you were a knight up from the start position.
I see I failed to include any meta information. Sorry

I was white and black was missing his queen's knight. And I moved first. (no move in return for the piece)
titanD
Posts: 94
Joined: Sun Jun 29, 2014 5:41 pm

Re: Engines or Settings for playing down in material?

Post by titanD »

S.Taylor wrote: I don't know if todays engines are versatile at all. But the older engines had no problem. Just do set-up and remove what you want, or add what you want, and the engine will play super strong chess as usual.

But with recent engines, i never found them to be user friendly at all. Either that, or they're just full of bugs which never get attended to as it seems, no one ever complains.

Hiarcs 7 does it excellently. You would never beat it with a knight up. Even a very strong player will have to work very hard to beat it with a queen up. But Hiarcs 14, even with all the updates? No way it would work well! If it did, i can well imagine it may be full of bugs and useless.
Are you saying Hiarcs 7 is stylistically different in a way that helps asymmetric play?

Or just that the other engines are buggy when starting with non standard opening positions?

I have no problem setting up arbitrary starting positions with any engine. They just all seem to suck at playing material down and I've determined with a high degree of certainty that I'm the strongest player in the history of the world. Human at least. Some dolphins or mice may be better.
Ferdy
Posts: 4856
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Engines or Settings for playing down in material?

Post by Ferdy »

[pgn]
[Event "Knight up"]
[Site "?"]
[Date "2015.06.08"]
[Round "?"]
[White "DL"]
[Black "COMP"]
[Result "1-0"]
[TimeControl "?"]
[SetUp "1"]
[FEN "r1bqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]

1. e4 e6 2. d4 d5 3. Nc3 Bb4 4. e5 Ne7 5. Nf3 c5 6. dxc5 O-O 7. Bd2 Bd7 8.
a3 Bxc5 9. b4 Bb6 10. a4 Nc6 11. a5 Bc7 12. Bd3 h6 13. Ne2 Nxe5 14. Nxe5
Bxe5 15. c3 Qh4 16. g3 Qh3 17. f4 Qg2 18. Rg1 Qf3 19. Nc1 Qxd1+ 20. Kxd1
Bf6 21. Nb3 Rfc8 22. Nc5 Bc6 23. Kc2 d4 24. c4 Rc7 25. Rae1 Be7 26. f5 exf5
27. Bxf5 Bxc5 28. bxc5 Bb5 29. Bd3 Ba4+ 30. Kb2 Rac8 31. Ka3 Bd7 32. Re7
Bc6 33. Rxc7 Rxc7 34. Re1 Rc8 35. Re7 Kf8 36. Re5 Ra8 37. Bf5 a6 38. Bf4 g5
39. Bd2 Kg7 40. Be4 Kf6 41. Bxc6 bxc6 42. Re4 Rd8 43. h4 Kf5 44. Re7 Rf8
45. hxg5 hxg5 46. Ra7 f6 47. Rxa6 Rc8 48. Rb6 Kg4 49. a6 Kxg3 50. a7 Ra8
51. Rxc6 Rxa7+ 52. Kb4 Ra2 53. Rxf6 Rxd2 54. Ka5 Ra2+ 55. Kb4 Rb2+ 56. Ka4
Rd2 57. c6 Ra2+ 58. Kb5 Ra7 59. Kb6 Ra3 60. c7 g4 61. c8=Q 1-0[/pgn]
jdart
Posts: 4434
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Engines or Settings for playing down in material?

Post by jdart »

hgm wrote:A losing disadvantage always counts more heavily as the game simplifies
Most engines do understand that trading pieces (but not pawns) is desirable when you are ahead in material. But there are important exceptions. For example minor + Rook vs Rook is a likely draw (with no pawns; and even with 1-2 pawns the weaker side might still draw), so you don't want to trade into that endgame.

--Jon