Fixing mamer

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Fixing mamer

Post by hgm »

The public version of the ICS tourney manager bot 'mamer' needs a thorough upgrade. Unfortunately it is written in C++, a programming language I do not command. I will start a thread in the hope other people can contribute to this effort.

For one, I keep the mamer sources in my on-line repository a http://hgm.nubati.net/cgi-bin/gitweb.cgi , in the 'capablanca.git' section. There it is in the source tree at lasker-2.2.3/bots/mamer.

The most badly needed feature is a 'latejoin' command, that would enable us to add participants to the tourney after some rounds have already been played. For this it is important to know exactly how mamer keeps track of who participates, against whom these have already played, and how it stores results.

From looking at the code, and guessing what it means, I have deduced the following:

Mamer seems to store its info as linked lists. Two important type of cells are Player and TourneyPlayer. There is only a single cell of the latter type for each player, in the list of participants. Apart from the player name it also stores its rating, its current score, the number of times it had white or black, and the number of times it had those consecutively in the current stretch, a flag whether he is still active, the name of his opponent (in the current round?), a list of all opponents he has played, and some working variables used during the pairing process (including a list of potential opponents for the upcoming round).

The lists of opponents and potential opponents, as well as temporary lists used for sorting the players by score and rating consist of Player cells. These store much less data: just name, rating and two (score?) values (a float and integer).

It seems that once a player is added to the list of participants, he is never removed. A player can be 'forfeited' (i.e. taken out of the tourney), but this is done by setting its 'activeFlag' to 0, not by removing its cell(s). A cell can be made for a 'player' called '_BYE_' if at any time the number of active participants gets odd, and this pseudo-player can be set to inactive as well if it is no longer needed (e.g. after the odd player is forfeited).


At first glance it seems it should be possible to late-join a player by adding a TourneyPlayer cell to the list of participants, setting his number of whites and blacks to 0, setting his score to whatever policy you have for scores of late-joiners, and give him an empty list of opponents. (And add, activate or de-activate the _BYE_ as the case requires.) There seems to be no need for every active player to have an equal number of opponents in his opponent list; all iteration over this is done by iterating through the lists, not by looping an array index over a fixed range. That does make it a lot easier to add a new player 'on the fly'.

What is nasty is that adding a player is an indirect process, because mamer wants to request the player's rating from the ICS first. So when you currently do 'join', all that does is sent a *getpi command to the server ('get player info'), to request the player ratings. Then the chain of events only continues if it recognizes the reply to this request in the input from the ICS, which leads to checking if the rating was in range, and doing the actual adding. In the mean time the player is stored in a temporary list, to preserve the info in which tourney he wants to join.

Normal joins can only be done when the tourney is 'open'; a 'latejoin' command should also work after closing it, and probably only managers should be allowed to use that command. In this latter aspect it is not very different from the 'addtotourney' (att) command, which managers can now use to 'join' a player when the tourney is open. Perhaps we should simply allow this command to be used for late-joins as well, to keep it simple. For that it should be allowed also after closing. As this kind of checking is currently done in the second step, the info whether the *getpi event was triggered by a post-deadline 'att' or a normal 'att' or 'join' should be passed in the temporary list together with player name and tourney number.

That is about as far as I got.
CRoberson
Posts: 2053
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Fixing mamer

Post by CRoberson »

What ever command should be done by the admin otherwise anybody could join a tournament late and creep into the pairings. If the late entry is unacceptable, the admin has to do some work.

Ok, I'll look at it. I can code C++.

However, I have a request. I was publicly ridiculed to my face for have a program that is only rated in the 1400's. It was not a fun experience. So, please adjust all the comp ratings by adding some constant say 800 Elo. Also, adjust the starting rating for a new bot. If it is like FICS it is around 1400 to 1600 which is about right for humans.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fixing mamer

Post by hgm »

I suppose before the tournament we simply should change all ratings by hand to conform to the seeding we have in mind. That could also take care of the absolute-value problem.

I could change the ICS such that everyone would start at 5000. For existing accounts that would not change anything, however. And I don't feel like going through all existing accounts to change their ratings.

About mamer:

I already pushed some changes towards a late-join possibility to my repository. All untested (other than that it compiles); this stuff is hard to test, because I would actually have to make a tourney for it and provide all participants... My attempt was to extend the use of the 'addtotourney' command (which already is a managers-only command) to also work if the tourney is already closed.

The hard part is to figure out what extra you have to do compared to adding a player before the tourney starts, to get a consistent state. (Which the other players might get if they are processed by CloseAndStart.) The only thing I could find was clearing their white/black counts.

It seemed a good idea, however, to give them a dummy game. They will have missed at least one game (and probably we would not want to allow late-joins in an even later round), so this would bring them in-phase with the rest of the participants, and thus produce nicer cross-table output. What I did so far was adding the BYE to their list of opponents. (This would probably also prevent they get any future byes, which seems good.) I assigned them a 0 result for this dummy game.

The idea was that when a 0-result for a late-join would not be desirable, the manager could always use 'setres' to change it into 1/2 or 1. But it seems setres only wants to do something if the two mentioned players (the bye and the late-join) occur in each other's opponent list. And I did not add the late-join in the list of BYE opponents. I even doubt it would be wise to do that, because it might lead to the BYE getting some points (affecting who gets assigned byes later), and it might already get a full complement of games (starting with an odd number of players, and then doing two late-joins), so that it would get more games than the other players, messing up the 'who' output. We could patch the 'setres' command to allow the case where one of the players is the BYE, and treat any result changes from that one-sidedly. OTOH, I am also not sure what effect it would have on the pairing algorithm (MakeAssignments) if A is in the opponent list of B, but B not in the opponent list of A. (If we are lucky, then there is none.)
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Fixing mamer

Post by Don »

CRoberson wrote:What ever command should be done by the admin otherwise anybody could join a tournament late and creep into the pairings. If the late entry is unacceptable, the admin has to do some work.

Ok, I'll look at it. I can code C++.

However, I have a request. I was publicly ridiculed to my face for have a program that is only rated in the 1400's. It was not a fun experience. So, please adjust all the comp ratings by adding some constant say 800 Elo. Also, adjust the starting rating for a new bot. If it is like FICS it is around 1400 to 1600 which is about right for humans.
I'll bet a great deal of ridicule came from people who do not actually have their own programs, right?

These are also the most vocal ones about almost everything, who should be allow to participate, the status of the so called clones, etc. They consider themselves the experts.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fixing mamer

Post by hgm »

I can add that people that want to ridicule others will do it no matter what. If you would have had a rating of 5000, they would have ridiculed you for having a 'deflated toy rating'. So it is a bit pointless.

Btw, if you have 1400, you cannot blame it all on the server. FairyMax has 1300, and surely you should be able to do more than 100 points better than Fairy-Max. RybkaGB has 2324 blitz rating.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Fixing mamer

Post by Don »

hgm wrote:I can add that people that want to ridicule others will do it no matter what. If you would have had a rating of 5000, they would have ridiculed you for having a 'deflated toy rating'. So it is a bit pointless.

Btw, if you have 1400, you cannot blame it all on the server. FairyMax has 1300, and surely you should be able to do more than 100 points better than Fairy-Max. RybkaGB has 2324 blitz rating.
There is a class of people (perhaps I should say, people who have no class) who will take some very strong program such as Houdini 3 or whatever is good at the time and attach their own psyche to it. It becomes an extension of them. They will laugh at lesser programs and take a great deal of pride in watching them get demolished. They will get depressed when it occasionally loses while making excuses for "their" program losing.

Over the decades we have seen this with people operating accounts on the servers using programs such as Crafty and others. They will go to great lengths to protect the ratings of the programs they operate and it's all rather silly since most of them do not even know how to write a chess program.

There was a couple of tournaments where I grabbed some random person and asked him to operate my program (after some reassurance they were good chess players and would be a good operator) and the transformation was amazing! After just a little bit of time it was "their" program and they would explain what happened to other using terminology such as, "then my program did this and then it did that" and so on. They took great pride in the wins and got depressed when it lost!
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
CRoberson
Posts: 2053
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Fixing mamer

Post by CRoberson »

hgm wrote:I can add that people that want to ridicule others will do it no matter what. If you would have had a rating of 5000, they would have ridiculed you for having a 'deflated toy rating'. So it is a bit pointless.

Btw, if you have 1400, you cannot blame it all on the server. FairyMax has 1300, and surely you should be able to do more than 100 points better than Fairy-Max. RybkaGB has 2324 blitz rating.
Telepath's blitz rating is in the 1700's on your server. At the time of CCT, it had only 1 standard rated game which left it with a rating in the 1400s. Now that some of the CCT games were rated, it has a standard rating in the 1600s.

Other change options, you could/should change the entering rating for computers. Given that the system has automated account creation, everybody could get new accounts and the ratings would start over.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fixing mamer

Post by hgm »

But the system does not have automated account creation at all...

Accounts have to be created by hand, (at which time their ratings are automatically initialized), and only after that you can add the handle to the computer list (which does not touch ratings, as the command for that considers it just a list like any other list).
CRoberson
Posts: 2053
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Fixing mamer

Post by CRoberson »

Don wrote:
CRoberson wrote:What ever command should be done by the admin otherwise anybody could join a tournament late and creep into the pairings. If the late entry is unacceptable, the admin has to do some work.

Ok, I'll look at it. I can code C++.

However, I have a request. I was publicly ridiculed to my face for have a program that is only rated in the 1400's. It was not a fun experience. So, please adjust all the comp ratings by adding some constant say 800 Elo. Also, adjust the starting rating for a new bot. If it is like FICS it is around 1400 to 1600 which is about right for humans.
I'll bet a great deal of ridicule came from people who do not actually have their own programs, right?

These are also the most vocal ones about almost everything, who should be allow to participate, the status of the so called clones, etc. They consider themselves the experts.
The primary offense came from somebody who can't code at all and he doesn't claim to, but he thinks that programming a GM level Chess program must be easy and I've told him that it isn't and my program is GM level on my hardware. He used to use the CCRL data against me until I proved that HW makes a difference and their HW is considerably slower than mine. After this weekend, he had much fuel to rage about. Telepath didn't beat a single program with a server rating above 2200 or 1900 for that matter.

He has argued that Chess is purely brute force despite my proofs otherwise and ....
dchoman
Posts: 171
Joined: Wed Dec 28, 2011 8:44 pm
Location: United States

Re: Fixing mamer

Post by dchoman »

I agree with Charles. Obviously, we all know that the absolute scale of the ratings here are meaningless, and as long as this information was only digested by authors and other experts it wouldn't matter at all. However, if the ratings are going to appear in public, like on the CCT website, I think it is important not to communicate unintended messages like, "only weak programs about the strength of a club player participate in this tournament."
The trouble here is that the ratings are indeed scaled assuming the average player is club strength. A better option might be to make the ratings obviously non-human.... maybe centered on 0 or even a negative number like -1000 or something? Or there could be a calibration bot, with a good approximate human rating, if people prefer ratings that are quasi-human scale.

- Dan