Eli5: How are computers better at video games?

434 views

I was watching a chess video and Deep Blue, the IBM computer, was able to beat the best Chess player in the world at the time. If we made the computer and it bases its moves off of moves already made in real life shouldn’t we be able to beat computers like any other player? This isn’t chess specific but can be for any multitude of games.

In: 0

10 Answers

Anonymous 0 Comments

Because the computers can calculate millions of possible moves and figure out the best one, while a human can only think of a few dozens, maybe hundred possibilities.

That’s like asking how come a computer is better at solving complex math problems when it can only do what we taught it to solve – it’s because it can do it much faster than us.

Anonymous 0 Comments

Chess computers can look at a lot more possibilities than even the best humans can imagine. The rules of chess are fairly simple, so those go into the computer and it can plan out millions of progressions of the game, choosing the one with the best outcome. A chess grandmaster may have memorized multiple games, but there are still permutations where they have to get creative, and on a statistical scale they won’t do that as well as AI.

In cases like RTS games, even if the AI is equally as good as a person, they have no input lag from having to move a mouse and hit keys. They can have ridiculous APM (actions per minute) and essentially see the game with the human player going in slow-motion. Granted a lot of game AI are still too dumb to compete with humans also in more complex games, but we’re getting there.

Anonymous 0 Comments

Computers can do some things that humans either cannot or have a harder time of doing. For example, in a turn-based game such as chess, the computer can look at all possible moves in a fraction of a second. For each of those moves, it can look at all possible following moves in a fraction of a second. While those fractions do eventually add up as you get deeper into how many moves ahead to look, a powerful computer can look far ahead into the game.

Computers can also have huge tables of board layouts which have pre-determined outcomes, allowing it to avoid further computation should a sequence of moves arrive at one of these layouts.

The challenge with games like chess is that the search space grows exponentially large, so even a computer has a hard time looking at all possible outcomes. Programmers can use some conditions to allow the computer to filter out certain boards from further consideration and use the aforementioned look-up tables to keep computation time down. Grandmaster chess players have had some success by making some unexpected moves and thus preventing it from using the lookup tables and any other pre-determined algorithms, forcing it to have a smaller search depth. But as computers get more powerful, have more access to memory, and generally have more data from which their algorithms are designed, they can get to the point where it will be extremely difficult for a human to overcome the advantages a computer has.

Anonymous 0 Comments

We didn’t make the computer to base moves off of moves made in real life. It would be impossible to make a move past turn 30ish because by that point, there are more possible variations than number of games of chess ever played.

We made the computer to be able to analyze whether a position is good, bad, or neutral, and evaluate that for the possible moves the computer can make, and then evaluate from that the possible moves it might be able to make from there. And so on.

As for the general current state of AI in games, computers have some advantages to us, and some disadvantages. A major advantage is the ability to react to stimuli instantly, while a human needs about .1 seconds. A disadvantage is that in chaotic gamestates, it becomes difficult for a computer to evaluate all possible actions, when for a human, it can become intuitive to choose a better than average option. So for each specific game, you have to determine what matters and what doesn’t.

Anonymous 0 Comments

>If we made the computer and it bases its moves off of moves already made in real life

This is the big problem in chess – and also in millions of other games. There are simply billions and billions of possibilities, and most of them have never happened in real life.

In chess, almost every game reaches a brand-new position – a sequence of moves that has *never* been made in history – after somewhere between 6 and 15 moves. Which means even if you had a computer with unlimited memory, with every game *ever played by anyone* saved, it would run out of matches after only a few moves.

Instead of doing that, we make computers that are able to pick their own moves – they look several moves into the future, along thousands or millions of possibilities, and pick the one move that is most likely to win. Computers can do that much faster and more accurately than any human player – there are just too many possibilities once you get a few moves ahead of the current position. The same idea applies to just about any game, because there are just too many possible actions to calculate.

Anonymous 0 Comments

I never fully appreciated how fast computers really were until I started programming. I wrote a simple script to count to 100 on a terrible laptop and it was lightning fast. Now imagine doing that on a powerful GPU. Based on that alone humans wouldn’t stand a chance. AI learns much the same way we do by trial and error but it does it at incredible speeds. The computer also only cares about results and not about how it’s typically done. That’s why many AI bots will find ways to break a game that no one else has.

Anonymous 0 Comments

One of the basic AI algorithms is called Alpha-Beta Pruning. A simpler version of it is called MiniMax. The point of MiniMax is to simulate every step the AI can take, then every step the opponent can take, then AI again, and repeat this until a set simulation depth is reached. This creates a series of calculations where the number of evaluations needed increases extremely fast with every layer of depth you add. The increased number of calculations means slower, but more accurate predictions. For evaluation, there are different evaluation methods. A simple example giving each figure a value and finding a way to make the opponent lose more than the AI does.

The reason the AI is better isn’t that it’s particularly smart, but because it’s fast and can remember a lot. It can generate millions of board states in a few seconds, use a complex scoring system on it, then remember the values it can reach. Deep Blue used a version of Alpha-Beta Pruning. The chess grandmasters described the AI like a dumb wall that’s coming towards them, using brute force processing power instead of intelligence.

If you’re interested in how the algorithm works, Sebastian Lague has a beginner-friendly explanation on youtube, with simple graphs and code examples that show how simple the idea is, but how effective it can be. The video uses pseudo-code, meaning that it’s written in a way that’s easier to understand but isn’t in a real programming language, and it’s also not necessary for the explanation

Anonymous 0 Comments

People forgot to mention computers don’t make mistakes. You can be the best player ever, but you’re human, so you won’t automatically make the best choice each time — in fact, you will mess up at least once in a match. The computer, however, might not always make the best choice; but it will *never* make a bad one. Put simply, the computer won’t be affected by things like time pressure, stress, emotions, etc., unlike players, which gives them a pretty big advantage.

Anonymous 0 Comments

We make books, yet books are much better at holding stories than we are. In the same sense computers are better at calculating the odds of doing certain moves in chess.

If you think about it, most things we’ve invented are better at doing a certain task than we are. Cars move faster, elevators climb faster, knives chop faster. Games are not about thinking, they are about calculating odds, and calculating is that single thing a computer is really good at.

Anonymous 0 Comments

Chess is a game with fininte outcomes and predictable positions and reactions, so the trick is being able to think through all those branching future scenarios, and choose according to which conveys the greatest advantage to you, versus your opponent.

There’s a quote by Douglas Adams I’m quite fond of, and it goes like this:

>The difference between us and a computer is that, the computer is blindingly stupid, but it is capable of being stupid many, many million times a second.

Which is really how it’s beating humans at Chess. It doesn’t have to be smart, it can just plod through every single move, then test all your possible counter-moves, and do this many, many moves ahead, far more than a human will be able to.