9

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

3
  • 2
    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 '20 at 8:04
  • 2
    human or non-human play is an illusion that's further fortified by beliefs. – Sopel Sep 25 '20 at 16:22
  • I am no chess player and I have no experience from computer chess but I find the topic interesting. From my logic (for what it's worth given my lack of experience) a chess computer used for support and training for a human chess player should evaluate a move based on a tree search that looks at the moves that are likely to be played by humans (you and your opponent) rather than theoretical "best" moves which gives a better positions after a series of moves that no humans would ever play (because the evaluation needed in order to find or conclude tgagbthese are really the best moves is beyond h – Joakim Quensel Feb 18 at 14:35
8

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.

prediction accuracy of Maia versus Stockfish and Leela

0
5

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.

1
  • 2
    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 '20 at 23:36
3

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.

2

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.

2

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.

1

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.

1

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.

-6

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.

2
  • 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 '20 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 '20 at 11:52

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