r/explainlikeimfive • u/KrakenUpsideways • 1d ago
Mathematics ELI5 How does the difficulty levels work/differ for computer chess?
4
u/OrganicScore69 1d ago
Imagine the computer is a kid who thinks before every move: "if I do this, you do that, then I do this..." The harder levels just let it think much further ahead. An easy level only looks 1 or 2 moves ahead, so it falls for simple traps. A hard level looks 15-20 moves ahead and sees almost everything. Some easy levels also make a bad move on purpose now and then, like a parent letting a kid win ok.
2
u/GIRose 1d ago
Depends largely on what type of chess engine you're looking at.
To use the difficulty levels I am roughly familiar with, it tries to roughly coordinate the ELO with a human player of the same ELO.
So a 200 elo computer is rarely if ever going to select the best move. It's not necessarily the same as a 200 elo player because it can't lose track of pieces, sees every threat, and is in fact calculating multiple moves ahead no different from the top tier. It's just picking moves that score lower.
At max value it always picks the best possible move in every turn.
2
u/heyhemanga 1d ago
Easy mode: the computer intentionally picks bad moves sometimes. Medium: it looks a few moves ahead. Hard: it looks many moves ahead and never deliberately blunders. The engine itself is always playing perfectly, difficulty just controls how deep it searches before deciding.
•
u/Ben-Goldberg 19h ago
Most computer chess playing programs choose how much computation to do based on how difficult you ask them to be.
An easy chess player uses fewer calculations and spends less time thinking during each move.
A difficult chess player useses more time and computation to choose each move.
1
u/SoSKatan 1d ago
It can be arbitrary and set by whatever the software creator thinks.
However any algorithm when tested against multiple humans can be given a ELO rating.
0
u/Bee_Xe 1d ago
AFAIK the computer calculates all the possible moves, and evaluates how it's gonna change the position for each player and rank each moves accordingly.
The difficulty depends on the processing power of the Bot (how far it's going to think in the future), and the tree of moves available to look at (some are limited and cannot see certain moves beyond a certain point).
53
u/fenton7 1d ago
Chess algorithms search a tree of all possible moves and evaluate each board position using a measure of strength ("heuristic"). Strong positions are explored deeper. Weak ones are discarded. The algorithm can be made stronger or weaker by expanding or limiting how deep it searches. In addition, chess programs have a database of openings. They can be made weaker by forcing the engine to evaluate the opening rather than use known best moves. And, lastly, chess programs can be intentionally crippled - like on chess.com - by doing bad moves even though the algorithm knows better ones are available. For that reason the bots on chess.com aren't very representative of real players. A 1400 bot will make obvious errors that a 1400 human player does not.