A mamer replacement - what would it have to do?

Discussion of chess software programming and technical issues.

Moderator: Ras

ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

A mamer replacement - what would it have to do?

Post by ZirconiumX »

This is not a fix mamer thread. This is a replace mamer thread.

Most people who have used it agree that it is buggy beyond all measure.

So - what would a mamer replacement have to do?

A very basic one would just make random pairings and wait for them to end - but that would not be ideal.

Matthew:out
tu ne cede malis, sed contra audentior ito
User avatar
hgm
Posts: 28452
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A mamer replacement - what would it have to do?

Post by hgm »

Buggy beyond all measure? :shock: Can you name even one bug?

The task of mamer is to run Swiss or round-robin tourneys on an ICS. If you want other tourney forms, it seems a lot easier to simply add those. Especially if it is something as trivial as random pairing. And the main problem people seem to have is the 'waiting for them to end' part, which is the first thing you want to re-instate. Because often they do not end.
ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: A mamer replacement - what would it have to do?

Post by ZirconiumX »

hgm wrote:Buggy beyond all measure? :shock: Can you name even one bug?

The task of mamer is to run Swiss or round-robin tourneys on an ICS. If you want other tourney forms, it seems a lot easier to simply add those. Especially if it is something as trivial as random pairing. And the main problem people seem to have is the 'waiting for them to end' part, which is the first thing you want to re-instate. Because often they do not end.
I've witnessed mamer crash almost daily on the OICS.

Why don't we try a form of advanced pairing? As soon as two players that should play each other are free - start the match automatically. Being asynchronous may be something of a pain to implement, but it will be necessary by the looks of things.

For now I'll keep things simple and stupid.

Matthew:out
tu ne cede malis, sed contra audentior ito
User avatar
hgm
Posts: 28452
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A mamer replacement - what would it have to do?

Post by hgm »

I doubt that very much, as it is the same mamer I use, and the only thing I have ever seen make it crash (using the listmanagers command) has been repaired long ago.

So what do you mean by 'crash'? Does it log out from OICS?
ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: A mamer replacement - what would it have to do?

Post by ZirconiumX »

Ok - looks like I was wrong after all - I apologise for my error.

It's just that mamer being synchronous gives the appearance of no activity, followed by jshriver having to kill it off - it looked like a hang, and subsequent crash.

There are two solutions I can see:
1. Hack mamer to adjourn a * game to the side which remains connected.
2. Hack mamer to start games whenever the next game's players are available.

Having said that, I have had to manually manage a tournament where I had to kill off mamer because one of the bots had crashed, making mamer wait patiently for a game that had just been terminated.

Matthew:out
tu ne cede malis, sed contra audentior ito
User avatar
hgm
Posts: 28452
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A mamer replacement - what would it have to do?

Post by hgm »

ZirconiumX wrote:It's just that mamer being synchronous gives the appearance of no activity, followed by jshriver having to kill it off - it looked like a hang, and subsequent crash.
Kill it off? You mean really quit it on the machine where it is running, and start a new one?

That should really never be necessary. Mamer has many commands to recover from various tourney problems:
*) the setres command allows you to define by hand the result of a scheduled tourney game. I often use that when players started their game with reversed colors or wrong TC, so that mamer ignores it; when there is a result I just use that for the game rather than having it replay with correct colors or TC, and have everyone wait.
*) You can forfeit a player, so it is removed from the tourney, and will not get any new games. This can be used if the player has disconnected and does not seem to come back.
*) you can delete a tourney, so that it is removed from mamer's memory without disturbing any of the other tourneys going on.
There are two solutions I can see:
1. Hack mamer to adjourn a * game to the side which remains connected.
This normally is an ICS function. I am not sure if this version of the ICS supports it, but on FICS/ICC there is a 'noescape' qualifier to the game which makes you lose on disconnect. I am not sure the ICS would accept adjudications from mamer, and if mamer just sets the result for itself, you would accumulate lots of adjourned games. Some clients might remember they were in a game, and automatically try to restart it when they re-connect, so they would be busy when mamer tries to start the next round for them. And the next time the same players meet the ICS would first let them play the adjourned game, rather than the game they request. So it is very undesirable to accumulate adjourned games.

I guess that because it is mamer that starts the games, it should be told to ue the noescape qualifier, though.

Problem is that in most tourneys the disconnection rules are much more liberal. Like only the 3rd disconnect loses, or when you are not back within 10 min, etc.
2. Hack mamer to start games whenever the next game's players are available.
Well, have you ever heard of Swiss tourneys?
Having said that, I have had to manually manage a tournament where I had to kill off mamer because one of the bots had crashed, making mamer wait patiently for a game that had just been terminated.
Well, like I wrote above, killing is like having your car demolished and buy a new one every time it runs out of gas. It is more a driver problem than a car problem...

The waiting is intended behavior. It was one of the first thing you said the replacement you proposed should do too. So it would suffer from exactly the same problem, and the only difference would be that it would have vastly inferior capabilities as to tourney forms.
User avatar
jshriver
Posts: 1371
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: A mamer replacement - what would it have to do?

Post by jshriver »

hgm wrote:
ZirconiumX wrote:It's just that mamer being synchronous gives the appearance of no activity, followed by jshriver having to kill it off - it looked like a hang, and subsequent crash.
Kill it off? You mean really quit it on the machine where it is running, and start a new one?

Aye sadly it does crash "segfault" every day or two. I'm using the same one from your latest git tree.

Right now it's setup in a bash script that just reloads it. Problem I have to manually reload my tourney bot so to create a new tournament after mamer dumps core.

Really not sure what the issue is to be honest.
User avatar
hgm
Posts: 28452
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A mamer replacement - what would it have to do?

Post by hgm »

It must crash when it is doing something, as I have it on for weeks without problems when I am not using it. So the question is what it is doing when the segfault occurs.

The ICS should write everything it receives as input on a file command.log in its directory. It should be possible to check in there what the last command was that was sent to mamer before it crashed, or what the last thing was mamer sent to the ICS.
User avatar
jshriver
Posts: 1371
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: A mamer replacement - what would it have to do?

Post by jshriver »

Thank you very much good sir. Will check it out more this evening. I have noticed a lot of the times it crashes is at the beginning of a tournament.

Tourney bot works by tell mamer create, tell mam open, mam att engine #1. (stv for whatever I want from a list) With a 1 or 2 second delay between "mam att engine #"
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: A mamer replacement - what would it have to do?

Post by Evert »

jshriver wrote: Right now it's setup in a bash script that just reloads it. Problem I have to manually reload my tourney bot so to create a new tournament after mamer dumps core.
You can use the core dump to get a backtrace and figure out why (and where) it's crashing.

Could be useful information. :)