We have lot of sophisticated chess engines, but I always prefer playing with a human online, because they make genuine mistakes / blunders which adds a human touch. Playing with computer at a high level is boring as it is too difficult to crack and at low levels it makes a random blunder which practically a human will never do. Can someone either point me to an existing engine which plays like a human based on your level or recommend me some guidelines as how we can make it using AI ?

Thanks in advance

  • 1
    Maybe training a NN with a huge database of games played by such humans, so that the NN tries to predict the move the humans made based on the position? But it might well be that the existing databases are ridiculously small, given the large number of possible positions in chess... – wimi Sep 16 at 8:04
  • 1
    A related question: can we develop an engine that imitates the playing style of a specific player? For example, playing like Petrosian who emphasises safety. – Zuriel Sep 16 at 23:41
  • human or non-human play is an illusion that's further fortified by beliefs. – Sopel 2 days ago

As far as I know, every chess playing program combines a depth-limited search of the game tree with a heuristic algorithm to estimate the favorability of each position. There's a tradeoff between using a cheaper heuristic allowing more positions to be evaluated and using a sophisticated heuristic on fewer positions.

Humans play in more or less the same way, but evaluate far fewer positions using a far more sophisticated heuristic.

I'd expect that the most human-like computer players would be the ones that evaluate the fewest positions per unit time using more sophisticated heuristics. AlphaZero, for instance, evaluates about 0.1% as many positions as Stockfish (though still many orders of magnitude more than a human), and I'd expect it to be somewhat more human-like than Stockfish as a result. I have no actual experience to back that up, though.

| improve this answer | |
  • I downvoted because simply searching fewer positions is not similar to "playing like a human". Otherwise it'd be trivial to get Stockfish to play like a human: simply tell it to play a move after searching (say) 100 positions. – Allure Sep 16 at 22:44
  • @Allure I meant "evaluate the fewest positions per unit time for a given amount of computing power, implying a more expensive heuristic". I edited the answer to make it explicit. – benrg Sep 16 at 23:07
  • I think this hyper bullet game: lichess.org/jCcbfpB8#1, where Leela blunders her queen in a human like fashion supports your reasoning. – Akavall Sep 16 at 23:36

Can someone either point me to an existing engine which plays like a human based on your level or recommend me some guidelines as how we can make it using AI ?

There is simply no such thing. AlphaZero, Stockfish, LC0, Komodo, everything else don't play like a human. In my experience, chess engines are either very strong, very weak or artificially tuned down to play bad chess.

You will need train a network on it. To my knowledge, nobody has done it successfully. You will need to feed a good amateur chess game database. The games will need to come with filtering.

| improve this answer | |

In theory, chess is a Markovian game -- the current state says it all, how you reach the current state, ie all the previous moves, doesn't matter. This is how computers play chess.

For humans, previous moves matter a lot. On one hand, people think in plans, so could easily forgo better moves if it is not consistent with their plan. On the other hand, human mood swing also has a great effect. Reaching an endgame after a crazy tactical middle game or reaching the same endgame after many boring exchanges can lead to different moves onwards.

So at least on this aspect, computers cannot play like humans.

| improve this answer | |

Some of them make random errors to simulate a human. Others limit the number of moves they look ahead to do it. None of them play like a human, but that is the state of the art as of now for faking it.

The best approach would be to train the AI program by playing against actual humans of the given strength level being simulated, but that would be impractical as it would take too long and the players being used would likely change rating (hopefully upwards as they learn too) as they play.

| improve this answer | |

By programming it using human concepts and thinking instead of just pure raw brute-force calculation (like a computer). There was an old engine [Wchess], used in the Power Chess 98 and Majestic Chess games on PC, which applies concepts like tropism (e.g. king safety for the AI is described as how many pieces are surrounding it). So some logical human-like heuristics thrown in with an occasional mistake or two, made it the most human-like chess engine to date.

Humans all succumb to tactical mistakes eventually, it should be possible for an engine to simulate such behavior although this would be a niche interest and take a very different approach from those "industrial-grade" engines.

| improve this answer | |

Easy as pie. I would just add a function to the engine that would induce errors by cutting evaluation to an arbitrary low depth, or removing certain evaluation rules at a desired frequency. For example, you can program it to reduce the depth all the way down to 1, let's say, every 5 moves, or take king safety out of evaluation every 7 moves.

| improve this answer | |
  • I think this is what is done when you set the level to 1 ( 1 = low and 10 = high ) , but the kind of experience you have with that is not at all like playing with humans. The kind of blunder engines does, are not at all obvious. – Shakti Sep 25 at 7:24
  • Yes, it's obviously more complicated than I described, but my point was that if you parameterize the error function you can eventually tweak it to meet the desired strength and style. Another possibility would be, instead of always choosing the top move, to randomly choose among top four or five. – postoronnim 2 days ago

I say: Take a normal, strong AI, and have it play P-R3 at random.

Bad players play P-R3 whenever they can't think of anything to do. They think if an enemy unit lands on N5, then P-R3 is a great attacking move. Or maybe they play P-R3 to prevent an enemy piece from coming to N5. Either way, win! And it's such a small positional concession, what harm could P-R3 do?

Bad players waste more time on useless P-R3 moves than any other, so a computer that plays P-R3 willy-nilly would approximate crappy chess play in that fashion.

Chessplayers: NM Dan Heisman's "Guide to P-R3" is such a valuable read, available at chesscafe.

| improve this answer | |
  • 2
    An engine playing a rook pawn forward one square randomly is not enough (on average) for any human being to be able to even draw the engine, the concession is normally too small to even make a difference. – Scounged Sep 16 at 11:27
  • 3
    It would only make a difference if it's truly "at random" - pushing a pawn while your queen hangs is hard to recover from even for an engine. But then again, that's exactly the kind of "random blunder" from the question that sticks out as artificial. – Annatar Sep 16 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.