how to make an engine play almost like a human

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

Moderator: Ras

Uri Blass
Posts: 11024
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: how to make an engine play almost like a human

Post by Uri Blass »

Uri wrote:Computers play strong chess but i think they still have an Achilles' heel. Computers don't play high quality positional chess like GMs do and sometimes they can't see as far ahead as a GM can. The horizon effect for example prevents them from seeing far-away dangers. Rybka vs. GM Roman Dzindzichashvili would interesting to see.
I do not understand the following part:
"Computers don't play high quality positional chess like GMs do"

How do you define positional chess?
If you think that humans lose against computers because humans play tactical mistakes that lose material then you are wrong.

Computers usually get positional advantage against strong humans before
they can see winning material.

Uri
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: how to make an engine play almost like a human

Post by Matthias Gemuh »

Uri wrote:What is SEE?

Static Exchange Evaluation

calculates optimal outcome of a sequence of capture/recapture on one square.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
User avatar
Mike S.
Posts: 1480
Joined: Thu Mar 09, 2006 5:33 am

Re: how to make an engine play almost like a human

Post by Mike S. »

genorb wrote: even if the computer is setted to a weak level, if it plays immediatly it's move (which typically will be the case for low depth), then this is not the same at all. It will perturb your play.
Yes... this is a downside of that method, but I think the player can adapt to it if he really goes for methodical training. He just needs to "take his time." But I know it isn't as easy as it sound, at least not in the beginning.

(I only played a few games like that.)
Regards, Mike
Uri
Posts: 521
Joined: Thu Dec 27, 2007 9:34 pm

Re: how to make an engine play almost like a human

Post by Uri »

Uri Blass wrote:I do not understand the following part:
"Computers don't play high quality positional chess like GMs do"

How do you define positional chess?
If you think that humans lose against computers because humans play tactical mistakes that lose material then you are wrong.

Computers usually get positional advantage against strong humans before
they can see winning material.

Uri
Yes what you say is true. But i still think computers think more in tactical terms (short-range terms) than in strategical or general terms (long-range terms) and that is their weakness. Top GMs like Kasparov, Kramnik and Anand are more strategical (meaning they tend to think more in general terms) than tactical.
Mic Moc

Re: how to make an engine play almost like a human

Post by Mic Moc »

Here are my to cents:

a) use Fritz GUI;
b) select a strong UCI engine;
c) you start the 1st game giving it 1 minute time for the whole game, while you add extra time for the human player.
d) If you win, you can either choose to let the engine ponder during your thinking time or you can you can give the engine 1 minute per game plus additional seconds per move.
e) in this way the engine is at his best but with limited time to analyze.
Ciao
Davide
mike860

Re: how to make an engine play almost like a human

Post by mike860 »

genorb wrote:This is indeed a good way: using ply depth levels. I use it with some dedicated chessboard (the ones produce by saitek or novag for example). It works well.
I also take this approach with my Mephisto Master, and I agree it does work well. I've also tried this approach with my chess software and I'm still getting ripped apart at one or two plies. This is probably because I have a Q6600 @ 3.30GHz and I have not limited my "deep" engines to one core instead of four.
User avatar
Mike S.
Posts: 1480
Joined: Thu Mar 09, 2006 5:33 am

Re: how to make an engine play almost like a human

Post by Mike S. »

mike860 wrote:
genorb wrote:This is indeed a good way: using ply depth levels.
(...) I've also tried this approach with my chess software and I'm still getting ripped apart at one or two plies. This is probably because I have a Q6600 @ 3.30GHz and I have not limited my "deep" engines to one core instead of four.
This cannot be the reason, because a depth of i.e. 2 plies is always the same, disregarding the number of cpu cores used to achieve it (which will not make a noticable difference up to ~10 plies). It only means that higher depths will be reached quicker.

The only difference is that some moves may be not reproducable under the same conditions, but I think that should only, or at leat mostly affect positions where alternatives are within a narrow margin.

I think the strength difference to depth limited chess comps mainly comes from the much more effective extensions of the modern programs (but also from better evaluation). It's difficult. I just tried it a couple of times against Spike 1.2 at depth 2 and I always failed. :( A major problem is playing too fast because the program always responds immediatly. I am probably not patient enough to play as slow as I would need to.

But actually, if I'd be in the mood to play slower and more serious, I'd probably rather play against an umlimited engine although that is hopeless.

To create an example, here is a game where Rybka "ultra optimistic" plays unlimited with approx. 3 seconds per move (D945 3.4 GHz) against Spike 1.2/2 plies. Unlike me, Rybka found many little tricks and all seemed to work.

[Event "experimental"]
[Site "?"]
[Date "2008.02.29"]
[Round "?"]
[White "Spike 1.2 Turin-2 plies"]
[Black "Rybka ~3 seconds"]
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0}
Ra8 {(Bb1) 2} 36. a4 {-11.11/2 0} Kf8 {(Bxb3) 2} 37. e4 {-11.12/2 0} Ke7 {
(Bxb3) 2} 38. Ke3 {-11.21/2 0} Bxb3 {3} 39. Kf4 {-12.34/2 0} Rxa4 {3} 40. g3 {
-12.61/2 0} Bd5 {(c5) 4} 41. Kf3 {-13.55/2 0} Bxe4+ {2} 42. Ke3 {-13.66/2 0}
0-1
Regards, Mike
mike860

Re: how to make an engine play almost like a human

Post by mike860 »

Mike S. wrote:
mike860 wrote:
genorb wrote:This is indeed a good way: using ply depth levels.
(...) I've also tried this approach with my chess software and I'm still getting ripped apart at one or two plies. This is probably because I have a Q6600 @ 3.30GHz and I have not limited my "deep" engines to one core instead of four.
This cannot be the reason, because a depth of i.e. 2 plies is always the same, disregarding the number of cpu cores used to achieve it (which will not make a noticable difference up to ~10 plies). It only means that higher depths will be reached quicker.
Good point. I guess I forgot to mention that I really, really stink at chess.
User avatar
Mike S.
Posts: 1480
Joined: Thu Mar 09, 2006 5:33 am

Re: how to make an engine play almost like a human

Post by Mike S. »

Yippie! I finally won one. :mrgreen: The triumph of humanity:

[Event "experimental"]
[Site "?"]
[Date "2008.02.29"]
[Round "?"]
[White "Spike 1.2 Turin-2 plies"]
[Black "User"]
[Result "0-1"]
[ECO "D05"]
[PlyCount "66"]

{256MB, History107.ctg, COMPUTER-11} 1. d4 {B/0 0} d5 {2} 2. e3 {B/0 0} Nf6 {3}
3. Bd3 {B/0 0} e6 {3} 4. Nf3 {B/0 0} Bd6 {2} 5. Nbd2 {B/0 0} Nbd7 {6} 6. h3 {
0.08/2 0} c5 {(Nb6) 3} 7. Ng5 {0.09/2 0} c4 {11} 8. Be2 {-0.37/2 0} b5 {(h6) 5}
9. f4 {-0.25/2 0} Bb7 {6} 10. c3 {-0.36/2 0} Qe7 {(a5) 6} 11. O-O {-0.29/2 0}
O-O-O {(Rd8) 3} 12. b3 {0.36/2 0} Nb6 {(h6) 5} 13. Re1 {0.52/2 0} h6 {7} 14.
Ngf3 {-0.28/2 0} Rdg8 {(Kb8) 8} 15. Ne5 {0.00/2 0} g5 {(Bxe5) 8} 16. Bb2 {
0.81/2 0} gxf4 {4} 17. exf4 {0.77/2 0} Nbd7 {(Ne4) 22} 18. Qc2 {1.13/2 0} Bxe5
{4} 19. fxe5 {1.18/2 0} Ne4 {(Nh7) 9} 20. Nxe4 {1.96/2 0} dxe4 {1} 21. bxc4 {
1.54/2 0} e3 {13} 22. Bg4 {1.69/2 0} h5 {6} 23. Bd1 {-1.58/2 0} Rxg2+ {6} 24.
Qxg2 {-1.58/2 0} Bxg2 {1} 25. Kxg2 {-2.82/2 0} Qg5+ {3} 26. Kh1 {-2.82/2 0} Rg8
{(bxc4) 4} 27. Bf3 {-2.46/2 0} Qg3 {(bxc4) 8} 28. Bg4 {-6.79/2 0} hxg4 {2} 29.
Rf1 {-8.68/2 0} gxh3 {4} 30. Rg1 {-11.97/2 0} Qf3+ {2} 31. Kh2 {-#3/2 0} Rg2+ {
4} 32. Kh1 {-#2/2 0} Rf2+ {(Rxb2+) 4} 33. Rg2 {-#1/2 0} Qxg2# {1} 0-1

I was confident that I can win this (against 2 plies), after I played 11...O-O-O:

[d]2kr3r/pb1nqppp/3bpn2/1p1p2N1/2pP1P2/2P1P2P/PP1NB1P1/R1BQ1RK1 w - - 0 12

But actually, if Spike finds 22.Bf1 instead of the blunder 22.Bg4, I am not sure if I wouldn't fail again...

[d]2k3rr/pb1nqp2/4p2p/1p2P3/2PP4/2P1p2P/PBQ1B1P1/R3R1K1 w - - 0 22

Analysis by Spike 1.2 Turin:

22.Bg4 h5
-+ (-1.58) Depth: 1 00:00:00
22.Bg4 h5
-+ (-1.58) Depth: 1 00:00:00
22.Bg4 h5
-+ (-1.58) Depth: 3 00:00:00
22.Bf1 Qh4 23.Rxe3 bxc4
± (1.13) Depth: 3 00:00:00
22.Bf1 Qh4 23.Rxe3 bxc4
± (1.13) Depth: 3 00:00:00
(...)
22.Bf1 Rg3 23.Bc1 Rhg8 24.Rxe3 Rxg2+ 25.Bxg2 Rxg2+ 26.Qxg2 Bxg2 27.Kxg2 bxc4 28.Re4
± (0.81) Depth: 11 00:00:03 1875kN
Regards, Mike