It is official now: 2002 ELO with 1961 characters!

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

Moderators: hgm, Rebel, chrisw

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

It is official now: 2002 ELO with 1961 characters!

Post by hgm »

CCRL is the first to have added micro-Max 4.8 to its rating list. It is rated 2002 on the ELO scale.

The stand-alone version of uMax 4.8 (which plays the same moves as the tested version, but communicates them through its own interface, which is not Winboard compatible, and thus, for the purpose of automated testing, was replaced here by a much longer Winboard-protocol driver here) has a source code of 1961 characters (not counting all non-essential blanks and comments). 8-)
Spock

Re: It is official now: 2002 ELO with 1961 characters!

Post by Spock »

It is our goal that every engine in our list should eventually have a minimum of 200 games, so more games will be played.

MicroMax has 1961 characters of code. As a comparison - how does this compare to say Crafty, Glaurung ? These are open source so the information is available. Interesting also to see the figures for some of top commercials like Zap, Rybka, Hiarcs, although only their programmers could tell us that... and they probably wouldn't
User avatar
Daniel Mehrmann
Posts: 858
Joined: Wed Mar 08, 2006 9:24 pm
Location: Germany
Full name: Daniel Mehrmann

Re: It is official now: 2002 ELO with 1961 characters!

Post by Daniel Mehrmann »

Hi Harm !

Congratulations :)

And now go on and crush Rybka at WCCC'07 and your rating gets a new record. 8-)

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

Re: It is official now: 2002 ELO with 1961 characters!

Post by hgm »

For Glaurung I made the following count:

Code: Select all

book.cpp:     2765 non-blank characters, 130 lines
data.cpp:      341 non-blank characters, 12 lines
endgame.cpp: 14990 non-blank characters, 475 lines
eval.cpp:    27091 non-blank characters, 867 lines
extend.cpp:    782 non-blank characters, 22 lines
glaurung.h:  21931 non-blank characters, 726 lines
init.cpp:     1378 non-blank characters, 66 lines
io.cpp:       7659 non-blank characters, 312 lines
learn.cpp:    1940 non-blank characters, 81 lines
main.cpp:      251 non-blank characters, 12 lines
mersenne.cpp: 1673 non-blank characters, 148 lines
move.cpp:     8382 non-blank characters, 278 lines
movegen.cpp: 14661 non-blank characters, 483 lines
order.cpp:    2153 non-blank characters, 78 lines
position.cpp: 5492 non-blank characters, 202 lines
psq.cpp:      3596 non-blank characters, 83 lines
pstruct.cpp: 10795 non-blank characters, 384 lines
root.cpp:     9835 non-blank characters, 326 lines
safety.cpp:   9021 non-blank characters, 320 lines
search.cpp:  22861 non-blank characters, 737 lines
see.cpp:      6932 non-blank characters, 212 lines
smp.cpp:      8199 non-blank characters, 261 lines
strcase.cpp:  2044 non-blank characters, 119 lines
think.cpp:    5841 non-blank characters, 162 lines
timeoday.cpp:  320 non-blank characters, 27 lines
tt.cpp:       2449 non-blank characters, 113 lines
uci.cpp:      3982 non-blank characters, 148 lines
ucioption.cpp:5848 non-blank characters, 173 lines
zobrist.cpp:   962 non-blank characters, 35 lines
TOTAL      204,174                       6992 lines
So it seems about a factor 100 larger than micro-Max.

This is highly unfair, though, as the utility I use for character counting only discounts comments, leading and trailing spaces, tabs etc., and counts repeated spaces, tabs, etc. as a single character.

The Glaurung source, however, uses also non-essential blanks for layout purposes inside lines, e.g. around operators:

Code: Select all

if(a + b > 10) ... 
My counting utility does count those, as in the uMax source internal spaces are only used if the are essential, e.g. in

Code: Select all

goto C;
return m;
and the like.

I guess it would be fairer not to count spaces at all, in this case.
Last edited by hgm on Mon Jun 04, 2007 3:02 pm, edited 2 times in total.
Tony

Re: It is official now: 2002 ELO with 1961 characters!

Post by Tony »

hgm wrote:CCRL is the first to have added micro-Max 4.8 to its rating list. It is rated 2002 on the ELO scale.

The stand-alone version of uMax 4.8 (which plays the same moves as the tested version, but communicates them through its own interface, which is not Winboard compatible, and thus, for the purpose of automated testing, was replaced here by a much longer Winboard-protocol driver here) has a source code of 1961 characters (not counting all non-essential blanks and comments). 8-)
Congratulations !!

Now for the future plans, it's pretty simple.

1st: Keep the rate elo/characters constant
2nd: Increase codesize to 4000 characters.

:)

Tony
nczempin

Re: It is official now: 2002 ELO with 1961 characters!

Post by nczempin »

hgm wrote:CCRL is the first to have added micro-Max 4.8 to its rating list. It is rated 2002 on the ELO scale.

The stand-alone version of uMax 4.8 (which plays the same moves as the tested version, but communicates them through its own interface, which is not Winboard compatible, and thus, for the purpose of automated testing, was replaced here by a much longer Winboard-protocol driver here) has a source code of 1961 characters (not counting all non-essential blanks and comments). 8-)
how big is the executable?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: It is official now: 2002 ELO with 1961 characters!

Post by hgm »

The executable is 7680 bytes, (stripped), but a program that is merely printing "hello" is already 3072 bytes. So about 3KB is lost on (most-likely unused) C library functions.

Furthermore, the compilation (gcc -O2) was optimized for speed, not for code size. Gcc is usually quite liberal in padding code with NOP instructions for aligning branch targets.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: It is official now: 2002 ELO with 1961 characters!

Post by Tord Romstad »

hgm wrote:For Glaurung I made the following count:

Code: Select all

book.cpp:     2765 non-blank characters, 130 lines
data.cpp:      341 non-blank characters, 12 lines
endgame.cpp: 14990 non-blank characters, 475 lines
eval.cpp:    27091 non-blank characters, 867 lines
extend.cpp:    782 non-blank characters, 22 lines
glaurung.h:  21931 non-blank characters, 726 lines
init.cpp:     1378 non-blank characters, 66 lines
io.cpp:       7659 non-blank characters, 312 lines
learn.cpp:    1940 non-blank characters, 81 lines
main.cpp:      251 non-blank characters, 12 lines
mersenne.cpp: 1673 non-blank characters, 148 lines
move.cpp:     8382 non-blank characters, 278 lines
movegen.cpp: 14661 non-blank characters, 483 lines
order.cpp:    2153 non-blank characters, 78 lines
position.cpp: 5492 non-blank characters, 202 lines
psq.cpp:      3596 non-blank characters, 83 lines
pstruct.cpp: 10795 non-blank characters, 384 lines
root.cpp:     9835 non-blank characters, 326 lines
safety.cpp:   9021 non-blank characters, 320 lines
search.cpp:  22861 non-blank characters, 737 lines
see.cpp:      6932 non-blank characters, 212 lines
smp.cpp:      8199 non-blank characters, 261 lines
strcase.cpp:  2044 non-blank characters, 119 lines
think.cpp:    5841 non-blank characters, 162 lines
timeoday.cpp:  320 non-blank characters, 27 lines
tt.cpp:       2449 non-blank characters, 113 lines
uci.cpp:      3982 non-blank characters, 148 lines
ucioption.cpp:5848 non-blank characters, 173 lines
zobrist.cpp:   962 non-blank characters, 35 lines
TOTAL      204,174                       6992 lines
So it seems about a factor 100 larger than micro-Max.

This is highly unfair, though, as the utility I use for character counting only discounts comments, leading and trailing spaces, tabs etc., and counts repeated spaces, tabs, etc. as a single character.
Furthermore, if I wanted to optimize for the number of characters of code, I would have used much shorter and more cryptic identifier names. :)

With a little effort, it should be easy to squeeze down the size of the source code to less than 100,000 characters, perhaps even down to 50,000. Of course, this is still a lot more than your amazing micro-Max.

Glaurung 2 currently weighs in at 15,920 lines and 492,345 characters, and it is not even close to finished yet. :(

Tord
User avatar
Mike S.
Posts: 1480
Joined: Thu Mar 09, 2006 5:33 am

Re: It is official now: 2002 ELO with 1961 characters!

Post by Mike S. »

Congratulations and thanks for this astonishing engine. I am fascinated how much can be put in so few lines of code. The chess rules, search, many advanced techniques, evaluation, I/O... I am no programmer and cannot understand the C source though. That is why I wanted to ask, what evaluation terms does Micro-Max 4.8 use? I would be interested in a complete overview, but for the general audience :roll:

I tried it myself (in blitz games) and I saw that it quickly reaches 10+ plies of depth, but also I didn't spot any appearant weaknesses in it's positional play. Although I am not a very strong player... but I would certainly notice if it regularly misplaces pieces etc. That is not the case.

From ~30 test games, only once I got a winning position being a rook up against some passers, but I couldn't continue precise enough to turn it into a win. So I lost all games. That's why I'm happy to see that it is 2000+ Elo and not less. :mrgreen:


P.S. After release of 4.8, I have forwarded the info to the german computer chess fans:
http://f23.parsimony.net/forum50826/messages/166426.htm
Regards, Mike
User avatar
Graham Banks
Posts: 41423
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: It is official now: 2002 ELO with 1961 characters!

Post by Graham Banks »

Mike S. wrote: I tried it myself (in blitz games) and I saw that it quickly reaches 10+ plies of depth, but also I didn't spot any appearant weaknesses in it's positional play
I've been observing some of its games and it's certainly a solid little engine as you say.
A very impressive effort indeed! 8-)

Regards, Graham.