Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move time simulation #2

Open
link0007 opened this issue Dec 2, 2020 · 5 comments
Open

Move time simulation #2

link0007 opened this issue Dec 2, 2020 · 5 comments
Assignees

Comments

@link0007
Copy link

link0007 commented Dec 2, 2020

This is about the implementation of Maia in Lichess: Could Maia learn to take time before it moves? Ideally based on the complexity of the situation and the difficulty of finding the correct move.

Right now its moves are very human-like, but its move time is very frustrating to play against, and obviously unrealistic.

@reidmcy
Copy link
Member

reidmcy commented Dec 4, 2020

We've implement something like that, currently it looks at the time remaining, number of legal moves and move number to try and predict how long a human would take on the move. Then we add a large noise factor. I'll be looking into a better model this coming week as the current one is a simple linear model

@reidmcy reidmcy self-assigned this Dec 4, 2020
@link0007
Copy link
Author

link0007 commented Dec 4, 2020

Yes I noticed! Makes playing much more enjoyable.

One thing I've noticed, but perhaps this is tricky to model, is that for instance a stepladder checkmate sequence is a time when a human moves very quickly even though the number of legal moves is quite large. Whereas other endgame checkmate sequences are really tricky to figure out, and even grandmasters struggle to find them.

From an academic standpoint it's really interesting to think how to model this realistically. Of course, purely practically, even a simple implementation like you did now is enough to make it much more playable. If you could predict not only what moves a human player would make, but also how long it would take them to find it, that would be an amazing accomplishment.

@dllu
Copy link

dllu commented Mar 25, 2021

Yes, it is quite demoralizing to be winning against Maia and then lose on time because the bot starts playing moves super fast when it is low on time whereas a human inevitably makes more mistakes under time pressure or runs out of time. e.g. https://lichess.org/F9ztfa8g/white#61

@CallOn84
Copy link

CallOn84 commented Mar 2, 2024

The Lichess Bot API has a setting within its config files that forces the bot to "think" before making a move; It's called fake_think_time.

Have you tried this setting @reidmcy?

@reidmcy
Copy link
Member

reidmcy commented Mar 3, 2024

@CallOn84 The API does not have that. The official bot client has an option to add a delay using a simple linear model. We have a different linear model, at under five seconds there's a failsafe that disables the delay. There's still a some delay so the bots regularly time out, it's just the transition is usually very obvious to the opponent so feels artificial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants