How does an engine with 0 ELO play ?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: How does an engine with 0 ELO play ?

Post by Henk »

Huh is negative ELO possible? Didn't know that.
User avatar
Kotlov
Posts: 266
Joined: Fri Jul 10, 2015 9:23 pm
Location: Russia

Re: How does an engine with 0 ELO play ?

Post by Kotlov »

velmarin wrote:And the opposite, what would be the "elo" of a perfect engine?
5000, 10000, :?:
It depends on null in measuring system.
What strength will be taken as null?
Last edited by Kotlov on Mon Apr 16, 2018 3:14 pm, edited 1 time in total.
Eugene Kotlov
Hedgehog 2.1 64-bit coming soon...
User avatar
Kotlov
Posts: 266
Joined: Fri Jul 10, 2015 9:23 pm
Location: Russia

Re: How does an engine with 0 ELO play ?

Post by Kotlov »

Henk wrote:Huh is negative ELO possible? Didn't know that.
Why not?
Eugene Kotlov
Hedgehog 2.1 64-bit coming soon...
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: How does an engine with 0 ELO play ?

Post by Henk »

Because lowest class J was 0-199. See Wikipedia. Haven't found time to read it carefully.
User avatar
Kotlov
Posts: 266
Joined: Fri Jul 10, 2015 9:23 pm
Location: Russia

Re: How does an engine with 0 ELO play ?

Post by Kotlov »

Henk wrote:Because lowest class J was 0-199. See Wikipedia. Haven't found time to read it carefully.
United States Chess Federation classification of players?
Who cares?...
Eugene Kotlov
Hedgehog 2.1 64-bit coming soon...
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: How does an engine with 0 ELO play ?

Post by hgm »

We might very well discover that even Elo differences are not an absolute measure, but are relative to the pool of players that you use to determine the Elo. E.g. that when let two players of vast strength difference play in one pool of 1000 players, all playing enough games against each other so that statistical errors become completely insignificant, an you etermine an Elo from that.... That you get a very different resullt when you repeat that experiment with a ifferent group of 1000 players. In fact we alreay know this: if the pool of players are all versions of the same engine ('self play'), the Elo differences come out much larger than when you use unrelated engine opponents.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: How does an engine with 0 ELO play ?

Post by Dann Corbit »

A zero Elo engine must lose every single game, assuming that it plays against an engine with 1 Elo or more (negative bias is also possible).

So, for instance, an engine that is actively trying to lose with incredible ability against an engine that is actively trying to win with incredible ability (consider SF playing loser's chess against SF playing normal chess) could possibly achieve 0 Elo.

But you have to be careful to avoid book lines that cause a draw. Also, the strong engine might force a draw because it does not know the opponent is trying to lose.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Kotlov
Posts: 266
Joined: Fri Jul 10, 2015 9:23 pm
Location: Russia

Re: How does an engine with 0 ELO play ?

Post by Kotlov »

Dann Corbit wrote:A zero Elo engine must lose every single game,
Why?
Eugene Kotlov
Hedgehog 2.1 64-bit coming soon...
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: How does an engine with 0 ELO play ?

Post by Dann Corbit »

Kotlov wrote:
Dann Corbit wrote:A zero Elo engine must lose every single game,
Why?
He was describing USCF.
Use these equations for Elo, and solve for zero:

Code: Select all

#include <stdio.h>
#include <math.h>
#include "uscf.h"

double          provisional_rating&#40;
    double opponent_average_rating,
    unsigned wins,
    unsigned draws,
    unsigned losses
)
&#123;
    double          new_rating;
    if &#40;wins + draws + losses == 0&#41;
        new_rating = 0.;
    else
        new_rating = opponent_average_rating +
                     &#40;400.0 * (&#40;wins + 0.5 * draws&#41; - &#40;0.5 * draws + losses&#41;) /
                      &#40;wins + draws + losses&#41;);
    return &#40;double&#41; &#40;unsigned&#41; &#40;new_rating + 0.5&#41;;
&#125;
double          established_rating&#40;
    double old_rating,
    double event_score,
    double rating_difference,
    char half_k_event,
    double prize_amount,
    unsigned event_level
)
&#123;
    double          rating;
    double          k = old_rating >= 2400.0 ? 16.0 &#58; old_rating >= 2100.0 ? 24.0 &#58; 32.0;
    if &#40;half_k_event&#41;
        k *= 0.5;
    rating = old_rating + k * &#40;event_score - win_expectancy&#40;rating_difference&#41;);
    if &#40;old_rating <= 2099.0 &&
            rating >= 2100.0 &&
            rating <= 2399.0&#41;
        rating = 2100.0 + &#40;rating - 2100.0&#41; * 0.75;
    else if &#40;old_rating >= 2100.0 &&
             old_rating <= 2399.0 &&
             rating <= 2099.0&#41;
        rating = 2100.0 * &#40;rating - 2100.0&#41; * 1.33;
    else if &#40;old_rating >= 2100.0 &&
             old_rating <= 2399.0 &&
             rating >= 2400.0 &&
             rating <= 3000.0&#41;
        rating = 2400.0 * &#40;rating - 2400.0&#41; * 0.66;
    else if &#40;old_rating >= 2400.0 &&
             old_rating <= 3000.0 &&
             rating >= 2100.0 &&
             rating <= 2399.0&#41;
        rating = 2400.0 * &#40;rating - 2400.0&#41; * 1.50;
    return rating_floor_adj&#40;old_rating, rating, prize_amount, event_level&#41;;
&#125;
double          win_expectancy&#40;
    double rating_difference
)
&#123;
    return 1.0 / &#40;pow&#40;10.0, &#40;rating_difference / 400.0&#41;) + 1.);
&#125;
double          rating_floor_adj&#40;
    double old_rating,
    double new_rating,
    double prize_amount,
    unsigned event_level
)
&#123;
    char            large_cash_prize = 0;
    double          temp_floor = old_rating - 200.0;
    unsigned        ltf = (&#40;unsigned&#41; &#40;temp_floor&#41;) % 100UL * 100UL;
    if &#40;old_rating >= 2400 || old_rating <= 100&#41;
        return new_rating;
    if &#40;old_rating < 1600&#41;
        ltf = 100;
    if &#40;old_rating < 2200 && prize_amount >= 1000&#41;
        large_cash_prize = 1;
    else if &#40;old_rating < 2300 && prize_amount >= 1500&#41;
        large_cash_prize = 1;
    else if &#40;old_rating < 2400 && prize_amount >= 2000&#41;
        large_cash_prize = 1;
    if &#40;large_cash_prize&#41;
        ltf = event_level;
    return ltf > new_rating ? &#40;double&#41; ltf &#58; new_rating;
&#125;
unsigned long   rating_floor&#40;
    double old_rating,
    double new_rating,
    double prize_amount,
    unsigned event_level
)
&#123;
    char            large_cash_prize = 0;
    unsigned        floor_value = ((&#40;unsigned&#41; &#40;old_rating - 200&#41;) % 100U&#41; * 100U;
    if &#40;old_rating >= 2400 || old_rating <= 100&#41;
        return &#40;unsigned long&#41; &#40;new_rating + 0.5&#41;;
    if &#40;old_rating < 1600&#41;
        floor_value = 100;
    if &#40;old_rating < 2200 && prize_amount >= 1000&#41;
        large_cash_prize = 1;
    else if &#40;old_rating < 2300 && prize_amount >= 1500&#41;
        large_cash_prize = 1;
    else if &#40;old_rating < 2400 && prize_amount >= 2000&#41;
        large_cash_prize = 1;
    if &#40;large_cash_prize&#41;
        floor_value = event_level;
    return floor_value;
&#125;
const char     *
describe_uscf_rating&#40;
    unsigned rating
)
&#123;
    char           *rating_name;
    if &#40;rating > 2399&#41;
        rating_name = "Senior Master";
    else if &#40;rating >= 2200&#41;
        rating_name = "Master";
    else if &#40;rating >= 2000&#41;
        rating_name = "Expert";
    else if &#40;rating >= 1800&#41;
        rating_name = "Class A";
    else if &#40;rating >= 1600&#41;
        rating_name = "Class B";
    else if &#40;rating >= 1400&#41;
        rating_name = "Class C";
    else if &#40;rating >= 1200&#41;
        rating_name = "Class D";
    else if &#40;rating >= 1000&#41;
        rating_name = "Class E";
    else if &#40;rating >= 800&#41;
        rating_name = "Class F";
    else if &#40;rating >= 600&#41;
        rating_name = "Class G";
    else if &#40;rating >= 400&#41;
        rating_name = "Class H";
    else if &#40;rating >= 200&#41;
        rating_name = "Class I";
    else
        rating_name = "Class J";
    return rating_name;
&#125;
char            string&#91;32767&#93;;
int             main&#40;void&#41;
&#123;
    double          rating_difference;
    for &#40;rating_difference = 0; rating_difference <= 3000; rating_difference += 100&#41; &#123;
        printf&#40;"Win expectency for a difference of %.0f points is %g\n", rating_difference,
               win_expectancy&#40;rating_difference&#41;);
    &#125;
    printf&#40;"%.15g\n", win_expectancy&#40;60.0&#41;);
    puts&#40;"Elo difference&#58;");
    fgets&#40;string, sizeof string, stdin&#41;;
    rating_difference = atof&#40;string&#41;;
    printf&#40;"Win expectency for a difference of %.0f points is %g\n", rating_difference,
           win_expectancy&#40;rating_difference&#41;);

    return 0;
&#125;
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Ozymandias
Posts: 1535
Joined: Sun Oct 25, 2009 2:30 am

Re: How does an engine with 0 ELO play ?

Post by Ozymandias »

Kotlov wrote:What is 0 Elo?
That's the obvious question to ask when reading something like the thread title, but when we looked at random movers a while back, it became apparent that they did not fit very well into the definition of "player", as assumed here:
The Elo rating system is a method for calculating the relative skill levels of players
.
A "0 Elo player" may just make as little sense, after all, when someone is learning the rules of chess, he goes from a point where he breaks them too often, to be able to finish a legal game, to another where he actually can "play" a full game. By that time,they're far from 0, although they may still make the occasional illegal move (I've seen a federated player winning an official game by moving his rook to a different row and column in just one move, try getting that one past even a random mover).