# How many chess games are possible?

How many games of chess are there?

So, there is a popular fact that

the number of games of chess is greater

than the number of atoms there are in the observable universe.

This is the fact. Is it true?

Well, the number of games of chess is known as Shannon’s number

so let’s find out what is Shannon’s number, and how it was worked out.

Claude Shannon. He… in the 1950s he wrote a paper “How to program a computer to play chess”

…It was about how to program a computer to play chess.

And in that paper he came up with an estimate for how many games of chess there are

So it is only an estimate.

So he estimated that the number of games of chess would be

Ten to the power…round about ten to the power 120

Which is… well, just massive! It’s billions and trillions of googles

It’s so massive, that’s a huge number.

If we compare that with atoms in the observable universe

there’s about ten to the 80 atoms in the observable universe

so there are more games of chess

You could assign billions of games of chess for each atom in the universe.

How did he come up with this massive figure?

So what he decided was, well, he looked at some games of chess and he said

Well, on average, at any position, there are about thirty legal moves that you can make.

So, the first player would have thirty legal moves he could make

And if you do two moves, that’s the first player then the second player

Then that would be, for each move by the first player

the second player would have thirty.

so if was only two moves

It’d be thirty by thirty

So that would be NINE HUNDRED already, just with two moves

Some terminology here: when I’m saying *moves* I actually mean what is called a *ply*

That means that one player goes first, then the second player goes next, then the next player…

So in chess terminology a move is the white player then the black player

So another move would be the white player again, the black player again.

But we’re just going to say *moves* to be: each player takes a move

It’s actually called a ply in chess terminology.

So if the first player has 30 legal moves he can make

Then for each move the second player has another 30 legal moves he can make

So with just two moves there are nine hundred moves you can make altogether.

If it was three moves, it would be 30 by 30 by 30

If it was four moves, it would be 30 by 30 by 30 by 30.

Shannon said, Well, a game is about 40 moves.

Ah, that was in chess terminology, so he means 80 plays.

So…

This is all Shannon did, he said

A game is about 30 legal moves…

80 plays

and that is around about 10 to the 120.

BRADY: Well that is the most wishy-washy…

JAMES: Yeah. It was only in passing, it was only an estimate, it was only a paragraph of the paper

And he did this rough estimate, this rough number, to show that if you had a computer

and it was trying to work out then the future of the game, and trying to work out

all the legal moves and where this game was going to go

so that it could make decisions, sort of, how to play next…

Then, the computer would never make a move

If it was calculating one game per microsecond it would be until the end of the universe

it would never play. This was the point Shannon was trying to make with this rough estimate.

So we’re going to have a look at a sequence of games there are when each player takes their turn.

So the first move is by white.

So…let’s take the first move, and white has twenty legal moves.

So we’ve got…we’ve got one here for each pawn, so that’s eight.

We’ve got the double move there by each pawn, so we’ve got sixteen.

We’ve got two moves there for each knight…two moves on this side here and here…

And that’s twenty.

So, twenty moves for the first player. Now black takes the next turn

And for the next turn he can respond with the same twenty moves.

So for each move player 1 takes, black can take twenty moves, so you multiply, it’s 20 by 20…

There are now 400 games that could have happened, already.

With just two moves there are already 400 games that could have happened.

Let’s see what happens next. Then suddenly it becomes much more complicated.

When white plays next it becomes…8902 moves. Suddenly, phoof! 8000, well, nearly 9000 games that you can play, with just 3 plays.

BRADY: This sounds a lot more precise than what Shannon was doing, this is real numbers.

JAMES: Yeah, these are real numbers. With these small numbers we can work this out.

So far so good — it’s going to get harder with larger numbers.

So, let’s write out a few more.

The next move is black, and he’ll have 197,742.

So after black moves again we now have 197,742 possible games that could have been played.

All the possible games we could have done in those four moves is already 200,000.

BRADY: This is crazy.

JAMES: Huge numbers already, huge numbers.

BRADY: Although, you are able to know exactly what the number is, so it just seems like

if you spend enough time on this you’ll be able to…

JAMES: So OK, we can keep going can’t we? So we can keep going

and these numbers are going to get bigger and bigger

Now, in theory, the total number, the largest number, the longest chess game can be…

something around 11,800 of these plys.

11,800.

That’s invoking though, you have to invoke the 50 move rule, cause you could just go on forever,

if you just ended up with two kings, just going backwards and forths.

A game could last forever. So there is a rule that stops a game lasting forever that says:

Well, if you’ve played 50 moves with nothing being captured, and you’re just messing about–

BRADY: Or a pawn being moved, isn’t it.

JAMES: Yeah it’s a pawn hasn’t moved, something hasn’t been captured,

or you repeat the board three times. If that happens then you call it a draw.

So there’s a cut-off point. Now some people have worked out what the longest possible chess game is…

It’s something around 11,800. There’s some disagreement, not much disagreement though,

Within, a hundred or so of that.

So if you see how fast this sequence is growing, can you imagine how many games there are

altogether. Especially when you’re going all the way up to nearly 12,000 moves.

Some of those games would be nonsense games, where you can win,

you’ve only got one move left and you can win in one move, but you don’t,

you start moving other pieces and you start doing other things.

It becomes a massively complex tree of possibilities

and that’s why this number is, just, going off to a HUGE numbers.

Godfrey Hardy, a famous 20th century mathematician

He tried to estimate the number of chess games there were.

His estimate was ten to the power ten to the power fifty.

Let me say that again: it was 10^(10^50).

This is miniscule when you compare it with what Hardy’s estimate was.

What Shannon was doing was saying, “This is a forty move game, where the average number of moves is thirty.”

So he was saying that if there were 80 plays, that’s what he’s saying,

He’s saying this is about ten to the power 120.

That’s what Shannon is saying.

So he’s not even considering all these other games.

So it was Godfrey Hardy, the famous 20th century mathematician – worked at Cambridge, discovered Ramanujan,

He tried to estimate how many games of chess there were.

It was actually when he was writing about Ramanujan, cause Ramanujan had sent him a paper which had a large number in it

He said, “Just to understand how big this number is, if you compare it to the number of games of chess

I reckon that’s 10^(10^50).”

Was Hardy close? I don’t know. He didn’t give any working out for this, this was in passing

I did say a lot of these would be nonsense games; let’s try some sensible estimate.

If it was, let’s say if each player had an average of three sensible moves,

instead of thirty legal moves. Same sort of idea. If we did that…

So instead of 30^80 it would be, say, 3^80. Does that seem more reasonable? Yeah?

So that’s 3^80, I can tell you that’s around about 10^40. So now not as large as the number of atoms in the observable universe

Still, still very large though, 10^40.

If for example, everyone in the world paired off and they had to play a game of chess every day

and it had to be a different game every day, and they did that…

To play all possible games, this 10^40 sensible games

it would still take you trillions and trillions of years to play them all.

Or if you think about it another way

If we consider all games of chess that have ever been played in history,

then that is only a tiny fraction of all the possible games of chess there are to play.

BRADY: I can’t think of a better supporter for a video about chess than a company called squarespace.

Now if you want a presence on the web, whether it’s a blog, a business, or just a cool way to tell the world about what you’re doing,

then squarespace is a super resource.

I host my own blog on squarespace, and it’s so quick and hassle-free.

In a matter of minutes I can have anything up on the web, looking great —

and that’s looking great on both computers and mobile devices, which is often the hard bit.

Now whether you’re a bit of a novice, or you are a coding grandmaster

squarespace will give you as little or as much control as you like.

So whatever your endgame, you really should…check them out (see what I did there? “check them out”).

“endgame”, it’s pretty good that. Anyway.

They’ve got a great range of templates to get started. Then you can tweak them, play around until your heart’s content.

And I’m not just saying this because they’ve sponsored today’s episode

which they have, and thank you for that,

but I am a happy customer. Now you can have a 14 day free trial, give it a go before you commit, no credit card required,

and then if you do like them, you can get 10% off your first purchase.

Go to squarespace.com/numberphile

And thanks to squarespace for supporting this episode.

As they like to say, “Build it Beautiful”

BRADY: Do you play chess?

JAMES: I do play chess, I know chess, I’m no expert on chess, I’m no grandmaster.

I play chess for fun perhaps. I used to play chess with my dad.

So the machine calculated all the possible games?! That means all the grandmasters games that has ever been played before had only be predicted by computer O.o daymm computers can predict future

you realize how ridiculous the term "sensible moves" is to chess players right?

Ramanujan : man who knew infinity

I think there are infinite games since each new move is a different game you can pretty much go on for infinity

1:18 Numberphile loves KINGS GAMBIT

8:50 ramanujam…. proud of India.

mindeblowing

The thing about chess is you have to eliminate some games because they transpose into the same game through a different move order.

Never play f3!!!

Do any of these calculations take into account that the number and type of pieces on the board at any given time can be (at some point is) fewer than at the start? Or that pawns (few possible moves each turn) can promote to queens (or any other piece-lots of moves per turn)?

I guess you would also have to define what “a game” is. Is it the journey or the destination. So is a game the sequence of unique moves, the ending position, or both? What if a 70 move game is duplicated and is exactly the same except moves 49 and 51 were played but in reverse order?

Всего 20 вариантов ходов, а не 30. Шеннон в шахматы играть умеет?

Please do this for the game of "go"

Why does it look like he’s having fun doing math🥴

Im a good chess player.not expert but a good player.i agree there are more or less endless combinations on chess games.its very complex n sometimes not a right or wrong move to make.but i think if you get good you can just look at it and think whats the next best move.you dont have to run through every alternative combination to make a good move.and i dont think theres that many combinations if you just think of the present game and the next couple of best moves to do.

So many moves to choose from. No wonder I can't find the right move.

This is the valid reason why Kasparov lost to the computer.

Actually, there are infinitely many possible chess games. That is because neither the threefold repetition rule nor the 50 move rule force a game to be drawn, they merely allow a player two claim a draw, but both players can choose not to. So chess games are not bounded in length by the official rules.

technically one game could go on for the rest of time.

So in other words, we can't even calculate how many games are possible with chess… the number's too great.

GM: I know anything on chess

after watching this video

GM: Im didnt know anything about chess

But how did you get these numbers?!

64

Could you do some thing about Rubik's Cube?

I don't think this can be calculated

Atleast 10k games

it it was 5 moves,then it will be ferty by ferty by ferty by ferty by ferty!

You are crazy man the universe is infinite, how can existe more possibilities in an chess game than atoms in the u iniverse you are crazy

Googolplex 🤣

How many games can Alphazero play against itself on a single day?

Hey hey i knew chess was greater than our univers and now i Can prove it

If you counted the number of Planets in our Galaxy , one per second.

How long would it take ?

.

.

.

.

34,700 Years.

Did anyone notice that the game they showed was the inmortal Anderssen vs Kieseritsky?

P-Q4

👑👑👑👑👑👑👑👑👑👑

What it it's Star Trek 3D chess? Leonard Nimoy.

King’s gambit? Really?

I'm not a mathematician, and perhaps I'm missing the boat. But I don't see the use of taking x number of possible plies for each position and raising it to the power of y number of possible plies in a game, because for a given board position, the number of possible plies will vary from 0 (this is known as checkmate), to 1 (this is known as a forced move), to 2 or 3 or 4, up to many more than 20 in some positions, if the player has several pieces left and lots of room in which to move them. Around 9:25 you say, Suppose there's an average of 3 sensible moves per board position. What qualifies as sensible? If you really have figured out somehow that it averages out to about 3, congratulations, I have no idea how you did that. I don't see any way of reducing the complexity of the question of possible chess games. Apparently someone ground out the actual number of possible games for the first 4 moves. I don't know how to avoid having to keep grinding out the actual numbers. Maybe some genius mathematicians really have found some shortcuts here. If so, hats off to them and you.

He says look true.But all moves possible for my opinion in chess are 30^300!.FACTORIAL=! KARL!!!

I was a children's chess coach. Most games are not best moves. Sometimes not even legal. Lol

Always get the impression this guy has spent too long teaching small children and got stuck in his way.

Yeah being a chess player is like explorer of the universe.

Impressionante! (Or in English: amazing). Excelente Vídeo. Amo Xadrez.

I believe most of those moves are illegal and/or meaningless. Still. it's monstrous..

Now you've just got to calculate how many of those would've been in a checkmate and therefor over :p

When pieces are eaten on game.. that limits the possible amount of moves fast …. that 10 to 120 aint even close to accurate in reality .. its impossible to keep playing 40 turns/ moves what ever , without eating pieces along the way. and there are countless of plays that limits the legal moves just for one or two pieces to be able to move at given time..

Just shows how simple math does not work with reality sometimes.. specially when idiocy of an man who plays is an other factor.

The son of Johnny Lyndon

dont get mistaken with the number of how much different positions are possible because that number is much lower

Well technically if somebody didn't call stalemate that game would go on forever

as far as i know the number of possible game variations is in SKAT even higher!

Theres gotta be way more than 10^80 atoms in the universe

Players have 20 legals first moves not 30 (8 pawns x 1 OR 2 squares + Knights have 4 options) why not use 20 (the right #) for ur example instead of 30. I mean thats just irritating

movesSneeky Chess reference 'in passing'.

This is such horseshit…

how was the 3 and 4th moves calculated

of course this depends on the previous move.

8902/400 is 22,255

but what i don't get is if white moved a knight that the number of moves would go up to 21

so how was the number 8902 reached?

Actualy you can play for endless period of time :/

Im guessing that their estimates are wrong because they dont the en passont rule

how 8902 in the third move is calculated?

I don't know if anybody noticed but checking the comments no one mentioned that there are only 20 legal moves for the first turn, thus only 400 combinations for the first turn alone (not 30 x 30 = 900).

Your other videos are great but this one is quite frustrating actually.

Whoa my mind just exploded

The number of how many different setups 7^64

This is just a joke tho

64*32 ez

4 moves = checkmate

"There is a popular fact that the number of games of chess is greater than all the atoms in the obersvable universe. But is this true"

Since ypu failedto answer this question. I will.

No, that is obsurd. 7*10^27atoms in the HUMAN BODY! The number of atoms in the observable universe DWARFS the number of games of chess out there.

All we now need is a learning matchbox computer for chess

there are effectively an infinite number of chess games. if one player moves the bishop, and the other one moves the bishop, what prevents them from going back to the previous position? what prevents them from doing it infinitely?

EDIT: whoops, made the comment before he talked about the draw rules

math + chess = perfect

Dude built like a dorito

30^80≈10^118

what are supposed to do with this information?!

But google's alpha zero mastered chess in just 4 hours and defeated stock fish 8 , the most powerful chess engine.

If the point is to say how many possible games you need to calculate the actual amount, no matter whether it was logical

Can’t they both just play a Bishop going to a square that’s not check, and then move it back and do that an infinite amount of times

Ok sorry I just watched 6:40 never mind. Also I remembered the threefold repetition rule anyway

Kasparov has played them all

wouldnt you have to take into account moves that resulted in the game ending?

In the first second I noticed the guy is nerd enough so I decided to keep on watching.

O wait you can resign at any time. Take that into calculate

I love the idea that the numbers of possible chess games are finite.

I just clicked on this video because I didnt understand the Question in the title, lol

I never understood this question, there are actually infinite games, you can repeat the movements infinitely, changing once every 3 to avoid draw.

I commented before ending the video.

It is infinite really

The guy give me creep

Couldn’t believe it for once when he said its more than the atoms in observable universe! That’s crazy talk!

-1/12

Technically there is an infinite number of games that could be played as one player could just move a piece such as the queen back and forth an infinite amount of times adding one of for every game

Is it one of np problems

3:11 Can someone call a priest? No, seriously

Thank you. Now I know that i am really just bad at chess, i always thought that the computer knew what play i will do. I feel even worse now.

So many possibilities yet everyone plays the London

Hypothetical possible number is literally infinite. You can cycle the same series of movements over and over for both sides with slight variations each time so they do not repeat. Assuming you do not put the 50 move rule in.

There is an infinite amount of chess games possible…

More accurate to ask how many legal positions are possible, as many exact endgames, with exact pieces on squares and other board considerations can be reached multiple ways

Can't wait to get quantum computers so we can finally calculate the true value of this sucker

This video is 10 mins too long

number of 52-card deck shuffles is ~ 10^68

Moral – Never play a chess game.

technically wouldn’t it be infinity since at the end you could have your king run around the board and your opponent will be in on it as well therefore your game will never end and every move will create a different way you can play

There is an infinite amount of chess games if we think about that the 2 players can for example move the same queen for example back and forth without doing anything, and that can be done not with the queen only, so there is an infinite amount of chess games.

at 3:45 cant he do the rook king thing…