![]() ![]() Let’s explore some basic concepts that will help us create a simple chess AI:Īt each step, we’ll improve our algorithm with one of these time-tested chess-programming techniques. But I’m going to move on now and talk about ways to use your program’s engine as an effective sparring partner to help you improve your own chess.By Lauri Hartikka A step-by-step guide to building a simple chess AI If all you want to do is beat your chess engine, have at it. So there are ways to beat your chess computer at its full strength (these are just a few). There are ways for a good player to exploit this tendency and win a game (or at least snatch an occasional draw), but it’s a bit tricky for the average chess player to execute. But set up this position in your chess playing program and let your chess engine analyze it I’ll bet you dollars to donuts that it’ll evaluate this as a winning position for White.Ĭomputers do occasionally misevaluate a position, this position being a famous example. The game is a draw: the pawns are locked, the Kings can’t get through, and neither side can make progress, so White’s extra Rook doesn’t mean a blessed thing. ![]() That brings us to another method, which is a bit more tricky to execute. However, you still occasionally come across a chess program which will draw this way (even if it’s winning materially). Many chess engines have this feature programmed into their algorithms including Stockfish, Deep Blue and the famous Alpha Zero. Later versions fixed that problem by allowing the engine to play the second-best move as long as that move was evaluated as being pretty close in strength to the best move. I got a couple of easy draws that way when playing it. That meant that if the best move caused a draw by threefold repetition of the position, the engine played it anyway. The first version of Fritz would always play the best move it found, no matter what. The next version of Fritz fixed the hole, and the version after that added a feature which made the engine stop playing openings at which it kept losing. So this method isn’t as easy as it used to be, but you can still try it. I checked the opening book and, sure enough, there was a hole. I can still remember when a 1300 Elo player found just such a bad variation in the opening book of an early version of the Fritz program.Īfter 1.d4, Fritz (as Black) would invariably fall into this same hole, which allowed the human player as White to block the center, launch the Kingside pawn storm, and win (exactly as I described earlier). There are more complex ways to beat your computer. If the chess program you bought gives you the ability to look at the engine’s opening book (also known as the opening tree), you might be able to discover a “hole”, a variation which is bad for the computer but which (due to an oversight on the programmers’ part) the engine will always play. In recent years, programmers have improved their engines so that this technique isn’t the “insta-win” that it used to be, but it can still be pretty effective.Īlternate Methods of Beating The Chess Computer I know average club players who can do this at will against many chess engines, especially older programs. This is especially effective if you’ve studied pawn structures and other general pawn play.Īfter the breakthrough, when files are opened, swarm in with your heavy pieces and checkmate the silicon monster. Make sure your pawns are backed up by your heavy pieces. It’s even easier if you’ve studied strategy and positional chess, since computers tend to stink at long-range planning.īlock the center to keep the computer cramped, then use your positional knowledge to maneuver, maneuver, maneuver, getting your pieces (especially your Knights) to good squares.Īfter you’ve ensured that the center will stay blocked (especially if the chess engine has moved a lot of its pieces to the Queenside), wait for the computer to castle Kingside (which it will do most of the time, unless its opening book directs otherwise), and then launch a Kingside pawn storm straight at the opposing King. Openings that start with 1.d4 are especially good for this. Keep the central pawn position locked up and avoid exchanging off those center pawns. So the first thing you need to do is keep the position closed. Chess engines love wide open positions with lots of mobility for the pieces, and the danged programs can always be counted upon to crush you tactically in just such positions. There are a lot of ways to beat a chess computer, all based on playing to your own strengths as a human while capitalizing on the computer’s well publicized weaknesses.įirst, there’s the “general” method. Swarm in with your heavy pieces and checkmate the silicon monster Launch a Kingside pawn storm straight at the opposing King once the center is closed ![]() Use your positional knowledge to maneuver to good squares Here is how to beat the computer in chess: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |