Skip to content

Conversation

mike-koala-bear
Copy link

No description provided.

@MaggiCoder16
Copy link
Contributor

well.. lichess already shows some of these.. but the others seem cool

@suprateem-ux
Copy link
Contributor

Hmm , the imports should be at top ...

@mike-koala-bear
Copy link
Author

Hmm , the imports should be at top ...

fixed, torom let me know if you want any specific things in the stats (or if you want the command)

@Torom
Copy link
Owner

Torom commented Sep 29, 2025

I think it's overkill to download all the games of the day just to get daily statistics. I also hope that you understand your AI code and test it yourself.

The RAM and CPU usage might be quite nice, we already have everything we need for that...

@mike-koala-bear
Copy link
Author

@Torom

I think it's overkill to download all the games of the day just to get daily statistics.

I have fixed this, thank you.

I also hope that you understand your AI code and test it yourself.

I also understand the AI code and have tested it, thank you very much.

This is an example of what it looks like currently:

stats

=== Bot Statistics ===
👤 Username: TacticalBot

Ratings:
  Bullet: 3094
  Blitz: 2987
  Rapid: 2874
  Classical: 2000
  Correspondence: 2000
  Chess960: 2435
  Kingofthehill: 2338
  Threecheck: 2442
  Antichess: 2752
  Atomic: 2588
  Horde: 2260
  Racingkings: 2468
  Crazyhouse: 2264

Total Games Today: 50
Played 11 bullet games: 2 wins 9 draws +3 rating
Played 7 kingOfTheHill games: 5 wins 1 draw 1 loss -6 rating
Played 8 antichess games: 4 wins 1 draw 3 losses -1 rating
Played 8 threeCheck games: 7 wins 1 loss +3 rating
Played 1 atomic games: 1 win no rating change
Played 2 chess960 games: 2 draws +1 rating
Played 5 horde games: 2 wins 3 losses -7 rating
Played 5 racingKings games: 5 draws -3 rating
Played 3 crazyhouse games: 3 wins +12 rating

Memory Usage: 32.6 MB
CPU Usage: 0.1%
=========================

@Torom
Copy link
Owner

Torom commented Oct 1, 2025

I also hope that you understand your AI code and test it yourself.

I also understand the AI code and have tested it, thank you very much.

Doesn't look like it to me.
You are still downloading all the games from a day. The AI has created new API functions for you, but they are not being used...

@mike-koala-bear
Copy link
Author

mike-koala-bear commented Oct 1, 2025

I also hope that you understand your AI code and test it yourself.

I also understand the AI code and have tested it, thank you very much.

Doesn't look like it to me. You are still downloading all the games from a day. The AI has created new API functions for you, but they are not being used...

@Torom
I’ve removed the unused functions. About downloading all the games of the day, I’m not sure whether it’s possible to display the full activity for the day without downloading them all.

@veerbot
Copy link

veerbot commented Oct 1, 2025

Remove comments (lines starting with a checkmate symbol)

@mike-koala-bear
Copy link
Author

Remove comments (lines starting with a checkmate symbol)

@veerbot
All of them? Or just in the _stats function in user_interface.py?

@veerbot
Copy link

veerbot commented Oct 1, 2025

All of them CONMENTS DONT MAKE SENSE

@veerbot
Copy link

veerbot commented Oct 1, 2025

U can do it manually without ai

@veerbot
Copy link

veerbot commented Oct 1, 2025

Such as # Use new API functions for stats

@mike-koala-bear
Copy link
Author

@veerbot
done

@mike-koala-bear
Copy link
Author

mike-koala-bear commented Oct 4, 2025

The RAM and CPU usage might be quite nice, we already have everything we need for that...

@Torom I am waiting for your review. If you want I can add RAM and CPU usage, or other info in stats.

EDIT: I have found the user activity endpoint, sorry for the inconvenience. Is it okay if I add colour to the stats? I can commit with new endpoint.

@Torom
Copy link
Owner

Torom commented Oct 4, 2025

What I wrote above still applies. I don't want to download all the games of a day. Please don't add color to keep the scope of the PR minimal.

@mike-koala-bear
Copy link
Author

Please don't add color to keep the scope of the PR minimal.

I can remove it, no problem.

What I wrote above still applies. I don't want to download all the games of a day.

We can use https://lichess.org/api#tag/Users/operation/apiUserActivity right?

@Torom
Copy link
Owner

Torom commented Oct 4, 2025

Yes, that's one of the endpoints your AI had already shown you...

@suprateem-ux
Copy link
Contributor

I am not sure but https://lichess.org/api/user/{username}/perf/{perf} is an endpoint

@mike-koala-bear
Copy link
Author

mike-koala-bear commented Oct 4, 2025

@Torom
Would you like it to look something like:

Threecheck : (5 games: 3 wins, 2 losses • 60.0% win rate • +12)
Atomic     : (4 games: 3 wins, 1 loss • 75.0% win rate • -2)
Bullet     : (10 games: 9 wins, 1 losses • 45.0% win rate • +0)

I am not sure but https://lichess.org/api/user/{username}/perf/{perf} is an endpoint

@suprateem-ux
That doesn't show activity for the day

@suprateem-ux
Copy link
Contributor

Tbh it feels out of scope of botli . Botli is basically an interface between engines , books and the lichess bot api . Also the user can cleanly see it via website and i am not a fan of downloading ideas in botli

@mike-koala-bear
Copy link
Author

Tbh it feels out of scope of botli . Botli is basically an interface between engines , books and the lichess bot api . Also the user can cleanly see it via website and i am not a fan of downloading ideas in botli

True, I guess you can see it in the browser. I am just waiting for @Torom to approve / disapprove it.

@Torom
Copy link
Owner

Torom commented Oct 4, 2025

I have already said twice that I don't want the game download in BotLi.

I could imagine a command that reads system parameters such as CPU, RAM, and perhaps temperatures (?) and displays them to the user being useful.

@mike-koala-bear
Copy link
Author

mike-koala-bear commented Oct 4, 2025

I have already said twice that I don't want the game download in BotLi.

I could imagine a command that reads system parameters such as CPU, RAM, and perhaps temperatures (?) and displays them to the user being useful.

@Torom
Using https://lichess.org/api#tag/Users/operation/apiUserActivity endpoint doesn't download games. It fetches WDL and rating difference for each variant.

I can use that endpoint to make it look something like:

Threecheck : (5 games: 3 wins, 2 losses • 60.0% win rate • +12)
Atomic     : (4 games: 3 wins, 1 loss • 75.0% win rate • -2)
Bullet     : (10 games: 9 draws, 1 losses • 45.0% win rate • +0)

Do you want that or do you want to change it a bit?

@mike-koala-bear
Copy link
Author

mike-koala-bear commented Oct 5, 2025

@Torom This is an example of what it looks like now:

stats

=== Bot Statistics ===
Username: TacticalBot

Current Ratings:
  Bullet         : 3086
  Blitz          : 2987
  Rapid          : 2874
  Classical      : 2000
  Correspondence : 2000
  Chess960       : 2445
  Kingofthehill  : 2373
  Threecheck     : 2457
  Antichess      : 2757
  Atomic         : 2615
  Horde          : 2263
  Racingkings    : 2480
  Crazyhouse     : 2266

Today's Games:
Total Games: 14
Antichess      : (4 games: 3 wins, 1 loss • 75.0% win rate • +3)
Kingofthehill  : (3 games: 2 wins, 1 draw • 83.3% win rate • +11)
Bullet         : (2 games: 2 draws • 50.0% win rate • 0)
Atomic         : (2 games: 2 wins • 100.0% win rate • +8)
Chess960       : (1 game: 1 draw • 50.0% win rate • 0)
Racingkings    : (1 game: 1 win • 100.0% win rate • +6)
Threecheck     : (1 game: 1 win • 100.0% win rate • +7)

System Information:
Memory Usage: 32.0 MB
CPU Usage: 0.2%
=========================

I can start implementing RAM and CPU

@Torom
Copy link
Owner

Torom commented Oct 5, 2025

Sorry, but that's too much code for something you can see with three clicks on the Lichess website.

@mike-koala-bear
Copy link
Author

mike-koala-bear commented Oct 5, 2025

Sorry, but that's too much code for something you can see with three clicks on the Lichess website.
I could imagine a command that reads system parameters such as CPU, RAM, and perhaps temperatures (?) and displays them to the user being useful.

@Torom
So shall I remove the user activity and show the system parameters such as CPU and RAM?

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

Successfully merging this pull request may close these issues.

5 participants