lichess.org
Donate

Photo by <a href="https://unsplash.com/@jeremybishop?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Jeremy Bishop</a> on <a href="https://unsplash.com/photos/time-lapse-photograph

Liquid Search Engine human gameplay analysis

Chess botChess engineAnalysisSoftware Development
looking at Liquid Search Engine human game play.

Intro

Hey all, I'm excited to share news about launching the Liquid Chess engine, this is a big update that came to LISEBOT on Lichess. The name of this engine I changed to Liquid because the engine behaves like a liquid, like water, changing its strength based on the player it faces, but also has an element of randomness to its play making it similar to how humans play.

Following the theme of playing like a human

When I first created LISE a year ago my goal was to make it play like a human because I always felt that engines can at least to some point be automated to play like a human and be friendly bots to humans and not scare the death out of them. My first attempt at making a beginner human bot tried to act like a human who doesn't know about chess and simulate how a non-chess player would play chess for the first time. At the start, it used a series of random move-finding algorithms and at the same time used the traditional negamax algorithm. Here is how Lise played some months ago.

https://lichess.org/0tHfGlYR

You can see it was not good at chess (it was not meant to be good at all) and it mostly considered captures and didn't have any idea about positional or any endgame concepts. I was sort of happy with this type of in the start when I made it, but eventually, I got fed up with Lise's playing quality and how it at most can score draws against stronger bots if it got into repeating the same moves, I just thought I need to improve Lise, but at the same time stick to the theme of trying to play like a human, because increasing the strength of the bot would lead to non-human, crazy ideas or just some chess that no one would understand right?

Adapt to be human or just adapt?

While I was thinking about how close I could make Lise to the human level, I asked myself what makes human chess human chess? What makes us separate from computers and why do we play chess differently from them?

While thinking about it something clicked, I remember Hawking's quote

intelligence is the ability to adapt to change - Hawking

The reason why we humans play chess differently is because we change our chess based on opponents, A perfect example comes in OTB chess, where people prepare for opponents' opening prep, level and how they play, no way Magnus would play his main weapon against a local club member right? Why do we lose Elo against the -200 rating because we think we are better than them and try something risky right? These questions made me think, rather than making Lise adapt to be human, just make it adapt to the opponent's strength!

Play different against different ratings

The idea is to have built-in modes which are beast, strong, novice and beginner and before the game starts determine the opponent's level and play at their level, this helps with two things, it helps to have each game unique and takes this to the deeper point, have sort of randomness to play while playing at that level. The beast mode and all the modes use Stockfish's help to get the "best move" in a given position, but for each mode, the higher the rating the lower the randomness, and the higher the randomness the lower the mode's rating play. This inverse relationship helped me add this adaptiveness to Lise and let it adapt to opponents, this could be anyone bots, humans or a clone of Lise playing itself!

StockFish Moves factorrandomness moves factor
Beast [2400+]90%10%
Strong [1900 - 2400]70%30%
Novice [1400 - 1900]50%50%
Beginner <140030%70%

Note* Lise uses Stockfish and its randomness logic to implement the desired play, the factor is estimated from training games.

Training Games

To test Lise's logic and make sure that mode behaved as they should, I let Lise only play white side casual/rated against 4 test samples, BOT maia1 [1500], BOT zeekat [1900], BOT likeawizard-bot [2000+], 2400 human user.

Here are some training games

https://lichess.org/cYeRZWgZ

https://lichess.org/IjnEkMo4

https://lichess.org/XZTlWf2r

https://lichess.org/3VvvAKrt

Training games data

Lise played these 4 sample users' games each, I analyzed these 20 games and did a graph data analysis to compare how Lise's blunders, mistakes, and inaccuracy compare for each sample user and different rating levels and comparing 10+0 casual time control. One thing to note is that the training games are done on less sample size of games, the higher the games played the better the result, but for time being these games do show enough trends.

Lise vs Maia1 [1500]

Lise vs zeekat [1900]

Lise vs likeawizard-bot [2000+]

Lise vs human [2400]

From the graphs, one can see that against lower-rated bot maia1 which is trained from lots of human games, had an average of 2 to 3 blunders, mistakes and inaccuracy per game which makes sense as usually at 1500 level blunder mistakes and inaccuracy all 3 occur the most. Against 1900 zeekat, Lise at a lower blunder rate but higher mistakes, while against 2000 likeawizard-bot, the blunder rate came down quite a bit but the inaccuracy stayed. The most interesting game was against a strong 2400 humans, Again the mistakes and blunders rated were low, but mostly inaccuracy stayed higher. The main idea behind the stats is that Lise adapts to rating-level statistical trends, the lower the rating of the user the higher blunder, mistake, and inaccuracy level, but as the rating rises the blunder and mistake rate goes down while inaccuracy stays the same.

Conclusion

I'm just happy that Lise can adapt to chess games but also be able to adapt to statistical trends for blunders, mistakes and inaccuracies, I just hope I will be able to further advance Lise and make it like liquid mould into an opponent's opening prep, positional ideas and much more!

Liquid Search Engine is open source here
Github Repo

Feel free to play Lise and help me further test it out
https://lichess.org/@/LISEBOT