Dans cet article de blog, nous utiliserons des statistiques dures et froides (et Python) pour calculer les meilleurs pièges d'échecs ! ??
🪤 Qu'est-ce qu'un piège aux échecs ?
Commençons par une définition :
Un piège est une position où un joueur est susceptible de jouer un coup qui, lorsqu'il est suivi d'une réponse optimale, aboutit à une position où le joueur est susceptible de perdre.
Cela signifie que la qualité d'un piège peut être jugée par deux scores :
Probabilité
Quelle est la probabilité que le joueur joue le coup suivant dans la séquence de pièges ?
Un bon piège devrait avoir une forte probabilité que le prochain mouvement de la séquence soit généralement choisi.
Puissance
Quelle est la probabilité que le joueur perde après être tombé dans le piège ?
Un bon piège devrait être mortel une fois que votre adversaire est tombé dedans !
Dans l'analyse ci-dessous, je filtre sur les jeux blitz, rapides et classiques entre joueurs classés entre 1600 et 1800 - la base de code Python qui accompagne ce blog vous permet de choisir vos propres filtres.
Un exemple
Commençons par un exemple de piège d'échecs classique — le piège principal du Gambit de Stafford (1. e4 e5 2. Cf3 Nf6 3. Cxe5 Nc6 4. Cxc6 dxc6 5. d3 Fc5 6. Fg5).
6. Fg5 s'est produit 3 050 fois et est fatal pour les blancs, car les noirs peuvent sacrifier la reine pour une victoire. En fait, 80% des parties sont désormais gagnées par les noirs après 6. Fg5.
Mais…
Cela ne reflète toujours pas la véritable horreur du coup 6. Fg5, car dans certains de ces jeux, les noirs n'ont pas trouvé la réponse optimale (6. … Cxe4), offrant la dame en échange du mat.
Si les noirs jouent le 6 optimal. … Nxe4, le pourcentage de victoires pour les noirs s'élève à 95,6%, la plupart des parties se terminant par le mat suivant.
👨🏫 Calcul du score de piège
Calculons maintenant les deux statistiques de piège ( probabilité et puissance ) pour la ligne 6. Bg5 du Gambit de Stafford.
Probabilité
Pour calculer le score de probabilité pour la ligne 6. Bg5 du Stafford Gambit, nous devons calculer la chance que l'adversaire tombe dans cette ligne, dès l'ouverture. Notez que nous ne pouvons pas simplement utiliser le fait que cela s'est produit 3 050 fois comme indicateur de probabilité, car nous n'avons besoin de calculer que la probabilité que le blanc suive la ligne trappy, car le noir est supposé jouer pour le piège.
Multiplier les probabilités ensemble donne une probabilité de 0,69% que vous obteniez cette ligne - en d'autres termes, environ une fois tous les 145 jeux.
Techniquement, la chance est légèrement plus grande que cela car d'autres ordres de mouvement peuvent conduire à la même position sur le tableau, mais pour cette analyse, nous ne tiendrons pas compte de ces lignes obscures.
Afin de comparer des lignes de longueurs différentes, nous prenons la moyenne géométrique des probabilités, pour donner la probabilité moyenne que l'adversaire joue le prochain coup requis en séquence. Par exemple, pour la ligne Stafford Gambit à 6 coups, la probabilité moyenne par coup est de 0,69% ^ 1/6 = 43,6% .
Donc…
Score de probabilité = 43,6%🚀
Puissance
La puissance du piège est le pourcentage de victoire de l'équipe adverse, étant donné que la réponse optimale est jouée. Ainsi, la ligne 6. Bg5 du Stafford Gambit est puissante à 95,6% .
Notez que je n'utilise pas de moteur pour calculer la puissance. Le moteur donne -4,4 après 6. … Nxe4, mais cela ne reflète pas la vraie tentation d'un joueur 1600-1800 d'attraper avidement la reine, sans se rendre compte qu'il se dirige vers le mat.
Donc, pour cette raison, nous nous en tenons à utiliser les données des jeux réels. Cela nous permet également de créer un intervalle de confiance autour de chaque score de puissance ! Le pourcentage de victoire de 95,6% pour les noirs est pris sur 1 667 jeux, ce qui donne un intervalle de confiance à 95% entre 94,7% et 96,6% de puissance.
Score de puissance = 95,6%🚀
🎯 Score de piège
Nous calculons le score global du piège en multipliant les scores de probabilité et de puissance… 43,6% * 95,6% = 41,72%
Score de piège = 41,7%🚀
Résultats
Comment les autres pièges se comparent-ils ? Voici le classement jusqu'à présent
Le Stafford Gambit règne en maître ! C'est le mélange parfait de puissant et probable…😀. Il a également de nombreuses autres lignes de côté trappy qui en font une ouverture particulièrement difficile à gérer, si vous ne jouez pas avec précision.
Une version interactive du tableau de bord est disponible ici .
Défi
Quelqu'un peut-il trouver une séquence de mouvements qui obtient un score supérieur à 41,7% ?
MISE À JOUR: Cette ligne différente du Stafford Gambit obtient 43,8% 🎉
Learn Anything Faster By Using The Feynman Technique
Richard Feynman is considered to be one of the most miraculous personalities in scientific history. The 1965 Nobel prize winner on QED (along with J. Schwinger and Tomonaga), Dr. Feynman was a remarkably amazing educator and a great physicist. Feynman, along with many other contributions to science, had created a mathematical theory that accounts for the phenomenon of superfluidity in liquid helium. Thereafter, he had fundamental contributions (along with Murray Gell-Mann) to weak interactions such as beta decay. In his later years, Feynman played a significant role in the development of quark theory by putting forward his Parton model of high energy proton collision processes. He also introduced basic new computational techniques and notations into physics. Besides being a physicist, he was at various times repairer of radios, a picker of locks, an artist, a dancer, a bongo player, a great teacher, and a showman who successfully demonstrated the cause of the 1986 Challenger Shuttle Disaster as part of the Roger’s Commission.
A truer description would have said that Feynman was all genius and all buffoon. The deep thinking and the joyful clowning were not separate parts of a split personality… He was thinking and clowning simultaneously.” — Freeman Dyson, 1988 remark on Feynman.
The genius of Richard Feynman in evident from his three-volume books on physics called The Feynman Lectures on Physics, which are based on his lectures at Caltech during 1961–1963.
In his teenage years, Richard Feynman’s high school did not offer any courses on calculus. As a high-school teenager, he decided to teach himself calculus and read Calculus for the Practical Man.
Feynman always believed that if one cannot explain something in simple terms, one doesn’t understand it. A similar quotation is attributed to Albert Einstein as well. Whether or not it originally comes from Feynman, the idea is elegantly true and is, in fact, the basis for the Feynman technique of learning things. Feynman is often attributed as The Great Explainer for his ability to explain complicated concepts in science, particularly physics, in extremely simple and understandable manner, in a way that in people from a non-scientific background could understand.
He opened a fresh notebook. On the title page he wrote: NOTEBOOK OF THINGS I DON’T KNOW ABOUT. For the first but not last time he reorganized his knowledge. He worked for weeks at disassembling each branch of physics, oiling the parts, and putting them back together, looking all the while for the raw edges and inconsistencies. He tried to find the essential kernels of each subject. — James Gleick on his biography of Richard Feynman
What is the Feynman technique?
The Feynman technique of Learning primarily involves four simple steps:
> Pick a topic you want to understand and start studying it
> Pretend to teach the topic to a classroom or a child or someone who is unfamiliar with the topic
> Go back to the resource material when you get stuck
> Simplify and Organize
Step-1:
This technique is applicable to pretty much any discipline or any subject and concept despite the fact that it says the Feynman technique, it is not just limited to math or physics and can be applied to a wide range of fields. The first step to use this technique is to choose the topic and start studying it. Now, studying doesn’t mean just memorizing the facts. In fact, Feynman himself was always against the culture of memorization and he always believed that one should learn and understand the principles rather than memorizing the facts or formulae. Another good method of studying something is to write. Writing something on a piece of paper stimulates the Hippocampus of your brain, the part which is primarily responsible for memory and learning.
Step-2:
If you want to master something, teach it. Teaching is a powerful tool for learning.
Explain the concepts in your own words and try to explain it to a child or someone who is completely unfamiliar with the topic. You can also pretend to explain it to a rubber duck that in on your table. The idea is to try and break things down in as much simpler and plain language as possible. Try to use simple terms and vocabularies and don’t limit yourself to just the facts that you’ve learned. You may as well include an example or two to make things simpler or create your own example making sure that it is associated with the main idea. It becomes much easier for you to understand things at a deeper level if you do so and helps you make connections.
All things are made of atoms — little particles that move around in perpetual motion, attracting each other when they are a little distance apart, but repelling upon being squeezed into one another. In that one sentence … there is an enormous amount of information about the world. - His suggestion that the most valuable information on scientific knowledge in a single sentence using the fewest words is to state the atomic hypothesis.
Step-3:
This is an extremely crucial step where you learn where you are lacking. As you are explaining or writing things in simple terms, you always come across certain areas where you are find it difficult to explain or make connections or formulate examples. This is the point where you get back to the resource material, the books or journals or internet, whatever your primary references are, and fill the gaps in your knowledge. You can identify your gaps by several instances, like not being able to explain something or simplify something, forgetting some important points and so on. The idea is to get back, and revise things once again. This helps you understand things even better. In this step, you know the areas that you need to work on and focus on which is a significant part of the learning process. Knowing one’s limitations and then working upon them to understand them better is the point of this step and it works like magic.
Step-4:
Here comes the product now. Once you have corrected your mistakes and straightened your difficulties, you simplify your explanation and make it better. You can always go back to Step-2 and Step-3 until you have a clear-cut understanding of the subject matter. Your notes and examples are now in the simplest form possible and you have a deeper understanding of the topic under study. You can follow this approach over and over again till you feel like you have mastered the concept.
After your final explanation is ready, you can convey it to your colleagues or friends or professionals who are familiar with your field of expertise and reflect back upon your understanding of things. This Test-and-Learn method works wonders. Feynman always believed that the truth lies in simplicity and that things can be better understood when they are simple and elegant. It is much easier to overcomplicate things, which often shows the lack of deep understanding. The idea is to make things simple enough to be understood by anyone and then using that tool for deeper understanding for yourself.
The Feynman technique of Learning helps you learn and understand things by a different perspective. It can be used not just for academic purposes but also for building businesses, creating startups, mental models, and many more. The Feynman Technique is a great method to develop mastery over pretty much set of information.
When Alan Turing and Ludwig Wittgenstein Discussed the Liar Paradox
Alan Turing attended Ludwig Wittgenstein’s ‘Lectures on the Foundations of Mathematics’ in Cambridge in 1939. The following is one account of those lectures:
“For several terms at Cambridge in 1939, Ludwig Wittgenstein lectured on the philosophical foundations of mathematics. A lecture class taught by Wittgenstein, however, hardly resembled a lecture. He sat on a chair in the middle of the room, with some of the class sitting in chairs, some on the floor. He never used notes. He paused frequently, sometimes for several minutes, while he puzzled out a problem. He often asked his listeners questions and reacted to their replies. Many meetings were largely conversation.”
In relevance to this essay, Alan Turing (1912–1954) strongly disagreed with Ludwig Wittgenstein’s argument that mathematicians and philosophers should happily allow contradictions to exist within mathematical systems.
In basic terms, Wittgenstein stressed two things:
1) The strong distinction which must be made between accepting contradictions within mathematics and accepting contradictions outside mathematics.
2) The supposed applications and consequences of these mathematical contradictions and paradoxes outside mathematics.
“Why are people afraid of contradictions? It is easy to understand why they should be afraid of contradictions in orders, descriptions, etc. outside mathematics. The question is: Why should they be afraid of contradictions inside mathematics?”
Wittgenstein can be read as not actually questioning the logical validity or status of these paradoxes and metatheorems. He was making a purely philosophical point about their supposed — and numerous — applications and consequences outside of mathematics. (These consequences — if not always applications — usually include stuff about consciousness, God, human intuition, the universe, human uniqueness, religion, arguments against artificial intelligence, meaning, purpose, etc.)
Thus Wittgenstein’s position on mathematical contradictions and paradoxes was largely down to his (as it has often been called) mathematical anthropocentrism. That is, to his belief that mathematics is a human invention. More concretely, in his “middle period”Wittgenstein stated that “[w]e make mathematics”; and some time later he said that we “invent” mathematics.
It can be seen, then, that Wittgenstein was clearly an anti-Platonist. Thus it’s not a surprise that he also said that
“the mathematician is not a discoverer: he is an inventor”.
Indeed the later Wittgenstein even went so far as to say that
“[i]t helps if one says: the proof of the Fermat proposition is not to be discovered, but to be invented”.
One other very concrete way in which Wittgenstein expressed his anti-Platonism was when he made the point that it’s wrong to assume that because
“a straight line can be drawn between any two points [that] the line already exists even if no one has drawn it”.
All the above means that if mathematics is a human invention, then any contradictions and paradoxes there are (within mathematics) must be down to… us. And if they’re down to us, then they aren’t telling us anything about the physical world (which includes Turing’s bridge — see later) or even about a platonic world of numbers — because such as thing doesn’t even exist.
Yet many of Wittgenstein’s remarks on paradoxes, Gödel's theorems, mathematical contradictions, etc. have been seen — by various commentators — as being almost (to use my own word) philistine in nature. (Much has been written on Wittgenstein’s remarks on Gödel's theorems — see here.)
The Liar Language Game
Wittgenstein tackled the most famous of all paradoxes — the Liar Paradox. In a discussion with Turing, he said:
“Think of the case of the Liar: It is very queer in a way that this should have puzzled anyone — much more extraordinary than you might think… Because the thing works like this: if a man says ‘I am lying’ we say that it follows that he is not lying, from which it follows that he is lying and so on. Well, so what? You can go on like that until you are black in the face. Why not? It doesn’t matter. …it is just a useless language-game, and why should anyone be excited?”
At first glance it seems that Wittgenstein was perfectly correct to use the philosophical term (his own) “language-game” to refer to the Liar Paradox — as well as to many of the other paradoxes thrown up in what’s often called the foundations of mathematics. (More correctly, these paradoxes were seen to arise within various language games.) After all, the Liar paradox is internal to a language (game) which allows such a kind of self-reference. Indeed in which other language (game) would you ever find the statement, “This sentence is false”? (Even it’s supposed everyday translation -“I am a liar” — seems somewhat contrived.) These sentences simply don’t belong to everyday languages at all. Thus they must belong to a specific technical language game. (As do, for example, Gödel sentences.)
(Of course everyday language does allow other kinds of self-reference which don’t generate — obvious? — contradictions or paradoxes; such as merely referring to oneself when one says “I am happy”.)
So Wittgenstein’s position can be summed up by saying that the Liar language game doesn’t so much as display (or spot) a contradiction or paradox — it creates one.
Wittgenstein was basically stressing the artificiality of the Liar paradox. Now that artificiality doesn’t automatically mean that it has nothing to offer us. In that case, then, the word “artificiality” needn’t be negative in tone. It may simply a reference to something which is… artificial. As it is, though, Wittgenstein did mean it in an entirely negative way. After all, he said that the Liar paradox “is just a useless language-game”.
Alan Turing, on the other hand, seemed to be interested in the Liar paradox for purely intellectual reasons. (Although he will later refer to the construction of bridges.) He replied:
“What puzzles one is that one usually uses a contradiction as a criterion for having done something wrong. But in this case one cannot find anything done wrong.”
In basic terms, Turing was arguing that, unlike many other cases of contradiction, the Liar paradox doesn’t simply uncover a contradiction: it makes it the case that both x and not-x must be accepted. That is, when a (Cretan) liar utters “I am lying”, and it leads to it being interpreted as making the speaker both a liar and not a liar (i.e., at one and the same time), then “in this case one cannot find anything done wrong”.
One can almost guess Wittgenstein’s reply to this. Hesaid:
“Yes — and more: nothing has been done wrong [].”
Wittgenstein’s argument (at least as it can be seen) was that the Liar paradox does indeed lead to this bizarre conclusion because — in a strong sense - it was designed to do so. That is, it is part of a language-game which was specifically created to bring about a paradox. And because it’s a self-enclosed and artificial language-game, then Wittgenstein also asked “where will the harm come” from allowing such a contradiction or paradox?
Alan Turing’s Bridge
It was said a moment ago that Alan Turing appeared to be interested in the Lair paradox for purely formal reasons. However, he did then state the following:
“The real harm will not come in unless there is an application, in which a bridge may fall down or something of that sort [] You cannot be confident about applying your calculus until you know that there are no hidden contradictions in it.”
On the surface at least, it does seem somewhat bizarre that Turing should have even suspected that the Liar paradox could lead to a bridge falling down. That is, Turing believed — if somewhat tangentially — that a bridge may fall down if some of the mathematics used in its design somehow instantiated a paradox (or a contradiction) of the kind exemplified by the Liar paradox.
Yet it’s hard to imagine the precise route from the Lair paradox to practical (or concrete) applications of mathematics of any kind — let alone to the building of a bridge and then that bridge falling down.
Indeed many (pure) mathematicians have often noted the complete irrelevance of much of this paradoxical and foundational stuff to what they do. Thus if it’s irrelevant to many mathematicians, then surely it would be even more irrelevant to the designers who use mathematics in the design of their bridges.
This metamathematics/the applications of mathematics opposition is summed up by the mathematician and physicist Alan Sokal in two parts. Firstly, Sokal stresses the difference between “metatheorems” and “conventional mathematical theorems” in the following way:
“[] Metatheorems in mathematical logic, such as Gödel's theorem or independence theorems in set theory, have a logical status that is slightly different from that of conventional mathematical theorems.”
And it’s precisely because of this substantive difference that Sokal continues in this way:
“It should, however be emphasized that these rarefied branches of mathematics have very little impact on the bulk of mathematical research and almost no impact on the natural sciences.”
So if such metatheorems have (to be rhetorical for a moment) almost zero “impact on the natural sciences”, then surely they have less than zero impact on the design of bridges.
Again, it’s hard to see how there could be any (as it were) concrete manifestation of the Liar paradox. That said, perhaps Turing’s argument is that there couldn’t be such a concrete manifestation. And that’s precisely because if there were such a manifestation — then some bridges would fall down!
So what about Wittgenstein's response to this line of reasoning?
As already hinted at, all the above can be boiled down to Alan Turing predicting (or simply conceiving of) concrete and design-related manifestations of what is called (by logicians) theprinciple of explosion.
Yet it was Wittgenstein who noted what Turing was actually getting at. He said:
“Suppose I convince [someone] of the paradox of the Liar, and he says, ‘I lie, therefore I do not lie, therefore I lie and I do not lie, therefore we have a contradiction, therefore 2x2 = 369.’…”
“I lie, therefore I do not lie, therefore I lie and I do not lie…”
then we must also allow this equation:
2 x 2 = 369
But in the case of 2 x 2 = 369,Wittgenstein argued that “we should not call this ‘multiplication’ at all”. And surely he was right. Yet this conclusion is seen to be a logical consequence of accepting the legitimacy of the Liar paradox.
Finally, it can also be added, in a Wittgensteinian manner, that we are free to invent a language (game) in which 2 x 2(or, perhaps more accurately, “2 x 2”)does indeed equal 369 (or “369”)!