How to Beat Chess Computers

“Chess computers have no fear” – Yasser Sierawan, Chess Grandmaster, describes one competitive advantage of chess computers.

Do humans have a chance to beat a chess computer?!

This article’s goal is to assist you to win a bit more often against chess computers. A few things that really help are to be able to understand how they work and think, be able to predict what sorts of things they might not spot and understand what parts of the game a computer is better than humans at playing.

Since Deep Blue’s victory over Gary Kasparov, it has become apparent to all that computers are very good at playing chess. But, fortunately, they still have weaknesses, so with a little preparation, the results of playing against chess machines can be improved. A chess computer assesses who is ahead in a slightly different way to how many human players would. The piece values are the same, but not all humans would consider some of the other factors that a computer does.

How chess computers play

There is a simple way to play perfect chess: write down all the possible games of chess, note if the final position is won, drawn or lost, and then working backwards assume each player chooses the best line, you will eventually end up with a list of all the best possible games of chess. Even for the strongest computers nowadays, this approach is clearly impractical. A compromise is to grow the list of variations as large as possible, in the time permitted, and then use an evaluation function to try and decide the likely outcome from the final position of each variation. Computers use evaluation functions to determine as accurately as possible the likely outcome of the game from that position, however, it doesn’t need to take into account a great deal of tactical information, as hopefully the tactics in the position are taken care of in the variations themselves. In this sense, the evaluation function contains the strategic knowledge the computer has of chess. The evaluation function of commercial chess programs is generally a closely guarded secret, but generally speaking, it takes into consideration the following factors:

  • Material
  • Trapped Bishops
  • Development
  • King Safety
  • Trapped Rooks
  • Weak Back Rank
  • Knight/Bishop Outposts
  • Centralization
  • Bishop Pair
  • Pawns on the same colour as a single Bishop
  • Rooks on Open Files
  • Doubled Rooks
  • Rooks behind passed pawns
  • Rooks on the 7th Rank
  • Bishops of Opposite Color
  • Developing minor pieces before the Queen
  • Various end games related advantages – such as avoiding having the wrong rook’s pawn in a King and Bishop ending.
  • Passed Pawns
  • Isolated and Backward pawns
  • Doubled Pawns

The computer subtracts your score from its own score. A positive score means the computer is ahead and a negative score means that the human is ahead.

How chess computers calculate variations

As you can see the computer may be doing a lot of work in evaluating a single position. Yet, clearly, some more sophistication is needed in the evaluation function to play sensible chess. This means it has less time for calculating the possible variations, and so a more complex evaluation function may result in a loss of tactical ability. Chess positions have a lot of variations, and the more possible positions we come up with the more time must be spent evaluating them. It is important to identify quickly when a particular variation is not worth following up on. Mostly the computers use techniques based on ordering moves, so they try the most promising first. Having identified lines that are not promising, it will not evaluate these lines as fully to save time. This means it may not consider all possible sacrifices very deeply.

Effective pruning is vital to ensuring we consider only the most appropriate moves. Humans are thought to be particularly good at recognizing the significant moves in a position – it is believed that Grand masters only consider an average of 1.7 moves in any position (obviously recaptures keep the average down).

Similarly, we must ask how big to grow the tree – well obviously the time constraints of tournament play restrict our choice – but also we don’t want to stop in the middle of a sequence of captures and recaptures – as the evaluation function might wrongly conclude we are a piece up or down incorrectly.

So a lot of work in computer chess goes on ensuring that the tree of variations is grown appropriately and that branches that are tactically interesting receive more attention.

Strengths and Weaknesses in Computer Play

Strengths

Tactics – modern computer programs are stunning tactical players.

Openings – Most modern chess programs have an extensive opening book, and so play according to the best theory in many lines. This is a strength – wouldn’t we all play better with a copy of ECO – although sometimes computers find themselves a little lost at the end of their opening book when first forced to think for themselves.

Standard Endgames – are a strength as modern programs have databases, and computers are appalling at endgames. Probably because tactics are if not less important, then easier to see, whilst ideas become more important.

Weaknesses

Positions understanding – computers don’t understand even simple positions they just evaluate. If something will not happen they can not understand that.

Non-Standard Endgames – though, computers rely on endgame pre-defined evaluation based on material left, rather than on position nuances. For example, see an opposite-coloured Bishop ending features in the Kasparov – Deep Blue 1996 match, round 2 games given later – the chess computer concluded that the opposite colour Bishops lend the position a more end game nature, while in the particular position, the opposite coloured Bishops played an important attacking feature rather than a drawing factor. There are many examples of chess computers losing simpler endgames (many from ‘lost’ positions) – although for the less strong player the endgame weakness of computers might be harder to exploit: you have to know how to play endgames well.

Special positions – Zugzwang, for example, can be difficult for computers. The pieces are on okay squares, there are perhaps a few pawns moves available before one side is forced to make a worsening piece move, so the computer can not see the forthcoming doom.

Losing combinations and their effect on Computers (How to Win “Won” games)

The ‘Horizon’ effect is what happens when you don’t calculate variations deep enough to understand the tactics. Worse still if you see something bad is going to happen (losing a piece) and you can put it off for a few moves by say sacrificing a pawn, then the machine may not realize it is still going to lose a piece. Thus it sees a choice between losing a pawn and losing a piece, and chooses to lose the pawn – eventually, it loses both a piece and a pawn. The horizon effect is often noticeable when the computer’s opponent has mating possibilities – anything to avoid the loss of the King. Similarly, when the loss of the King is unavoidable the computer may turn suddenly materialistic – ignoring the mating threats whilst grabbing material so as to lose by the smallest margin. Both these situations may lead to unnatural moves – since the computer is frequently a better tactician than the human – it may start making these unnatural moves before you realize you have a win.

Strategies for Beating Computers

Breaking rules of Thumb – The chess computer’s evaluation function is basically a list of ‘rules of thumb’ and when you give it a position where these rules aren’t valid it will still blindly follow them (unless it can see the consequences).

Opening choices against a master Tactician – When faced with a master tactician one should try to avoid open positions, where simplistic strategies of centralization and tactical awareness predominate. Openings that tend to lead to ‘quiet’ positions are to be preferred against computers. For example, in positions with a closed centre and a build of wing attack behind a pawn advance, in most cases, modern computer programs seek counterplay with a pawn advance on the opposite wing, but they are outplayed as they don’t recognize patterns for opening files, and make lacklustre moves. Opening choices against a

Bookish Opponent – As we have said modern computer chess programs have extensive opening books, but an often primitive understanding of a position, so one strategy that has been used successfully is to deviate from books early. Many of the Grandmasters do not use this strategy – perhaps they have the advantage of being familiar with all the latest analysis – possibly even more up-to-date than the machines – but for the less strong players, this is a useful strategy and probably will give the club player good practice at thinking through opening plans.

Win the Endgame – look for non-standard Endgames, in which chess computers can be misled by the pre-defined evaluation of the position.

Play Great Chess – always a good strategy in chess and can make up for not following any of the above advice…

The Kasparov-Deep Blue matches

In 1996, the World Chess Champion of that time, and believed to be the strongest chess player ever, Garry Kasparov, meet in a match Deep Blue chess-playing computer, developed by IBM. Kasparov beat the Deep Blue by a score of 4-2, yet the chess computer made an history: Deep Blue became the first machine to win a chess game against a reigning world champion under regular time controls.

Deep Blue was then heavily upgraded and played Kasparov again in May 1997, winning the six-game rematch 3-2, becoming the first computer system to defeat a reigning world champion in a match under standard chess tournament time controls. When Kasparov requested that he be allowed to study other games that Deep Blue had played so as to better understand his opponent, IBM refused. After the loss, Kasparov said that he sometimes saw deep intelligence and creativity in the machine’s moves, suggesting that during the second game, human chess players had intervened on behalf of the machine, which would be a violation of the rules. IBM denied it, saying the rules provided for the developers to modify the program between games, an opportunity they said they used to shore up weaknesses in the computer’s play that were revealed during the course of the match. Kasparov accused IBM of cheating and demanded a rematch, but IBM refused and dismantled Deep Blue.

Here is how to beat the computer in chess:

  1. Keep the position closed
  2. Keep the central pawns locked
  3. Avoid exchanging you central pawns
  4. Start with 1.d4
  5. Use your positional knowledge to maneuver to good squares
  6. launch a Kingside pawn storm straight at the opposing King once the center is closed
  7. Swarm in with your heavy pieces and checkmate the silicon monster

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.

First, there’s the “general” method. 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. So the first thing you need to do is keep the position closed.

Keep the central pawn position locked up and avoid exchanging off those center pawns. Openings that start with 1.d4 are especially good for this. It’s even easier if you’ve studied strategy and positional chess, since computers tend to stink at long-range planning.

Block 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.

After 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.

Make sure your pawns are backed up by your heavy pieces. This is especially effective if you’ve studied pawn structures and other general pawn play.

After the breakthrough, when files are opened, swarm in with your heavy pieces and checkmate the silicon monster.

It’s that simple. I know average club players who can do this at will against many chess engines, especially older programs. 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.

Alternate Methods of Beating The Chess Computer

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

After 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). I checked the opening book and, sure enough, there was a hole.

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.

The first version of Fritz would always play the best move it found, no matter what. That meant that if the best move caused a draw by threefold repetition of the position, the engine played it anyway. I got a couple of easy draws that way when playing it. 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.

Many chess engines have this feature programmed into their algorithms including Stockfish, Deep Blue and the famous Alpha Zero. However, you still occasionally come across a chess program which will draw this way (even if it’s winning materially). That brings us to another method, which is a bit more tricky to execute.

Have a look at this position:

White’s a Rook up in this position. Big deal. 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. 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.

Computers do occasionally misevaluate a position, this position being a famous example. 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.

So there are ways to beat your chess computer at its full strength (these are just a few). If all you want to do is beat your chess engine, have at it.

1.) Identify the horizon in order to beat a chess computer

The horizon of a chess computer can be defined by the number of moves the program can see ahead, which determines its decisions.

Basically, a higher horizon (ply) translates to more capabilities a chess computer can accomplish. And of course if we’re going to beat this thing then a proper identification of its strength will really help.

Fun fact: A chess engine ply is calculated as half a move, where 14 plies for example means the computer can see 7 moves ahead.

This is such a significant thing since computers with varying levels will require a different approach, aggressive (tactical) is best against lower to intermediate engines, while silent (strategic) is best for stronger ones.

2.) Go for tactics when trying to beat a chess computer

This is the first approach and is greatly applicable for engines of lower quality, the ones that is played by beginners via some numerous app names.

Such engines usually have lower ply count meaning that the computer is actually not able to process most tactics.

Slow maneuvering moves may work, but I’ve seen some lose to low-quality engines since the computer has an easier time calculating the moves. An engine that has a ply below 10 is usually the subject in question where tactics can work.

3.) Exploit material greediness in order to beat a chess computer

Chess computers are a greedy piece of work, if ever there’s an opportunity to be up in material, you bet that it will take it.

Now, this makes sense since being up in material directly translates to an advantage that is easier to calculate than long-term plans.

This greediness however is a huge weakness that can be taken advantage of positionally; chess after all is a battle of positions not just material.

Greedy players are usually beginners

This of course doesn’t apply to high-level engines like stockfish since they patched this one long ago.

4.) Utilize Gambits and traps when trying to beat the chess computer

This is to piggyback from the previous point regarding the computer’s nature to prefer material advantage over positional; means we can actually use gambit and traps!

Now, big alert that this only includes low to intermediate chess computers, high performance engines will crush you if you attempt this.

However gambits and traps are just irresistible to low-end computers, especially those that doesn’t have access to any opening theory.

Using gambits that have decent theoretical knowledge is a good idea, along with traps that offer material for some kind of winning combination.

Even gambits have well-known lines nowadays.

5.) Play the quiet game against the chess computer

This may be surprising to you, after all I just indicated previously that you should utilize gambit and traps, why would you want to go for a boring approach?

Gambit and traps will work against intermediate computers sure, but really good engines will just wipe you from the face of the earth!

These modern computers are specially programmed to exploit short term tactical gains over longer ones.

It’s really difficult to outplay a good computer tactically even for professionals, therefore a boring game might be the best game for you.

“Some consider that when I play I am excessively cautious, but it seems to me that the question may be a different one. I try to avoid chance. Those who rely on chance should play cards or roulette. Chess is something quite different.”

-Tigran Petrosian

6.) Close the position in order to beat a chess computer

This is probably the most useful advice when playing against renowned chess computers which are great at tactical shots.

You see, tactics thrive in open positions where the board is prone for possibilities, whereas a closed position forces a slow maneuvering game.

And positional skirmishes is to your best interest! Humans are great at formulating long term plans over short term than most engines (not always).

Case on point with the Kasparov (Former World Champion) game against x3d fritz (chess computer) back in 2003.

Man-Machine World Chess Championship

Garry Kasparov faced an elite chess computer during the time in a match said to determine the future of chess and computer programming.

Kasparov implemented this is very exact anti-chess computer strategy by closing the position all throughout the game.

Here’s that game:

White (Kasparov) just dominates black (x3D Fritz) by forcing a closed position that eventually suffocates fritz’s choices.

We could take something from here and use it on our terms against these formidable machines.

7.) Play for a draw when trying to beat a chess computer

This is another counterintuitive advice that you may find suspicious since we want to win, but I’m telling you to play for a draw?

You see, most high technological computers are not programmed to take draws, and therefore would do anything to keep playing even compromising their position.

This is another devilishly anti-computer strategy that will work most of the time, well, if you don’t blunder.

There is this really hilarious game between Hikaru Nakamura (Super Grandmaster) and Rybka (Computer), where the guy really demonstrates the flaw of Rybka.

ICCC Blitz 2008

Hikaru played Black while Rybka has White, in a game that will forever go down in history as the meme that contains a human trolling a chess computer.

Look at the interface below:

Nakamura just like Kasparov employed an anti chess computer strategy of closing the position, but also did another thing on top of that.

The guy also tried to go for a draw! triggering Rybka’s program to force an initiative even at the cost of its position.

This entertainingly allows Hikaru to bring an army of bishop and knights from the promoted pawns before checkmating white.

Take a lesson from this and apply it in your own games!

8.) Use your openings in order to beat a chess computer

Some variety of chess computers don’t have access to any opening theories, which is a
weakness that we can take advantage of.

Of course this doesn’t include every engine since some are just monsters even at the openings, but for those that don’t, this is a good strategy.

After all it doesn’t even require you to play, you just need to apply the moves from the theory to get some sort of initiative.

Even still, it is not a surefire way to win since you’re actually required to play on, but just helps in improving chances by acquiring a good position from the get-go.

9.) Unconventional moves wins against chess engines

But what if the computer actually knows some opening knowledge? Is there anything we can consider to have some edge against such opponents?

I’m really not sure, but one thing is true for this situation, you are highly unlikely to outplay an engine that knows theory at the start of the game.

Using unconventional moves in such scenarios may work not because of psychology like when playing with humans, but to avoid a theory that the computer knows well.

This is not the best advice to beat an engine, but I mean we’re talking about hard to beat computers, anything is worth much for this battle.

10.) Endgame is your friend against chess engines

This again it’s one of the best advice among all that I’ve discussed so far and something that you may have noticed yourself.

Endgames you see are more strategic and long term-based instead of short term tactical gains that most chess computers are programmed to be the best in.

In other words, they are highly unlikely to perform super precise moves that would deliver wins, since they are in the phase which doesn’t favor their nature.

Everyone’s obsessed with opening theories when it’s the endgame that wins the game.

Again, this doesn’t apply to every chess computer especially the stronger ones! they could still crush you since they’ve long worked on this flaw.

But it’s still a good strategy if it does work, so make sure you try in the least to see how it fair against the computer you’re competing with.

11.) Presence of mind is key when trying to beat a chess computer

Discussing all the strategies and positions to prefer is not the full story, the big question is can we actually survive long enough to see the results.

Closing the position, trying to go for draws, or even mastering the endgame can help, but blunders will ruin such plans altogether.

Hanging a piece, pawn, or similar mistakes that bring disadvantages are not acceptable against chess computers, if such, you’d probably be better of restarting.

Being mindful about the position of your pieces and the opponent’s is of utmost importance; focus is needed to defeat strong opponents which engines are.

12.) Repetition gives results when trying to beat a chess engine

Reading through my advice, you may have noticed that everything is not applicable for a single chess computer and actually vary depending on different factors.

Identifying which type of chess computer we’re dealing with is important for making an appropriate counter for such.

The best way to learn the opponent is by playing with them, again and again, which would naturally give you a grasp about the way they operate.

So play with the computer over and over again! You will be better each time and therefore have higher chances of success.

Final thoughts

Chess computers have long passed the point where most human can compete, not even beat the best of their kind.

They may be strong but they are still within the boundaries of our creation (programming), therefore still having weaknesses far from being perfect.

Applying all this may not guarantee a win, but is still a good try from your end as someone who is trying to overcome a bad matchup.

Sleep well and play chess.

Leave a Reply

Your email address will not be published.