For a limited time, two sources

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: For a limited time, two sources

Post by lucasart »

Evert wrote:
lucasart wrote: Stockfish is by far the best ratio ELO / lines of code the world has ever seen :D
I don't know, I suspect microMax has a strong claim there as well. Almost certainly better than Stockfish, since it's ELO/lines is actually larger than 1. :P
I probably wasn't precise enough. My fault:
- by lines of code, I mean *real* lines of code. writing obfuscated code to cheat the line count is just stupid (*).
- counting characters is even sillier (*). typically you can use 1 charater for each variable, not use any comments, spaces and tabs and put all your code on one line...

Also the ratio ELO/LOC shouldn't be thought of as linear. Typically it's easy to write a 2000 elo engine with 2000 LOC, but a lot harder to write a 3000 ELO engine with 3000 LOC. Once you remove all the ELO-useless code from Stockfish and convert it to K&R coding style (if only to not compare apples and oranges), it's less than 7000 lines, which is impressive for a world class engine like SF.

As for my engine, it's not too bad either, 2750 elo with that

Code: Select all

http://cloc.sourceforge.net v 1.56  T=0.5 s (46.0 files/s, 8664.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                             11            506            410           2645
C/C++ Header                    12            129            195            447
-------------------------------------------------------------------------------
SUM:                            23            635            605           3092
-------------------------------------------------------------------------------
(*)unless you do it for the fun like MicroMax, or to compete in an obfuscated C code contest
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: For a limited time, two sources

Post by sje »

sje wrote:I should mention that the myopic program was written as a demonstration of the Arduino development environment and is targeted towards the Arduino Mega platform. This platform uses an inexpensive AVR microcontroller with only eight MB RAM.
No, I meant to type "only eight KB of RAM".

I blame my errors on alcohol; I'm not drinking enough of it.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

And a third source

Post by sje »

And a third source, the current state of the Chess In Lisp project:

https://dl.dropbox.com/u/31633927/ChessInLisp.tar

You'll need a decent Common Lisp interpreter/compiler. I suggest Steel Bank Common Lisp (Debian/Ubuntu package "sbcl") or perhaps Carnegie Mellon Common Lisp ("cmucl").