r/dataisbeautiful • u/Hefty-Example2482 OC: 1 • 1d ago
OC [OC] All 197,281 possible chess games of the first four moves (two per side), colored by Stockfish's evaluation
475
u/Myopic_Cat 1d ago
Calling it "through Stockfish's eyes" and making the data look like an eye is indeed beautiful data.
84
u/Hefty-Example2482 OC: 1 1d ago
Thanks a lot! The eye shape wasn’t planned at first. Once the evaluations were mapped, it started to look like one, and the name came naturally after that.
3
170
u/burnt-store-studio OC: 2 1d ago
Thank you for taking the time to create this. Your presentation is gorgeous and the analysis is quite interesting!
51
u/Hefty-Example2482 OC: 1 1d ago
Thank you, that means a lot! The part that surprised me most was how the rings flip between gold and blue: almost any random move helps the other side. In the interactive version you can follow any line move by move.
25
u/Not_PepeSilvia OC: 1 1d ago
By definition, there is usually only one move (the best move) that will keep the ring the same color as the previous line. Every other move will make it closer to your opponents color.
And considering the sheer amount of blunders one can make in any given position, most moves will make it much closer to your opponents color.
8
2
2
u/Loud-Interview-381 1d ago
Curious what this would look like with all blunders filtered out. you could maybe leave them as gaps
5
u/Wide-Common7458 1d ago
Appreciate you saying that, the colors really do make it way easier to parse than a giant table of numbers
I keep coming back to how clean the inner ring looks with those first move labels, it's like a weird flower made of opening theory
Makes me want to see the same treatment for the next four moves but I'm guessing the file size would be biblical
2
2
u/Mc_Shine 1d ago
I beg to differ. OP used blue and gold colors instead of either white and gold or blue and black.
-2
1d ago
[deleted]
2
u/burnt-store-studio OC: 2 1d ago
I had to look up “astroturfed” 😬
I’m sorry it reads that way. It isn’t, I promise you that. In the past I started including a disclaimer about knowing I have a peculiar writing style and apologizing for it. Maybe I should start that up again 🤷♂️
71
u/Hefty-Example2482 OC: 1 1d ago
Data and tools:
- Every legal game of the first four moves (197,281 games, 77,860 distinct positions), enumerated with a JavaScript move generator checked against the published perft counts.
- Every position scored by Stockfish 19 (full NNUE). Search per ring: 20 million nodes for White's first move, 400k for Black's reply, 50k for White's second move, 5k for Black's second move.
- Drawn on an HTML canvas. Each line takes the score of the position it leads to: gold = White better, blue = Black better, gray = equal.
Interactive version (zoom in, click any move, switch the Stockfish view on): https://allchesspositions.com
A few things that stood out:
- Only 6 of White's 20 first moves keep a plus score. The top four are within 0.1 of each other (1.Nf3 +0.23, 1.c4 +0.21, 1.d4 and 1.e4 +0.14), so that is basically a tie. The worst is 1.g4 at -1.31.
- The rings alternate: 48% of Black's replies give White +0.3 or more, 45% of White's second moves give Black the same, and 54% of Black's second moves give it back to White. A random move usually helps the opponent.
- 16 of the 8,902 lines after White's second move are already forced mates for Black: Fool's mate and its mate-in-two cousins.
3
u/godnkls 1d ago
Alternation of rings shows in a very interesting way that you are responsible for losing in chess, as you made a losing move that allows your opponent to capitalize.
2
u/c0wboyroy30 10h ago
I had a similar thought but was having trouble in how to say it. Concise and well written explanation.
3
u/APocketJoker 1d ago
I know this varies from PC to PC but how long of a search is this in terms of time? Let's Say on a typical reasonably priced home gaming PC like Intel Core 15, 16 GB RAM, 8GB Nvidia GForce which is a good PC but not a insanely priced one. I know nobody can say exactly, but how long are we talking within about an order of magnitude at home? Are we talking hours, days, weeks? I have done this on various versions of Stockfish over the years and have always seen it jump from e4 to d4 to e4 to d4........every few layers of extra depth if you let it run for hours.
2
u/apooooop_ 1d ago
I do think if you make the fourth board position length proportionate to play frequency over a relatively large opening book, and do a kinda weird sort, you probably could get a pretty close approximation of the way a eye narrows in the middle and lengthens on the edges.
1
48
u/DeliberateDendrite 1d ago
No wonder chess has not been solved yet. The sheer number of possible moves is incomprehensibly large.
53
u/Hefty-Example2482 OC: 1 1d ago
Exactly, and the picture only covers two moves each. After four moves each there are already 84,998,978,956 possible games, and the number of legal positions is estimated at about 4.8 × 10^44. The part that has been solved is the endgame: every position with seven pieces or fewer. There's a page with the details here if you're curious: https://allchesspositions.com/is-chess-solved/
28
u/IAmAnIdiot0713 1d ago
Somewhere in here is bongcloud opening
2
2
15
u/Pennet173 1d ago
Per this chart, e4 seems pretty good. Do chess players know about this?
7
u/seejoshrun 1d ago
Based on my chess.com experience at 500 elo, yes. Probably over half of games start with e4, e5. Not sure whether it goes up or down once the players are actually good
6
u/MattieShoes 1d ago
e4 and d4 are by far the most popular. c4 (English) gets more popular at higher ratings, once people are familiar with the Sicilian (1. e4 c5) because starting with c4 is kind of like playing the Sicilian with an extra tempo. But the Sicilian is complicated AF with deep theory, so most normal humans check out. I certainly don't know it.
6
6
u/cylon37 1d ago
Beautiful!
So, the outer rim is nearly 200,000 blue or gold dots. But my screen resolution is barely above 4000 wide. So, what am I seeing? Averages of about 50 at a time?
1
u/MattieShoes 1d ago
Really depends your device. There are fast and slow ways to resize images.
2
u/1kSupport 1d ago
Really doesn’t depend on device, the image itself is far smaller resolution than the data. It’s not like the pixel data has all 200,000 distinct values and it’s their phone that is sampling them
1
u/MattieShoes 1d ago edited 1d ago
Mmm maybe. The image is over 29 million pixels, so that yields just under 150 pixels per game. I'm assuming "game" hear just means leaf node.
We're obviously using them super inefficiently here but I don't think we're seeing averages in the actual image.
EDIT: never mind, I changed my mind. I think we're seeing individual stuff for the first 3 ply, but the 4th ply is probably some image processing average. That is, probably rendered with no averages, but in shrinking the image down to a mere 29 million pixels, a bunch of pixels are getting averaged together. But there's 101 berjillion different image scaling algorithms.
1
3
u/NickyNek 1d ago
Nice data. Maybe would be interesting to have another chart with the moves weighted by move popularity?
4
u/Hefty-Example2482 OC: 1 1d ago
Yes, I am also thinking about this. Maybe I can add this on my "eye diagram" tomorrow. Follow www.allchesspositions.com for developments!
2
u/mgm97 OC: 2 1d ago
There are a few that are scholar's mate right? Are they visible?
2
u/Professional-Class69 1d ago
Nope because scholars mate takes 4 moves. There should be one fools mate though
1
u/mgm97 OC: 2 1d ago
Ah that's what I meant. I think there would be a few though since white could move either pawn first, black's pawn could go 1 or 2 spaces, and whites F pawn could go 1 or 2
1
u/DuckDatum 1d ago
Would that not be a fools mate?
2
u/happy2harris 23h ago
Swapping the order of moving the two white pawns is definitely fools mate as it results in the exact same position. Black moving the pawn one of two squares also makes no difference either to the technicality or aesthetics so that would be too. While moving f4 also makes no difference technically, although it is aesthetically different.
There is no official definition anywhere, but I think most people would call them all fools mate.
2
u/polomarkopolo 1d ago
I dunno what I am looking at... I dunno about the data part.... but it sure is beautiful
2
u/rafioo 1d ago
It’s incredible how balanced chess is - in the sense that the advantage one side has over the other is minuscule, and what truly matters is pure skill.
Whoever invented chess several thousand years ago simply had a brilliant idea. In all likelihood, it’s quite possible that the specific game you just played was entirely unique, literally something that had never occurred before in the thousands of years the game has existed
7
u/I_am_so_lost_hello 1d ago
White has a 10-20% advantage at the grandmaster level, which is why they play a series of games.
2
u/garrettj100 10h ago edited 10h ago
Whoever invented chess several thousand years ago simply had a brilliant idea.
Nobody invented chess several thousand years ago. It’s been changed a half-dozen times over that span. Bishops used to move no more than 2 squares. The queen, only 1. Pawns used to advance only 1 square on their first move as opposed to 1-2. En passant was created. Castling. Under promotion. Stalemate used to be a loss.
2
1
u/simonbleu 23h ago
I mean, chess IS symmetrical, isnt it? Both sides have the same pieces and positions as well as possible movements up until one chooses a distinct one
7
u/matthoback 21h ago
No, it's not symmetric because white goes first.
1
u/simonbleu 19h ago
Which I mentioned.... I meant the actual possible states. If you switch the colours of the pieces, nothing would be invalid except the order on which they begin with.
2
u/tripudiater 19h ago
Checkers is the same but it’s a solved game.
1
u/simonbleu 19h ago
I never spoke about it being solved or not, I spoke about the types of states for each player
0
u/reichplatz 8h ago
Why would it be unbalanced? It's not StarCraft, the sides are basically identical.
2
u/DiseaseRidden 7h ago
Because one side has to go first
0
u/reichplatz 7h ago
That's why chess deserves a praise for being an amazingly balanced game?
1
u/DiseaseRidden 7h ago
I mean, im saying that thats how it can be unbalanced. Like yeah, the sides are basically identical, but one side has to go first.
•
u/Scrapple_Joe 2h ago
You should try out ouk it's all the same pieces but they setup differently and move differently
1
1
u/skyniteVRinsider 1d ago
Got it, so as white, moving knight into corner or exposing king and knight with a short pawn movement are worst openings.
Attacking with bishop's pawn (which frees Queen) is an extremely strong move.
Make sense, but are interesting.
1
u/Envenger 1d ago
How much more data would you need to add the next 2 moves? And would it be doable should you have a super computer?
1
1
1
u/Herr__Lipp 1d ago
What I find really interesting is the white/black advantage by turn.
It seems like turn 1 is a wash, turn 2 is white, turn 3 is black, turn 4 is white. Simply put, whoever moved last now has the advantage (in general)??
I wonder if that trend continues along move 5 and beyond?
9
u/Own_Pop_9711 1d ago
It's a bit misleading. In general in chess most moves are bad, so if it's your turn to pick a move your slice of the wheel will be colored like the other side is winning, because they would be if you picked any of those bad moves.
1
u/MattieShoes 1d ago edited 1d ago
It's an artifact of search.
To search, one uses minmax algorithm of some form, so the only child node that affects the parent node's score is the one with the highest score (or lowest score, depending on viewpoint).
If you want a clearer visualization... Say we have a game. I have 10 bags, and each bag has 10 items in it. In this game, you will pick the bag (ie. make the first move), and I will pick an item from that bag and give it to you. But I'm an asshole, so I'm gonna give you the WORST item in that bag.
So if you inspect bag one and see there's a brand new car in there, does that matter? Only if everything else in the bag is better than a brand new car. If the second item in that bag is a rotten fish, and now the car is irrelevant because you're AT BEST getting a rotten fish. If the third item is a million dollars... Don't care, you're getting the rotten fish.
So in this picture, we're seeing the brand new car, the million dollars, the date with Emma Stone, the around-the-world cruise, the vacation house in Rome... and there's a teensy tiny little sliver in there that's rotten fish. But the only thing that matters is that rotten fish because the rest ain't gonna happen.
1
u/LuminousGrue 1d ago
Well yeah - if you were the last player to move that means your opponent is in checkmate
1
u/garrettj100 10h ago
It’s not really possible to fuck things up that badly in just one move. The potential to fuck things up goes up a lot once the position makes demands, demands that you are now capable of ignoring.
Remember, Stockfish’s eval assumes optimal moves that follow the current position even if that position was arrived at through terrible initial moves.
0
u/HDYHT11 1d ago edited 1d ago
I think it would be cool to see the evaluation from the perspective of who makes the move. That way you can see how many moves lose vs equal vs win.
Also, "equal" in chess is a different result, so I would use a third colour (white?) for -1 to +1.
Overall, good idea, and would love to see other, sharper positions
0
u/LurkerFailsLurking 1d ago
This is genuinely impressive AND beautiful AND fascinating. Absolutely flawless
-6
u/Weshtonio 1d ago
The Internet might be dead, but at least bots can create some nice content to keep us humans entertained.
7
u/Hefty-Example2482 OC: 1 1d ago
Bots? Bro...
-3
u/Weshtonio 1d ago
Yeah? No LLM was used in creating this website, or replying in this comment section?
If all you do is copy paste a bot's answers, what's the difference?
5
u/NightsWatchh 1d ago
insane how you’re getting downvoted for calling someone out for using an AI to make a post and then using an AI to come up with all their replies
-2
u/Hefty-Example2482 OC: 1 1d ago
Yeah I did use AI to make this graph like others doing. Also I did use AI to write my replies because I am not a native speaker, so I wanted to make sure that my reply is correct and understandable. Is that a crime?
3
u/NightsWatchh 1d ago
I just think it’s rich you call this OC when you didn’t make anything and then take credit for how much time it took when you just threw it in Claude to make an image lol
If you don’t think it’s a crime or shameful you should have put a disclaimer in the post body that this was made with AI. Am I suddenly meant to believe you didn’t also get the data/info by asking AI too?
2


•
u/cavedave OC: 115 16h ago
Thank you for your Original Content, /u/Hefty-Example2482!
Here is some important information about this post:
View the author's citations
View other OC posts by this author
Remember that all visualizations on r/DataIsBeautiful should be viewed with a healthy dose of skepticism. If you see a potential issue or oversight in the visualization, please post a constructive comment below. Post approval does not signify that this visualization has been verified or its sources checked.
Not satisfied with this visual? Think you can do better? Remix this visual with the data in the author's citation.
I'm open source | How I work