Live data from Hacker News

What happens when you make a move in lichess.org?

davidreis.me

121–130 of 162 posts

Re: What happens when you make a move in lichess.org?

#121
post #22
post #21

Earlier quoted context omitted.

You can verify this with ten lines of code and clumsy (a tool for simulating packet loss). I tried this and not all the messages I sent arrived.

What do you mean? If you open a web socket connection it should behave like a normal TCP connection. All sent data guaranteed to be delivered complete and in order, unless the connection fails.

I think I had it set up to auto reconnect. So I suppose the packets sent between "failure occurs" and "socket disconnected" were lost.

At any rate my conclusion was disappointment that if I actually want reliability, I need to implement my own ACKs anyway, meaning I'm paying a pretty high overhead for no benefit.

At least now there's UDP in browser with WebTransport. I haven't tried it yet, but I hear it's a lot more pleasant than the previous option WebRTC, which was so convoluted (for the "I just want a UDP socket" usecase) that very few people used it.

Re: What happens when you make a move in lichess.org?

#122

Earlier quoted context omitted.

You're surprised that Kramnik is mentioned when the discussion topic is related to chess? I don't understand why. He's well-known in chess (and in chess memeland).

Kramnik is a former world champion who has taken a torch to his own reputation by accusing tons of people of cheating without evidence. He’s been banned as a regular columnist on chess.com after using his column as a platform to attack people. He has next to no credibility on any chess issues these days.

A ban just means that a group of bureaucrats decided to take public action against a specific person and not against others.

Carlsen, Nakamura and chess.com itself have participated in the Niemann witch hunt. No evidence of over-the-board cheating has ever been provided.

None of the accusers is banned.

Kramnik did the same as they did (by indeed going too far).

Re: What happens when you make a move in lichess.org?

#123

- "While these moves could be calculated client-side, providing them server-side ensures consistency - especially for complex or esoteric chess variants - and optimizes performance on clients with limited processing capabilities or energy restrictions." Just a wild guess: might be intended to lower the implementation barrier for new open-source software clients on new platforms, and/or preempt them from implementing…

Another wild guess: Lichess could be pre-calculating and caching the legal moves for the most common chess positions. While pre-calculating every possible legal move for every position would be impossible, you could pre-calculate the most common openings and endgames, which could cover a lot of real-world positions. This cache could easily be larger then practical for the client, but a server could hold onto it no pr…

Given that a good chess move generator will work in way less than a microsecond (TBH, probably even less than taking a DRAM lookup for a large hash table), and most chess positions have never been seen before, having a cache sounds counterproductive.

Re: What happens when you make a move in lichess.org?

#124

I wish this discussed the timing arbitration of each move. Based on the packet information (if that is correct & complete) then the timing is done entirely on the clients. However, they show the time in seconds which can't be right so I am curious how accurate this packet schema is (or if those are float values). Regardless, one thing I find maddening about chess.com is the time architecture of the game. I haven't se…

What I'd love is for my pre-moves to be sent to the server immediately so I don't time out when I pre-moved.

This is how it works on Lichess

Re: What happens when you make a move in lichess.org?

#125
post #60

Earlier quoted context omitted.

> it feels like the SERVER is tracking the time TBH this is what I expected for all online chess. How else to reconcile the two players' differing clocks and also prevent client-side cheating?

I guess my naive frustration comes from crazy fps games tracking things so precisely and yet somehow Chess.com can’t handle a turn based game?! Honestly. I do recognize that fps games utilize predictive algorithms and planning to estimate future player positions but still, turn based networking with 100ms accuracy should be a solved problem

Bullet chess is almost an RTS ;) You need starcraft-like micro ;)

Re: What happens when you make a move in lichess.org?

#126
post #87

Earlier quoted context omitted.

How is it being done client side?

Well it's a long time since I played there. But it had custom chess clients, which I assume just recorded how much time your move actually took and sent that with the move. Yes, it's easy to cheat with this, but it's very easy to cheat with chess anyway.

This makes the most sense. Start a timer when the UI actually hands control to the player whose move it is, stop the timer when they've completed their move, and simply subtract that from their remaining time. The interval gets sent to the server and relayed to the other player to update their opponent's clock accurately.

Re: What happens when you make a move in lichess.org?

#127

And scalachess is written in scala, to piggyback off a post earlier this month that claimed the language is dead. The project is very successful and has been around and maintained for years.

If all the Rust people knew how nice Scala 3 as a language is... they would be surprised. What still isn't great is the ecosystem and the build-tooling compared to Rust (part of it because of the JVM). But just language-wise, it basically has all the goodies of Rust and much more. Ofc. it's easier for Scala to have that because it does not have to balance against zero-overhead abstraction like Rust does. Still, Scala…

I think the incompatibilities burned a lot of the good will. I'm very fluent in Scala 2, but I will avoid Scala if I can, mostly to stay away from purely functional programmers.

> all the goodies of Rust

Does it prevent me from using a non-thread-safe object in multiple threads? Or storing a given object which is no longer valid after the call ends?

Does it have a unified error handling culture? In Scala some prefer exceptions (with or without `using CanThrow`), some prefer the `Either` (`Result`) type.

Does it have named destructuring?

Re: What happens when you make a move in lichess.org?

#128

Earlier quoted context omitted.

Kramnik is a former world champion who has taken a torch to his own reputation by accusing tons of people of cheating without evidence. He’s been banned as a regular columnist on chess.com after using his column as a platform to attack people. He has next to no credibility on any chess issues these days.

A ban just means that a group of bureaucrats decided to take public action against a specific person and not against others. Carlsen, Nakamura and chess.com itself have participated in the Niemann witch hunt. No evidence of over-the-board cheating has ever been provided. None of the accusers is banned. Kramnik did the same as they did (by indeed going too far).

I think there is difference between "accusing tons of people" and "using his column as a platform to attack people" vs "accusing that one person in one instance".

It is actually perfectly fine to not ban people doing something wrong one or two times while banning people doing that exact thing for fifth time.

Re: What happens when you make a move in lichess.org?

#129

I wish this discussed the timing arbitration of each move. Based on the packet information (if that is correct & complete) then the timing is done entirely on the clients. However, they show the time in seconds which can't be right so I am curious how accurate this packet schema is (or if those are float values). Regardless, one thing I find maddening about chess.com is the time architecture of the game. I haven't se…

Chess.com software might be the worst public facing software ever assembled. During their most popular weekly tournament (by the number of spectators) called Titled Tuesday where significant % of the world elite regularly competes they send links on a public chat to a 3rd site every 4 rounds. The reason is that there is a few minutes break and they failed implementing a clock on their side so they need 3rd party serv…

I can't believe this, but it makes sense now lol I think I heard a streamer say it was for kicking out the cheaters
Post reply on HN