So you’ve got a program that can handily defeat all but the best players of chess.
Ok, so how are the AIs tweaked so that when you play it on “novice” level, you can actually win. I’ve always wondered myself, and this applies to all computer programs…
Does the AI cheat by giving you more favorable / it less favorable rolls (not relevant in chess, of course)
Is the AI crippled in some way (like the program can be made to be faulty to some degree)
Is there some program at the end that says “ok, now you know what the winning answer is. you will do that 50% of the time, and 50% of the time you will make a random move”
basically, how does AI change itself when you select a difficulty level?
One common way in chess games is to change the amount of time the computer has to figure out the move, or limiting how many moves ahead the computer can simulate.
I remember when I was growing up, and this was back in the mid 80s, I had a handheld chess game that would fall for the scholars mate exactly half the time.
Here’s a good article on how this is done. As Captain Amazing says, it sometimes involves cutting down on the number of calculations (e.g. how many moves ahead the AI is thinking). Another technique is to purposely create situations the player can exploit to gain an advantage.
Ditto what Captain Amazing said. The early chess devices (I still have my Boris Diplomat) had a setting that limited either the time or the number of moves ahead it would look.
I don’t think the Diplomat would ever fall for a Fool’s Mate. It usually ended up beating me.
I’ve never used the Scholar’s Mate against a chess computer (but I did once fall for it myself as a human), but I did once beat a computer on move 6 with a fool’s mate plus irrelevant adornments (some moves on the other side of the board that didn’t change the basic structure of the mate). It was set on a difficulty setting where it occasionally made deliberate mistakes.
Nothing more to really add though. Having programmed some games, the basic technique is to limit the number of options considered by the AI. Either through time or count restrictions.
Some of them will throw in randomized moves at the lowest level.