{"slug": "queens-die-analysing-a-6m-puzzle-database", "title": "Queens Die: Analysing a 6M Puzzle Database", "summary": "A data mining analysis of 6 million Lichess puzzles reveals 15,782 instances where a queen is lost due to a bishop checking the king with a discovered attack on a hanging queen. The research uses GofChess Language 2.0 to formalize chess tactics and provides a new learning experience by grouping puzzles by motif. The findings offer statistical insights into queen-loss patterns in chess.", "body_md": "ChatGPT Image Generator\n\n# How Queens Die: Analysing a 6 Million Puzzle Database\n\n**A Data Mining Adventure into the world of Lichess Puzzle Database**\n\n**TLDR; AI Summary:**\n\nWhen I read your draft, I still thought\n\n\"Oh, someone categorized tactics.\"\n\nNow I understand it's closer to\"Imagine opening a tactics book where every single exercise demonstrates exactly the same motif—but in thousands of completely unrelated games.\"\n\nThat is a new learning experience.\n\nAnd it's one that only exists because ofGofChess.\n\nHow many ways can you lose your queen in a chess game? There are different levels of complexity where the loss of a queen becomes unavoidable due to a blunder, and presents itself as a chess puzzle in the Lichess puzzle database. In this blog post we will try to answer this question. From obvious hanging of a queen, to knight forks or bishop discoveries, to queen traps or desperado queen sacrifices. We will count them all and present statistical data extracted from 6 million Lichess puzzles. We will break down the numbers and look at real examples taken from actual games.\n\nThen, we will delve deeper into side examples, exceptions, counter attacks, that break the pattern of those simple obvious tactics we present in the first section — making content designed to appeal to more advanced players.\n\nFinally, we will mention the method behind this research, namely **GofChess Language 2.0**, the modernized and significantly improved successor of the earlier version [we introduced this past May](https://lichess.org/@/heroku/blog/gofchess-a-technical-dive-into-formalization-of-chess-tactics/KULHdYDn)\n\nAs a side note: we have built a [showcase of these lists here](https://eguneys.github.io/gofchess-puzzler-27/) where you can solve the puzzles. This is an experience of a new kind, where you are constantly seeing the same pattern but on completely different chess positions.\n\nBasic Patterns\n\nOur overall conclusion over finding these basic patterns is, Queen can always be the first one to save when under a threat, apart from a checkmate, thus the other side of the double threat is usually to the king, where the queen is lost, as the king escapes.\n\nBut before we get started, we want to mention our coverage is not exhaustive, since we don't include every piece combination for every case, but some special cases we find is sufficient for demonstration purposes is included. This is mostly not due to a limitation of the gof scripts, but for the sake of keeping a compact proof of concept.\n\nBishop Checks King with a Discovered Attack on Hanging Queen\n\nFirst we have to explain what exactly we are searching for, and what the corresponding GofChess script looks like to express that:\n\n```\nqueen_t .eyesThrough queen2 .through bishop\n                     .hanging\nbishop_t *Captures opponent *becomes bishop2\n                                  .cannotBeCapturedBy queen2\n         .Checks king_t\nturn  *Captures bishop2 *becomes opponent2\n                                    .doesNotDefend queen2\nqueen *Captures queen2 *becomes queen3\n```\n\nExplanation in English:\n\n```\nOur queen attacks opponent's queen but there is our bishop in between them.\nOpponent's queen is hanging, otherwise has no defenders.\nOur bishop captures an opponent's piece, while giving a check to the king. \nBut also the bishop cannot be captured by their hanging queen.\nOur bishop is captured by the opponent. But meanwhile capturing piece doesn't defend the hanging queen.\n\nAt this point our queen can capture the opponent's hanging queen. Queen is lost.\n```\n\nHere are some examples:\n\n[https://lichess.org/training/00DTg](https://lichess.org/training/00DTg)[https://lichess.org/training/00E29](https://lichess.org/training/00E29)[https://lichess.org/training/00xGN](https://lichess.org/training/00xGN)[https://lichess.org/training/017Ut](https://lichess.org/training/017Ut)[https://lichess.org/training/01Ag5](https://lichess.org/training/01Ag5)\n\nAmong 6 million puzzles, there are a total of **15782** puzzles that fits this description, and solved with this exact sequence.\n\nIf we change our description slightly, such as instead of our bishop capturing something while giving check, to bishop simply moving to a vacant square while giving check, we find roughly about **3216** puzzles. Here's a couple examples:\n\n[https://lichess.org/training/00gSv](https://lichess.org/training/00gSv)[https://lichess.org/training/02ra2](https://lichess.org/training/02ra2)[https://lichess.org/training/02zVb](https://lichess.org/training/02zVb)[https://lichess.org/training/03wTh](https://lichess.org/training/03wTh)\n\nBishop Skewers King and Queen\n\nThis is a basic skewer tactic where bishop checks the king, but also the queen behind it, so when the king moves, bishop can capture the queen.\n\n```\nbishop_t *Checks king_o *becomes bishop2\n         .eyesThrough queen_t .through king_t\nking *Evades bishop2 *becomes king2\nbishop2 *Captures queen *becomes bishop3\n```\n\nWe found only **1053** positions across all puzzles in the database. But while these are exact matches with this exact solution, there are still some different considerations that are not accounted for. Such as the puzzle begins with this sequence but continues, or after the Bishop check, king doesn't evade but there is a desperado block, they are simply not checked for.\n\nBishop skewers were suprisingly low for some reason, let's take a look at rook skewers and queen skewers:\n\n- Rook skewers:\n**4278** - Queen skewers:\n**6780**\n\nKnight Forks King and Queen\n\nThere are total of **69695** puzzles where knight forks king and queen and captures the queen next move. You can view all of them on the showcase website. Feel free to try it out, it's surely a different kind of experience to be bombarded with knight forks all over the place. There is something soothing about it.\n\nPawn Forks King and Queen\n\nDue to dual nature of pawn movement, where it can push forward but only captures diagonally and when there is a piece around, we simply haven't integrated the pawns into the GofChess Language 2.0 yet. Hopefully in the future we can express those just as well as everything else.\n\nThis one is about pawn pushes forward and attacks both king and queen at the same time. We reckon it's quite common, and hope to cover it in the future. We will continue to add more content on the showcase page, so consider adding a bookmark.\n\nPawn Checks King with a Discovered Attack on Hanging Queen\n\nThis one again a rare gem of a tactic, it feels so good to pull this off, it feels similar to a queen skewer we covered before, but when the pawn moves with check, it discovers an attack on the queen by another piece of ours, and when the king evades the check, our piece captures the queen.\n\nImmediately Hanging the Queen\n\nThis one has a surprising result. Let me show you the output of the script:\n\n```\n0.01 ms per puzzle, took 46560ms\nFirstM:6767 N:6002012 F:0 FF:0 T:0 FullT: 5603\nCoverage:0.21% Accuracy:54.70%\nTotal:6014382                                                        \n1579 https://lichess.org/training/0119E\n[Qxf8#] fullTrueMatch\n1: {}\n2: {Qxf8#}\n```\n\nThere are **5603** puzzles where the solution is a simple capturing of the hanging queen. **FullT: 5603** means 5603 puzzles matched our script that the matching moves are also exactly equal to the puzzle solution.\n\nMore interestingly **FirstM: 6767** means 6767 puzzles matched correctly for the first moves to the solution, but the puzzle continues, *or the rest of the match is a false match*.\n\nBut look at the rest of the statistics: **F: 0 FF: 0**, meaning there is no false positives, that is our script didn't match any moves that is not the solution.\n\nThus, if you want to take away anything from this article here it is:\n\nIf you can capture a hanging queen, capture it without thinking. That is 100% correct.\n\nProbably too bold? But the statement actually holds for capturing the hanging queen with your own queen not with any other piece. And it is true within 6 million puzzle database.\n\nAlso note that *hanging* means *it is not defended by any piece*.\n\nInterested in other pieces capturing the hanging queen? Let's take a look:\n\n- Bishop captures hanging queen:\n**FirstM:4479** N:6009499 F:0 FF:0 T:0**FullT: 404** - Rook captures hanging queen:\n**FirstM:8586** N:6001108 F:0 FF:0 T:0**FullT: 4688** - Knight captures hanging queen:\n**FirstM:5035** N:6008963 F:0 FF:0 T:0**FullT: 384**\n\nWe haven't double checked the numbers are correct one by one, but feel free to experiment by viewing and actually solving these puzzles on the showcase page we have linked in the introduction. They are all available, public and free for the community.\n\nInitially we ran these scripts against 4.6 million old database, and when we switched to 6 million database all the numbers have increased, except for these two:\n\n- Bishop captures hanging queen in 4.6 million old database:\n**FirstM:3883** N:4674744 F:0 FF:0 T:0**FullT: 646** - Knight captures hanging queen in 4.6 million old database:\n**FirstM:4481** N:4674070 F:0 FF:0 T:0**FullT: 722**\n\nIf you have an opinion what might have caused this, feel free to share.\n\nAdvanced Exceptions to Basic Patterns\n\nWe already know alwasy we have to capture a hanging queen whenever we can. But let's look at an exception where we have to fork a king and queen, but capturing the queen next move is not the best move. Or merely landing a knight fork on king and queen is not the best move. As you might have guessed there are thousands of those counter examples. We will show you what we mean with several examples, because that's the intersection where the beauty of chess emerges:\n\nKnight Captures The Queen after landing a fork but puzzle doesn't end\n\nWe searched for several patterns for the partial matches and here are the results:\n\n```\n- Knight lands a fork, captures the queen, but also defends their queen, then opponent captures the queen\n  - knight recaptures. Total of **704** puzzles.\n    - The above pattern plus puzzle still continues. Total of **14** puzzles.\n  - knight doesn't recapture instead some other move is played. Total of **32** puzzles.\n```\n\nThe only thing left here after landing the fork is, knight captures the queen, but it doesn't defend their own queen. There are total of **4301** puzzles with that pattern, but we won't delve deeper into this.\n\nKnight Can't Capture The Queen after landing a fork\n\nThis pattern although interesting probably most of them leads to mate. For example, we searched for these patterns after knight landing a fork:\n\n```\n- Instead of knight capturing the queen, rook checks the king, possibly delivering a mate: Total of **215** puzzles.\n  - The above pattern, but the puzzle continues, there are total of **176** puzzles.\n```\n\nAt this point, we stopped our investigation.\n\nQueen Traps\n\nThis one is not impossible to investigate, but a challenge we want to tackle in the future. Maybe for a next blog post about **General Piece Traps**.\n\nMethodology of GofChess Language v2.0\n\nEven though this version streamlines most of the work, it's not fully automated yet. Because the use-cases for the language is still shaping up, we simply keep things flexible, by not working on a fixed pipeline, things change and we don't want to do any more work than we have to.\n\nThe language v2.0 has been written from scratch in Zig Programming Language. It runs very fast, and has a very smooth developer experience. We plan to publish a separate blog post discussing the ins and outs of our development journey with Zig which also inspired the design of v2.0.\n\nTo discuss the methodology briefly, you have already seen the new syntax of gof scripts in previous chapters. In addition we have a separate orchestrator file, that controls which scripts are run against which databases, which is basically csv files with links to puzzles, exactly the same format as how Lichess distributes it.\n\nConclusion\n\nTo conclude this chapter, I would like to thank the Lichess Team, for presenting this amazing ecosystem, outreach to the community and tools that guided me with this entire research.\n\nLichess recently launched the 6 million puzzle database, we started with the old database with 4.6 million puzzles, then we re-run all the scripts on the new database. Numbers have changed, we fixed bugs on filters that categorize the puzzles, re-crunched the numbers. But the results are automated and fully reproducible. If we made any mistakes please let us know.\n\nWe are happy to hear your best wishes to continue this amazing journey, and share our experiences with all of you. What do you think, did we miss some aspects, or have ideas for our next research topic, interested in how GofChess Language works, inspired by another creative use case for it?\n\nIf you want to reproduce the results, or make your own compilations, send us a DM at [https://lichess.org/@/heroku](https://lichess.org/@/heroku) for more information.\n\nMay the Queens of the game of chess bring us all the good luck in the universe that will never die.\n\nPS: I feel like I am having a déjà vu.\n\n[Discuss this blog post in the forum](/ublog/jgN7WEdl/discuss)\n\n## You may also like\n\n[heroku](/@/heroku/blog/proposal-a-roadmapprogression-system-for-beating-bots/NWBa8g8j)\n\n## Proposal: A Roadmap/Progression System for Beating BOTs\n\nA Feature Proposal for Lichess[heroku](/@/heroku/blog/how-many-different-backrank-mates-are-there/gSUlcRkl)\n\n## How many different BackRank Mates are there?\n\nA Data Mining Adventure into the world of Lichess Puzzle Database[heroku](/@/heroku/blog/gofchess-a-technical-dive-into-formalization-of-chess-tactics/KULHdYDn)", "url": "https://wpnews.pro/news/queens-die-analysing-a-6m-puzzle-database", "canonical_source": "https://lichess.org/@/heroku/blog/how-queens-die-analysing-a-6-million-puzzle-database/jgN7WEdl", "published_at": "2026-06-27 12:58:10+00:00", "updated_at": "2026-06-27 13:04:45.499079+00:00", "lang": "en", "topics": ["machine-learning", "ai-research", "ai-tools"], "entities": ["Lichess", "GofChess"], "alternates": {"html": "https://wpnews.pro/news/queens-die-analysing-a-6m-puzzle-database", "markdown": "https://wpnews.pro/news/queens-die-analysing-a-6m-puzzle-database.md", "text": "https://wpnews.pro/news/queens-die-analysing-a-6m-puzzle-database.txt", "jsonld": "https://wpnews.pro/news/queens-die-analysing-a-6m-puzzle-database.jsonld"}}