Live data from Hacker News

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

davidreis.me

61–70 of 162 posts

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

#61

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…

Vladimir Kramnik agrees with your observations about chesscom.

Interesting

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

#62
post #60

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…

> 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?

It hasn’t been done client side in any pvp game I’ve heard of.

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

#63
post #37

So essentially lichess chose StackOverflow approach - (rather) beefy servers, instead of "treating them like a cattle". Interesting that they accumulate and periodically store game state. Unfortunately it is not very clear, where they store ongoing game state - in redis or on server itself. Also cost breakdown doesn't have server for redis, only for DB. BTW, their github has better architectural picture, than overly…

Redid runs on the main server, where lila runs, as indicated in the diagram you linked. And moves are buffered in lila. Redis is only used for pub-sub.

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

#64

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…

I can't play bullet on chess.com for this reason. Lost way too many games on "time" even though I had a second or two on the clock. Incredibly frustrating.

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

#65

- "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…

From what I remember, one of the main reason also was to avoid bloating the JS on the game page. That page is kept especially slim to maximize performance and load times for low-powered devices.

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

#66
post #60

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…

> 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?

Track the two clients pings? What client side cheating prevention would you need to do in chess? Afaik you can't cheat by clipping through walls or jumping around on the map.

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

#67
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?

Track the two clients pings? What client side cheating prevention would you need to do in chess? Afaik you can't cheat by clipping through walls or jumping around on the map.

The client side cheating would by lying about when you received the packet in order to give yourself more time to think. Even if you only shifted it by 200ms per move, that could add up to a lot over the course of a long game.

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

#68
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?

Track the two clients pings? What client side cheating prevention would you need to do in chess? Afaik you can't cheat by clipping through walls or jumping around on the map.

Cheat by giving yourself more time

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

#69

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…

> they show the time in seconds which can't be right

Seems right.

If you export/download games from lichess, they use the .pgn (Portable Game Notation) format, which is a standard plain-text format circa 1993, used by pretty much everyone for describing a chess game.

Lichess follows the specification to the letter, and as it only technically allows one-second accuracy, lichess only record moves with one-second accuracy. It seems insane, but that's how they do it.

Chess.com also exports PGN files, but they add a decimal place, allowing subsecond accuracy. No one has a problem with this. There is no software which cannot handle this. But Lichess refuses to "break" the spec.

lichess PGN export example:

> 1. d3 { [%eval -0.15] [%clk 0:01:00] } 1... g6 { [%eval 0.04] [%clk 0:01:00] }

Chess.com PGN export example:

> 1. d4 {[%clk 0:02:58.6]} 1... b6 {[%clk 0:02:59.2]}

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

#70
post #49

Earlier quoted context omitted.

> Unfortunately, I'm afraid, drawing something like that during interview may not land a job at faang =( Yet another reason to be skeptical of the quality of hiring in faang if anything.

Why feel anything about it at all? You work at FAANG: be glad for the money or quit if there isn't any. You don't work at FAANG: bad hiring makes it easier for you to get hired and make money.

This is a limited, self-centered way of thinking (not self-ish, just self in the neutral sense of the word).

Looking at second-order effects, many companies look up to FAANG for "best practices", which often includes them blindly copying their hiring practices. Without feeling or calling out any healthy skepticism, the software hiring world becomes a worse place overall.

Post reply on HN