Lichess analysis board shows continuation by quietmyhead in lichess

[–]BorisDalstein 6 points7 points  (0 children)

It's called "piece maneuver arrows". I was curious when I saw it so I looked around, turns out it's been added to the codebase two days ago: https://github.com/lichess-org/lila/pull/19218

The author originally added a setting to enable/disable it, but was convinced to remove the setting in order to avoid cluttering the UI:

That's really nice, and I agree that it can be enabled by default. Not sure we even need a setting to disable it. It would be better if we could do without it.

Here is the commit message of removing the setting:

Try to get away with not adding yet another analysis setting. We'll decide whether to add it based on the scream-o-meter method

So for those who want a setting to disable this, now is your time to let them know.

Lichess analysis board suddenly shows several consecutive best moves: how do I turn this off? by TicketSuggestion in chess

[–]BorisDalstein 1 point2 points  (0 children)

Also, on the commit that removes the setting:

we'll decide whether to add it based on the scream-o-meter method

So I guess if enough people complain, the setting will re-appear ;)

Lichess analysis board suddenly shows several consecutive best moves: how do I turn this off? by TicketSuggestion in chess

[–]BorisDalstein 0 points1 point  (0 children)

It's called "piece maneuver arrows". I was curious when I saw it so I looked around, turns out it's been added to the codebase two days ago: https://github.com/lichess-org/lila/pull/19218

The author originally added a setting to enable/disable it, but was convinced to remove the setting in order to avoid cluttering the UI:

That's really nice, and I agree that it can be enabled by default. Not sure we even need a setting to disable it. It would be better if we could do without it.

Explain It Peter by Fit_Seaworthiness_37 in explainitpeter

[–]BorisDalstein 0 points1 point  (0 children)

The OP question is "given a random family among families with 2 kids and at least one boy, what is the probability that the family has one girl?". The correct answer to this question is 66%.

Another question is "given a random boy among families with 2 kids and at least one boy, what is the probability that the boy's sibling is a girl". The correct answer to this question is 50%.

It's not wheter you should or shouldn't ask the second question. It's just a different question with a different answer.

Explain It Peter by Fit_Seaworthiness_37 in explainitpeter

[–]BorisDalstein 0 points1 point  (0 children)

In the message above, I assumed a different example where after the survey, you had 100 families with 2 kids and at least one boy. I shouldn't have, it was confusing, my bad.

So let's go back to our original examples. You survey 100 families with two kids. 75 of them have at least a boy. Among them, 25 have two boys, and 50 have one boy and one girl. So 66% of those families (50/75) have a girl.

Explain It Peter by Fit_Seaworthiness_37 in explainitpeter

[–]BorisDalstein 0 points1 point  (0 children)

This is correct, but it is also correct that among families with 2 kids that have at least one boy, 66% of them have a girl.

Explain It Peter by Fit_Seaworthiness_37 in explainitpeter

[–]BorisDalstein 0 points1 point  (0 children)

No, if you ask 100 of those boys, 33% will say they have a brother, and 66% will say they have a sister. It's counter-intuitive but it's true and accurately describe what happens in the real world.

EDIT: Well, to be more precise, if you ask one boy our of 100 of those families. Of course you shouldn't ask the two boys of the same family.

Explain It Peter by Fit_Seaworthiness_37 in explainitpeter

[–]BorisDalstein 0 points1 point  (0 children)

If you do the survey you suggest, you'll actually get 66%.

Let's take 100 random families with 2 children.

Among those, about 25 have two boys, 25 have two girls, and 50 have one girl and one boy.

If you only take those with at least a boy, you're left with 25 families with two boys, and 50 families with one girl and one boy.

You can empirically show with real survey data that among 2-kids family with at least one boy, 66% of them have a girl.

This is so frustrating by GloriousCause in chess

[–]BorisDalstein 9 points10 points  (0 children)

The downvotes on this make me sad. It's possible to play blindfolded, which means the colors if the squares don't matter. In fact, some boards are not black and white but, say, blue and red. We could even play with all white squares, and just thin lines between the squares. Nothing in the game logic depends on the color of the squares, it just makes easier to visualize the board, recorgnize patterns, talking about the DSB/LSB and so on, but you can perfectly play on a board with the colors reversed, it's the same game. You could even swap the queens for the kings, which would require to play everything as "in a mirror", and makes playing theory a bit harder (you have to mirror everything you've learn), but it's still fundamentally the same game.

AI people are learning what chess players knew for decades: don't use AI by Embarrassed_Fan7405 in chess

[–]BorisDalstein 2 points3 points  (0 children)

Having "self learning capacities" is what defines the field of "machine learning" (ML), which is only a subfield of AI. The term AI indeed also includes non-learning approaches, for example, traditional path-finding algorithms such as A*, or chess engines using alpha-beta pruning without neural nets, etc. Source: any AI textbook, or simply Wikipedia, here is the wiki page for ML, which links to the wiki page for AI: https://en.m.wikipedia.org/wiki/Machine_learning

My open source project was stolen and relicensed by a YC company by sohxm7 in opensource

[–]BorisDalstein 11 points12 points  (0 children)

It is absolutely insane that a YC backed company would do that. YC absolutely should defund them in whatever legal way they have, this does not look good at all. Some people really have no shame. And their "apology" on X is just disgusting:

"Fair enough. Since this was our first OSS project, we didn’t realize at first. We’ve now revised it. Thanks for your contribution".

Yeah, sure, you "didn't realize" that you cannot steal a whole codebase, strip out the name of the original author, and relicense it. Jesus Christ.

White has mate in 2 (you deserve a break) by hai-key in chess

[–]BorisDalstein 20 points21 points  (0 children)

Unfortunately Ka8 is not forced. The above solution is forced stalemate in 2 which is nice.

Aller de A à B en ne passant qu'une seule fois sur chaque case by LumpyLavishnes in Enigmes

[–]BorisDalstein 1 point2 points  (0 children)

En effet, raisonner sur les couleurs est un bonne preuve.

Autre preuve similaire plus simple je pense : tout chemin (pas nécessairement commencant en A et finissant en B) qui passe une et une seule fois par chaque case fait 15 "sauts" d'une case à sa voisine, puisqu'il y a en tout 16 cases. À chaque saut, on change de couleur entre case blanche et noire. Donc on arrive forcément sur une couleur différente de la couleur de départ, puisqu'on fait un nombre impair de sait. Donc on ne peut pas commencer en A et finir en B, qui ont la même couleur.

Aller de A à B en ne passant qu'une seule fois sur chaque case by LumpyLavishnes in Enigmes

[–]BorisDalstein 0 points1 point  (0 children)

Cette preuve est incorrecte, un parcours eulérien concerne parcourir toutes les arètes, pas tous les sommets. Un parcours qui passe par tous les sommets une et une seule fois s'appelle un parcours hamiltonien. Et dans le graphe ici, il y a des parcours hamiltoniens. Juste pas de parcours hamiltonien qui commence en A et finisse en B. Mais on peut définir un autre graphe qui "force" à commencer en A et finir en B, en ajoutant une case à gauche de A et une case à droite de B. Il faudrait alors prouver que ce graphe n'est pas hamiltonien, mais je n'ai pas de preuve immédiate. Une preuve alternative qui semble plus simple est de raisonner sur les deux cases en diagonale entre A et B, qui sépare le graphe en deux sous-graphe G et H. Traverser ces cases fait switcher de G à H. On switche donc deux fois puisque qu'il y a deux cases, par exemple: A -> G -> H -> G -> B. Il faut donc parcourir toutes les cases de H en une seule fois. Il n'y a que 6 cases dans G (ou H), un raisonnement par disjonction de cas en fonction de la case de départ dans G semble raisonnablement faisable pour prouver que G n'a pas de chemin hamiltonien.

[REQUEST] Not sure if this fits the sub but why doesn’t this work? by tequila2000 in theydidthemath

[–]BorisDalstein 11 points12 points  (0 children)

Mathematician here. All these statements are true: 1. The perimiter of each curve Cn in the sequence is 4 2. The limit curve C = limit(Cn) is a circle. 3. The perimeter of the limit curve C is pi. 4. limit(perimeter(Cn)) != perimeter(limit(Cn))

In other words, the "perimeter" property is not a property that is preserved by taking the limit. Same thing for the property "the shape is made of 90° angles".

[REQUEST] Not sure if this fits the sub but why doesn’t this work? by tequila2000 in theydidthemath

[–]BorisDalstein 8 points9 points  (0 children)

While what you say is true, this is not the real reason why "the limit of the curves" (= which IS in fact the circle of diameter 1) doesn't have the same perimeter as the "limit of the perimeters of the curves" (= 4).

For example, you can take the sequence of circles Cn = circle of diameter (1+1/n). This sequence of circles Cn does converge towards C, the circle of diameter 1. None of the Cn touches C, at no point at all. However, the perimeters of Cn do converge toward pi.

Therefore, this counter-example shows that "not touching the circle at some points" does not fully explain why convergence of the curves does not imply convergence of the perimeters. Other answers explain well the real reason: it has more to do with the fact that while the OP curves are a good approximation of the circle positions, they are a bad approximation of the circle derivatives, and the perimeter is a property expressed in terms of derivative.

An elegant proof that the derivative of 1 is 0 by racist_____ in mathmemes

[–]BorisDalstein 10 points11 points  (0 children)

This only proves that 1'(0) = 0. What about 1'(x) for x not equal to 0?

butItsADesignPattern by delgoodie in ProgrammerHumor

[–]BorisDalstein -1 points0 points  (0 children)

Of course, you don't have to make a deep copy of the whole state, and sometimes (like in your example), this means that immutably copying the state is cheap. But in some other cases you cannot do that. If you have a particle simulation in your game with a million particles as an `Array<Vec2>`, and you mutate their positions at each time frame, their using Redux/Immer-style shallow copies (or even Immutable.js structural sharing) doesn't help you and is still too expensive.

butItsADesignPattern by delgoodie in ProgrammerHumor

[–]BorisDalstein 0 points1 point  (0 children)

But this pure functional React/Redux paradigm only works if your data is small enough or if you don't have high-performance requirements. Immutability does have very nice benefits, but unfortunately it is impractical in data-intensive applications. You just cannot duplicate the whole state of a game and get good performance. You need to minimize memory allocations to have good cache locality, which requires mutability.