- Blind mode tutorial
lichess.org
Donate

Lichess Bot Creation Guidance

Hello everyone, i've just created a Lichess Bot with Python.
For now i'm not going to study how to program it better, not speaking about chess logic but Lichess one.

I have completed my first game against it, letting it play random moves. It worked but i have a few questions on how to develop it.
The two main issues i've found are:
-How to let it handle multiple games. I thought about moving on Ansync but i don't know if it's the way. For the moment it ignores a second game request until the current game is played.
-How to make it update game board without hitting API's limit. For the moment if i put 1 update every minute it works without interruptions, but it's gameplay is slow.

So this thread is for other programmers to ask them if they could give me an hint or two on how to develop it better.. :)

You can find my public repo on Github, here: github.com/gobbez/ChessBot_Zoe

Thanks anyone that wants to help!

Hello everyone, i've just created a Lichess Bot with Python. For now i'm not going to study how to program it better, not speaking about chess logic but Lichess one. I have completed my first game against it, letting it play random moves. It worked but i have a few questions on how to develop it. The two main issues i've found are: -How to let it handle multiple games. I thought about moving on Ansync but i don't know if it's the way. For the moment it ignores a second game request until the current game is played. -How to make it update game board without hitting API's limit. For the moment if i put 1 update every minute it works without interruptions, but it's gameplay is slow. So this thread is for other programmers to ask them if they could give me an hint or two on how to develop it better.. :) You can find my public repo on Github, here: github.com/gobbez/ChessBot_Zoe Thanks anyone that wants to help!

@andreagobbez said in #1:

For now i'm not going to study how to program it better
...
I have completed my first game against it, letting it play random moves.

Just FYI,

https://lichess.org/forum/lichess-feedback/make-a-bot-play-a-lot#4

Note that Lichess players must try to win every rated game. That also applies to bots. Therefore a random mover bot, which is not trying to win, must only play casual games.

@andreagobbez said in #1: > For now i'm not going to study how to program it better > ... > I have completed my first game against it, letting it play random moves. Just FYI, https://lichess.org/forum/lichess-feedback/make-a-bot-play-a-lot#4 > Note that Lichess players must try to win every rated game. That also applies to bots. Therefore a random mover bot, which is not trying to win, must only play casual games.

@mcgoves said in #2:

Just FYI,

lichess.org/forum/lichess-feedback/make-a-bot-play-a-lot#4
Yeah, thank you. I'm working for implementing a valid chess strategy. It may take some time, so for the moment i may let it refuse every rated game..

@mcgoves said in #2: > Just FYI, > > lichess.org/forum/lichess-feedback/make-a-bot-play-a-lot#4 Yeah, thank you. I'm working for implementing a valid chess strategy. It may take some time, so for the moment i may let it refuse every rated game..

Little update:
-Now the bot can search up to 1 million different positions and, if the fen is in that position, finds the best move under 50 cp.
-I'm trying to create a Deep Learning model with the first Lichess available user database (jan 2013), with 127k games. This is a cool idea, but it requires too much time to train it and i've seen very low accuracy..
These things are updated in my Github repo.

Next thing i'll add is another chess logic (since 1m games may be too low to trust completely -nb: the database has 98 million analyzed positions, but the search is long, up to 20/30 minutes and i don't want to be just a slower copy of Stockfish!-).

I'll also try different methods to make it learn how to play "on his own"..
Stay tooned! :)

Little update: -Now the bot can search up to 1 million different positions and, if the fen is in that position, finds the best move under 50 cp. -I'm trying to create a Deep Learning model with the first Lichess available user database (jan 2013), with 127k games. This is a cool idea, but it requires too much time to train it and i've seen very low accuracy.. These things are updated in my Github repo. Next thing i'll add is another chess logic (since 1m games may be too low to trust completely -nb: the database has 98 million analyzed positions, but the search is long, up to 20/30 minutes and i don't want to be just a slower copy of Stockfish!-). I'll also try different methods to make it learn how to play "on his own".. Stay tooned! :)

Updates.
-Now bot works with Stockfish 17. It can change its strength level and thinking time based on opponent Elo and position, meaning that the lower the opponent Elo and the worse the position, the lower Stockfish level and lesser answer time.. and the opposite.
-There is also Ollama Gemma2b that generates an intro chat at the beginning of the game. Gemma2b knows who it is and chats in a funny dog-like way (cause Zoe is the name of my dog!).
-Bot has a few opening moves of King Gambit and it will always play them if it is White.

It's still super competitive, now i cannot beat it anymore even if games are much more equals!

I still haven't solved the "too many API calls issue" that may lead to a longer answer time, but for rapid or longer games it works quite fine.

I've wrote a Lichess post, here: https://lichess.org/@/andreagobbez/blog/new-bot-zoe_chessbot/wl2Pkidq

If anybody is interested in testing it (in rated games too), please contact me! :)

Updates. -Now bot works with Stockfish 17. It can change its strength level and thinking time based on opponent Elo and position, meaning that the lower the opponent Elo and the worse the position, the lower Stockfish level and lesser answer time.. and the opposite. -There is also Ollama Gemma2b that generates an intro chat at the beginning of the game. Gemma2b knows who it is and chats in a funny dog-like way (cause Zoe is the name of my dog!). -Bot has a few opening moves of King Gambit and it will always play them if it is White. It's still super competitive, now i cannot beat it anymore even if games are much more equals! I still haven't solved the "too many API calls issue" that may lead to a longer answer time, but for rapid or longer games it works quite fine. I've wrote a Lichess post, here: https://lichess.org/@/andreagobbez/blog/new-bot-zoe_chessbot/wl2Pkidq If anybody is interested in testing it (in rated games too), please contact me! :)

Updates.
-Now the bot will be active h24, 7/7!

Next step will be to improve its opening movesets and improve other things (like its AI)..

Updates. -Now the bot will be active h24, 7/7! Next step will be to improve its opening movesets and improve other things (like its AI)..

How can we play against it?

How can we play against it?

This topic has been archived and can no longer be replied to.