Lichess End of Year Update 2019
Thank you all for your support!
It’s been another eventful year for Lichess. We continue to grow in all metrics of activity - average players online, numbers of games played per month, and events held. Along with this, we’ve made significant changes to support the website and ensure our players get the most out of Lichess. As per tradition, we’ve decided to highlight what’s happened this year, and to set the bar for next year.
Let’s have a quick recap of the biggest developments of the year – some of which have already received fanfare.
One of the largest developments of the year was Lichess v2, introducing a responsive design. This means that the Lichess interface adjusts to your mobile browser, tablet, or desktop/laptop display of any size.
Broadcasts have been updated, giving a summary introduction of the tournament, and miniboards, so you can keep an eye on multiple games at the same time. Selected official broadcasts now show tournament standings, so you can see who is leading and by how much.
Events now have the opportunity to become even more messy, with new team based arenas. Called Team Battles, these allow the team members of one team to play in an arena format against opposing teams. We’re looking forward to hyperbullet team battle marathons.
We added and improved APIs for team management. The English Chess Federation has been experimenting with these features, and have developed a team page which allows official ECF members to link their Lichess username with their membership. The process is entirely automated, and allows members of the ECF who may not be able to play OTB as much as they’d like to gain official English Federation rating in their specific online tournaments. This is an exciting new way of a national federation using Lichess, and we hope it inspires more national federations to use technology in a way which opens up rated chess to all parts of society.
We’ve improved accessibility of our interface for visually impaired users. A new “Speech” sound set is available for everyone.
You can now voice chat with your opponent during games, or with coaches and friends during studies, as long as both users pick up the phone by clicking the icon at the top of the chat.
Other changes include:
- Slight changes were made to properly implement Glicko2 ratings. Most importantly, rating deviation now decays over time, leading to more predictive ratings.
The rating floor for weaker players has been lowered, removing the bump at the lower end of the rating distribution.
With these changes, the median has been slowly moved back to 1500.
- New commands and hotkeys are available, such as /dark, /light, /transp, /stream username, and /tv username, on every page.
Number keys can be used to select pocket pieces in Crazyhouse.
- You can now opt-in to receive push notifications for messages and moves in correspondence chess.
- In server provided engine analysis, inaccuracies/mistakes/blunders are now consistently based on how your play impacted your winning chances, rather than purely on centipawn differences.
Group photo at the public Montreal meetup
The events we have hosted have also gone from strength to strength. Our October 2019 Titled Arena was our most popular ever, with 395 titled participants competing for the $1000 prize pool – on that occasion, won by the ferocious GM Alireza Firouzja.
We also hosted our quarterly marathons, with 13,763 participants in the latest Winter event – a good way for the Lichess developers to stress-test improvements and find lurking bugs!
And we hosted the community-organised variant World Championships. The Antichess World Championship – with a final due to be played between Emirhan Ogul and FM Vladica Andrejic at a time of their mutual choosing, has already gone through various qualifier and candidates stages. Not to be outdone, the Horde World Championships recently completed their final, with FM svenos beating Stubenfisch for the title. We also congratulate LM onubense, who beat GrandLapin 5.5-0.5 in the Atomic WC final, and RoyalManiac who conquered the Racing Kings world by beating sachmaty8 5.5-2.5.
Whilst the Lichess community has already fully translated the site and app into 30 languages, Nepali and Kurmanji Kurdish have recently been completed, despite difficult events in both regions.
Lichess servers and their responsibilities (December 2019)
Responsive UI aside, the main themes in 2019 were scalability and paying back technical debt. Here is what we did to survive this winter and to prepare for 2020.
We created listress, a node.js script that simulates thousands of players on a test instance, playing games, watching games, following each other, and participating in tournaments.
Before this, the only way to test changes under (somewhat) realistic load was to try them in production. This was a problem as early as 2016, when we unsuccessfully tried to update to PlayFramework from 2.4 to 2.5. Back then, the updated version worked nicely in testing, but died immediately when deployed to the live site.
Starting during the Montreal Meetup, we also made significant changes to the architecture, to deal with the growing number of players. WebSocket connections are now handled by a separate server, lila-ws. lila and lila-ws communicate using Redis pubsub. The main server no longer has to play ping-pong with individual connections. It can also efficiently let lila-ws broadcast messages to all spectators of a popular game. In the future this should also make server updates smoother for everyone.
listress and splitting out WebSocket handling enabled many dependency upgrades. We were finally able to update PlayFramework (now to 2.8, skipping 3 versions), which unlocked Scala 2.13, which in turn unlocked OpenJDK 13.
Other invisible server side changes:
- "Play with the Computer" is now also handled by a separate server, lila-fishnet, also using Redis to communicate with the main server.
- No longer immediately committing all individual moves to disk (excluding correspondence). Instead, moves are persisted at an interval and before updates. Of course this is a tradeoff. On the plus side this gives sub-millisecond processing times for moves on the server. It also reduces the size of the MongoDB oplog, allowing us to keep up to 24h delayed replica.
- Ported all templates from Twirl to Scalatags.
- Using MacWire for dependency injection.
- Support for TLS 1.3 (including Early-Data), for faster connection handshakes.
Other technical client side changes:
- Stockfish with multi-threaded WebAssembly, replacing the deprecated PNaCl for client side engine analysis. The build is currently limited to using 4 threads, but we are working to lift that limitation.
- Rewrote stylesheets in SCSS. Modularity is used to build and serve separate optimised styles for the light, dark, and transparent themes.
- Ported more modules to TypeScript, now targeting ECMAScript 6.
- Built minimal icon fonts and removed dependency on Google Fonts.
- Laid foundations for offline analysis.
Happy new year!
Thanks to all players and contributors for another great year. Looking forward to seeing you in 2020!