Auto-Elo in V4

149 views
Skip to first unread message

Wilhelm

unread,
Mar 5, 2026, 4:22:51 AMMar 5
to PicoChess

A) The Auto-Elo mode in V4 does not work correctly.
It can be selected and configured through the menu, but afterwards the engine still calculates with its maximum strength.

The following error message appears in the log file:

ERROR     engine - _engine_rating: invalid option set for UCI_Elo=((1566 / 50 + 1) * 50), exception=unsupported operator: Div

Maybe someone can help identify the cause of this problem.



B) Suggestion for improvement

In both versions, the rating value in Auto-Elo mode is reduced down to 0. As a result, at some point the Elo value no longer changes, even if all games are won or lost. This is probably not what the developer or the user intended.

In my opinion it would be better to set a lower limit for the rating value, for example 25 or 30. This would ensure that the engine’s Elo rating could still change by about ±2 points per game.

For my own setup I solved this issue as follows:

def _save_rating(self, new_rating: Rating):
    write_picochess_ini("pgn-elo", max(500, int(new_rating.rating)))
    write_picochess_ini("rating-deviation", max(26, int(new_rating.rating_deviation)))

There are certainly better and more elegant solutions.

RandyR

unread,
Mar 9, 2026, 5:44:24 PMMar 9
to PicoChess
Hi Wilhelm,

I had a chance to look at the auto-Elo issue. Yes, there seems to be a problem in engine.py. Here is the error I am seeing in v4.2.3:

2026-03-09 14:25:07.274   ERROR     engine - _engine_rating: invalid option set for UCI_Elo=max(1320, int(1164 / 50 + 1) * 50), exception=unsupported function call: Name(id='int', ctx=Load())

I'm sure Johan can solve it. :^)

Randy

Johan Sjöblom

unread,
Mar 10, 2026, 6:51:25 AMMar 10
to PicoChess
Yes, Good testing, thanx. I did see the post earlier, but I ran out of time while building 4.2.3. I will most likely make a hotfix to the master code to fix this, at latest in the weekend.
-- Johan

Reply all
Reply to author
Forward
0 new messages