user1386: 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

user24723: 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.

user46: 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.

user7002: 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.

user825: 
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.

user12084: Use a number of weak engines.  Make them vote.
Suppose you take any number of relatively weak engines - some with deep searches but poor evaluation heuristics, some with shallow searches, some using neural networks but with limited training, some with random factors added to make them blunder a bit - and at each turn you have them vote for the best move.  The result will be quite human-like - a fact that should not be too flattering for us humans!
For the most part, the composite engine would play decently - some significant amount better than any individual engine.  It would rarely blunder blatantly, but it would miss deep tactics and subtle strategic moves.  In particular, it would rarely (if ever) make the "computer move".  Most engines, when given a position where there is an obvious very good move and a completely opaque move that is infinitesimally better, have the search depth necessary to find the latter move and make it - thus revealing their inhumanity.  But most of our engines will either fail to find the weird move or their heuristic won't be fine enough to recognize its superiority.  The vote will usually go to the more obvious move.
Engines also reveal their inhumanity in the precision of their defensive play and opening book.  Our composite engine would lack the search depth necessary for precise defense - even if a few of the constituent engines had the depth, they would be outvoted on occasion (and it takes just one mistake to seem human).  In the opening, the composite will stay on book for a while - although it will be hard to guess just which lines it will prefer.  But it won't be long before the book-less or book-light engines win a vote and make an "imprecise" move.  The quickest way to get the composite engine "out of book" would be to offer a sacrifice - the composite will surely be a sucker for opening gambits . . . just like most humans.
To improve the effect, the length of time displayed between moves should be proportional to the amount of agreement between the engines.  If a move is unanimous to the engines, it likely would be obvious to a human, as well (if not simply forced).  If there is a lot of disagreement among the engines, than the position is likely a bit tricky and the sort which would cause a human mind to linger.  (Some adjustment would be required in the opening phase, in which the engines would surely have lots of disagreements simply because there isn't a lot going on in the position yet.)
Someone really needs to do this.
When I came across this question, I was a little surprised that no one knows of anyone who has tried this.  The Maia engine has a bit of this idea cooked in.  By trying to predict what an 1100-rated player will do, Maia achieves are rating of about 1500.  But Maia isn't a composite of a bunch of 1100-rated engines, like I propose.  Creating the composite that I describe doesn't seem like a difficult task.  If anyone knows of an attempt, I would love to hear about it.

user20317: 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.

user25249: You can take a look at the Maia Chess project. What they've done is that they've built a customized version of Leela Chess wherein instead of the policy value looking for the best move, it looks for the most likely human move. The github has 9 weight files for lc0 from 1100 to 1900 elo.
It claims to better predict the moves of players compared to Stockfish and Leela Chess. You can also play these bots at Lichess.


1386: <p>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 ?</p>
<p>Thanks in advance</p>
 24723: <p>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.</p>
<p>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.</p>
 46: <p>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.</p>
<p>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 &quot;industrial-grade&quot; engines.</p>
 7002: <p>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.</p>
<p>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.</p>
<p>So at least on this aspect, computers cannot play like humans.</p>
 825: <blockquote>
<p>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 ?</p>
</blockquote>
<p>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.</p>
<p>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.</p>
 12084: <h2>Use a number of weak engines.  Make them vote.</h2>
<p>Suppose you take any number of relatively weak engines - some with deep searches but poor evaluation heuristics, some with shallow searches, some using neural networks but with limited training, some with random factors added to make them blunder a bit - and at each turn you have them vote for the best move.  The result will be quite human-like - a fact that should not be too flattering for us humans!</p>
<p>For the most part, the composite engine would play decently - some significant amount better than any individual engine.  It would rarely blunder blatantly, but it would miss deep tactics and subtle strategic moves.  In particular, it would rarely (if ever) make the &quot;computer move&quot;.  Most engines, when given a position where there is an obvious very good move and a completely opaque move that is infinitesimally better, have the search depth necessary to find the latter move and make it - thus revealing their inhumanity.  But most of our engines will either fail to find the weird move or their heuristic won't be fine enough to recognize its superiority.  The vote will usually go to the more obvious move.</p>
<p>Engines also reveal their inhumanity in the precision of their defensive play and opening book.  Our composite engine would lack the search depth necessary for precise defense - even if a few of the constituent engines had the depth, they would be outvoted on occasion (and it takes just one mistake to seem human).  In the opening, the composite will stay on book for a while - although it will be hard to guess just which lines it will prefer.  But it won't be long before the book-less or book-light engines win a vote and make an &quot;imprecise&quot; move.  The quickest way to get the composite engine &quot;out of book&quot; would be to offer a sacrifice - the composite will surely be a sucker for opening gambits . . . just like most humans.</p>
<p>To improve the effect, the length of time displayed between moves should be proportional to the amount of agreement between the engines.  If a move is unanimous to the engines, it likely would be obvious to a human, as well (if not simply forced).  If there is a lot of disagreement among the engines, than the position is likely a bit tricky and the sort which would cause a human mind to linger.  (Some adjustment would be required in the opening phase, in which the engines would surely have lots of disagreements simply because there isn't a lot going on in the position yet.)</p>
<h2>Someone really needs to do this.</h2>
<p>When I came across this question, I was a little surprised that no one knows of anyone who has tried this.  The Maia engine has a bit of this idea cooked in.  By trying to predict what an 1100-rated player will do, Maia achieves are rating of about 1500.  But Maia isn't a composite of a bunch of 1100-rated engines, like I propose.  Creating the composite that I describe doesn't seem like a difficult task.  If anyone knows of an attempt, I would love to hear about it.</p>
 20317: <p>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.</p>
<p>Humans play in more or less the same way, but evaluate far fewer positions using a far more sophisticated heuristic.</p>
<p>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. <a href="https://en.wikipedia.org/wiki/AlphaZero" rel="nofollow noreferrer">AlphaZero</a>, 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.</p>
 25249: <p>You can take a look at the <a href="https://github.com/CSSLab/maia-chess" rel="noreferrer">Maia Chess project</a>. What they've done is that they've built a customized version of Leela Chess wherein instead of the policy value looking for the best move, it looks for the most likely human move. The github has 9 weight files for lc0 from 1100 to 1900 elo.</p>
<p>It claims to better predict the moves of players compared to Stockfish and Leela Chess. You can also play these bots at <a href="https://lichess.org/team/maia-bots" rel="noreferrer">Lichess</a>.</p>
<p><a href="https://i.stack.imgur.com/aHkFC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aHkFC.png" alt="prediction accuracy of Maia versus Stockfish and Leela" /></a></p>
