2011 6h Annual ACCA Pan American Computer Chess Championship

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

Moderator: Ras

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

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by hgm »

I am very sorry about the mamer crash. It turns out that one of the spectators used the command "mam ml" to see the list of managers, and this caused mamer to croak. Fortunately he reported this to me, or I would never have known what caused it. Knowing the trigger I could systematically debug it (indeed mamer crashed every time when you sent it this command). I did that this morning, and found the following bug:

Code: Select all

//- ListManagers ------------------------------------------------------
int CommandEntry::ListManagers(User *user, param_list params) {
    int i=1, needToDelete=0;
    long last;
    char filename[256], manager[NAMELEN], date[16];
    User *u=NULL, *newUser = NULL;
    struct tm *tmpDate;
    FILE *theFile;

    i = params[0].type; // just to get rid of the compiler messages
    sprintf(filename, "%s/managers", gMamer.dataFilePath);
    if((theFile = fopen(filename, "r"))) {
      gMamer.XServerCom("%s %s %s %s%s", "qtell", user->name, "\\n", gMamer.username, "'s Manager List:\\n\\n");
      gMamer.XServerCom("%2s%-18s %3s %4s %-8s%2s%-18s %3s %4s %-8s%s",
			"","Name","Lvl","Tnys","Last", "","Name","Lvl","Tnys","Last", "\\n");
      gMamer.XServerCom("  %-18s %3s %4s %-8s%2s%-18s %3s %4s %-8s%s",
			"-----------------", "---", "----", "--------", "",
			"-----------------", "---", "----", "--------", "", "\\n");
      i=1;
      memset(date, '\0', 64);
As you can see, 'date' is defined as an array of 16 characters. But then memset was called on it, clearing 64 bytes! This exceeds the array boundaries, and apparently the memory layout in this compile was such that this overwrote the return address on the stack, causing the crash ('stack smashing detected').

I guess at one time mamer must have been developed on a machine where a character occupies 4 bytes. It is a bit weird to use memset here in the first place; normally one would write date[0] = '\0';.

The bug is fixed now, but there is no way to re-load mamer with the already-played games of the tournament. Also not through tricks, because it will not make the same pairings as have already been played, because ratings changed, and some of the rounds were already paired by hand. So we will have to continue the tournament with hand-pairing.

I set up a web page where I will update the standings 'live', i.e. as soon as a game finishes I will upload the result and new standings there, so people can use it as replacement for the "mam games N" and "mam who N" commands normally used to see pairings and standings. The page is at

http://hgm.nubati.net/ACCA.html
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by sje »

With respect to the FICS source, I am always suspicious of magic numbers (integer literals) which appear where a symbolically named constant value should appear instead.

Prior to the event start, I tried a few commands on the server and some did not work. Specifically, "rematch" and "resume" were not supported although these do work at FICS.
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by marcelk »

sje wrote:With respect to the FICS source, I am always suspicious of magic numbers (integer literals) which appear where a symbolically named constant value should appear instead.

Prior to the event start, I tried a few commands on the server and some did not work. Specifically, "rematch" and "resume" were not supported although these do work at FICS.
Those were added to FICS after it became closed-source.
User avatar
hgm
Posts: 28502
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by hgm »

Code: Select all

rk ID  name   col    opp    res   tot
 1 t Thinker  -bwwb  -lqhg  0111  3
 2 h Hannibal wbwbw  ragtc  1110  3
 3 c Crafty   wbwbb  pqagh  1===  2.5
 4 g Gaviota  wbbww  lrhct  110=  2.5
 5 a Arasan   bwbww  shcpq  10=1  2.5
 6 q RedQueen -wbwb  -ctsa  1=01  2.5
 7 p Telepath bwwbb  csrai  0110  2
 9 i Tinker   ---bw  ---lp  0001  1
10 s Symbolic wbwbb  aplqr  0010  1
11 r Parrot   bwb-w  hgp-s  0001  1
 8 l Plisk    bwbw-  gtsi-  00001      1


Round 5

Gaviota-Thinker 
Hannibal-Crafty 
Arasan-RedQueen 
Parrot-Symbolic 
Tinker-Telepath 
Plisk: BYE      1
User avatar
hgm
Posts: 28502
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by hgm »

Code: Select all

rk ID  name   col     opp     res   tot
 1 t Thinker  -bwwbw  -lqhga  01111  4
 2 h Hannibal wbwbwb  ragtcp  11101  4
 5 a Arasan   bwbwwb  shcpqt  10=11  3.5
 7 p Telepath bwwbbw  csraih  01101  3
 3 c Crafty   wbwbbw  pqaghs  1===0  2.5
 4 g Gaviota  wbbwwb  lrhctq  110=0  2.5
 6 q RedQueen -wbwbw  -ctsag  1=010  2.5
10 s Symbolic wbwbbb  aplqrc  00101  2
 9 i Tinker   ---bw-  ---lp-  00010  1
11 r Parrot   bwb-wb  hgp-sl  00010  1
 8 l Plisk    bwbw-w  gtsi-r  00001  1


Round 6

Thinker-Arasan    
RedQueen-Gaviota  
Telepath-Hannibal 
Crafty-Symbolic   
Plisk-Parrot      
Tinker: BYE
User avatar
hgm
Posts: 28502
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by hgm »

Code: Select all

rk ID  name   col     opp     res     tot  BH
 1 t Thinker  -bwwbw  -lqhga  011111  5
 2 h Hannibal wbwbwb  ragtcp  11101=  4.5
 5 a Arasan   bwbwwb  shcpqt  10=110  3.5  21
 3 c Crafty   wbwbbw  pqaghs  1===01  3.5  19.5
 4 g Gaviota  wbbwwb  lrhctq  110=01  3.5  18.5
 7 p Telepath bwwbbw  csraih  01101=  3.5  16.5
 6 q RedQueen -wbwbw  -ctsag  1=0100  2.5
10 s Symbolic wbwbbb  aplqrc  001010  2    
11 r Parrot   bwb-wb  hgp-sl  000101  2
 9 i Tinker   ---bw-  ---lp-  000100  1
 8 l Plisk    bwbw-w  gtsi-r  000010  1


Round 6

Thinker-Arasan    1-0
RedQueen-Gaviota  0-1 {time forfeit}
Telepath-Hannibal 1/2
Crafty-Symbolic   1-0
Plisk-Parrot      0-1
Tinker: BYE       0
CRoberson
Posts: 2096
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by CRoberson »

Congratulations to Thinker for winning the tournament and being the 2011 Pan American Computer Chess Champion!

Thanks to HGM for his efforts and allowing us to use his server. It was a successful event. Thanks to those that helped test his server prior to the event.

Thanks to the new Greater European Computer Chess organization for sharing their findings from the server. They held their tournament just hours before ours each day.

Thanks to all the participants: without you their wouldn't be a tournament.
User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 8:33 pm
Location: Antalya, Turkey

Re: 2011 6h Annual ACCA Pan American Computer Chess Champion

Post by beachknight »

Hi Charles,

I have collected the games published in tournaments section. I suppose
that there are missing ones. I have just checked the website: 2011
games (pgn) were not there. Are they available for download?

TIA,
hi, merhaba, hallo HT