Stockfish 1.0

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

Moderators: hgm, Rebel, chrisw

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.0

Post by mcostalba »

Jim Ablett wrote:
Hi Marco,

Some Windows p.g.o compiles, x64 & 32 bit.

Image
StockFish 1.0 by Marco Costalba

http://www.mediafire.com/?jglej2ytyj3

Jim.
Thanks Jim, very much appreciated !!!

Thanks
Marco
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.0

Post by mcostalba »

swami wrote:How much stronger is it relative to Glaurung from your tests?

Thanks Jim and Marco.
Enough :D

I really would like Stockfish to be tested by independent sources. It would be great if can be added to tournments gauntlets!

I would prefer not to disclose ELO gain above Glaurung (and other engines) until is not confirmed by independent sources.

I am quite confident is stronger, but independent testing it seems to me the only correct metodology to state the strenght of an engine, so any information on this I can post is only noise.

Thanks
Marco
swami
Posts: 6640
Joined: Thu Mar 09, 2006 4:21 am

Re: Stockfish 1.0

Post by swami »

mcostalba wrote:
swami wrote:How much stronger is it relative to Glaurung from your tests?

Thanks Jim and Marco.
Enough :D

I really would like Stockfish to be tested by independent sources. It would be great if can be added to tournments gauntlets!

I would prefer not to disclose ELO gain above Glaurung (and other engines) until is not confirmed by independent sources.

I am quite confident is stronger, but independent testing it seems to me the only correct metodology to state the strenght of an engine, so any information on this I can post is only noise.

Thanks
Marco


Ofcourse, You're right, Marco. That's the plausible explanation one could give. I was curious about it that's why I asked! :wink:

I will add it to gauntlet tournament to see the progress, I'll let you know about it in a week.
User avatar
AdminX
Posts: 6340
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Stockfish 1.0

Post by AdminX »

Hello Marco,

Thanks for your work on Stockfish. I am currently running a test match (30 Games at a 25 minute time control) with it against Bright. Both engines are using Rybka 3 book. The computer is a Q6700. Both engines have a hash of 1024, and are only using two cores with ponder on. Here are the results so far:

+2 =13 +2

So far I would say the results look very good. :wink: By the way I am only using the default settings of the 64-bit version.
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.0

Post by mcostalba »

AdminX wrote:Hello Marco,

Thanks for your work on Stockfish. I am currently running a test match (30 Games at a 25 minute time control) with it against Bright. Both engines are using Rybka 3 book. The computer is a Q6700. Both engines have a hash of 1024, and are only using two cores with ponder on. Here are the results so far:

+2 =13 +2

So far I would say the results look very good. :wink: By the way I am only using the default settings of the 64-bit version.
Hi Ted,

your test is very valuable.

As a developer the normal time I use is much shorter. It happens that for every patch that goes in there are at least 5-10 that do not show a clear improvment and are discarded. So to have a statistically reasonable number of matches for each patch I, as I think others, end up using a blitz time tournment that runs overnight.

It is rare to have the possibility to test with longer times.


Another novelity for me is the 64bit machine: I have a 32bit and some of the most important improvments are targetted to 32bits, so testing on 64bits is very sensible, at least to define a "bottom level" for Stockfish.

Thanks
Marco
royb
Posts: 536
Joined: Thu Mar 09, 2006 12:53 am

Re: Stockfish 1.0

Post by royb »

Marco,

I found the CXX flags and commented them out. Now I get this when I try the make:

roy@roy-laptop:~/chess/sf_1.0/src$ make
g++ -DNDEBUG -Wall -g -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing -c -o bitboard.o bitboard.cpp
In file included from direction.h:28,
from bitboard.h:66,
from bitboard.cpp:37:
square.h: In function ‘int file_distance(File, File)’:
square.h:142: error: ‘abs’ was not declared in this scope
square.h: In function ‘int rank_distance(Rank, Rank)’:
square.h:150: error: ‘abs’ was not declared in this scope
bitboard.cpp: In function ‘void<unnamed>::init_ray_bitboards()’:
bitboard.cpp:451: warning: suggest parentheses around + or - in operand of &
bitboard.cpp: In function ‘void<unnamed>::init_attacks()’:
bitboard.cpp:476: error: ‘abs’ was not declared in this scope
make: *** [bitboard.o] Error 1
roy@roy-laptop:~/chess/sf_1.0/src$

Additional tips are appreciated!

Roy
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.0

Post by mcostalba »

royb wrote:Marco,

I found the CXX flags and commented them out. Now I get this when I try the make:

roy@roy-laptop:~/chess/sf_1.0/src$ make
g++ -DNDEBUG -Wall -g -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing -c -o bitboard.o bitboard.cpp
In file included from direction.h:28,
from bitboard.h:66,
from bitboard.cpp:37:
square.h: In function ‘int file_distance(File, File)’:
square.h:142: error: ‘abs’ was not declared in this scope
square.h: In function ‘int rank_distance(Rank, Rank)’:
square.h:150: error: ‘abs’ was not declared in this scope
bitboard.cpp: In function ‘void<unnamed>::init_ray_bitboards()’:
bitboard.cpp:451: warning: suggest parentheses around + or - in operand of &
bitboard.cpp: In function ‘void<unnamed>::init_attacks()’:
bitboard.cpp:476: error: ‘abs’ was not declared in this scope
make: *** [bitboard.o] Error 1
roy@roy-laptop:~/chess/sf_1.0/src$

Additional tips are appreciated!

Roy
Here the error is:

square.h:142: error: ‘abs’ was not declared in this scope

(in several places)

This is strange because abs (see http://www.cplusplus.com/reference/clib ... b/abs.html) should be in standard library.

Anyhow, please try to explictly add

#include <stdlib.h>

at the beginning of square.h

Better yet

#include <stdlib>

It should work. Otherwise it means there is something with your libraries setup.

Please report back if this fixes the compile for you.

Thanks
Marco
royb
Posts: 536
Joined: Thu Mar 09, 2006 12:53 am

Re: Stockfish 1.0

Post by royb »

We are getting farther each time. Now I see this (after adding #include <stdlib.h> to the beginning of file square.h:

roy@roy-laptop:~/chess/sf_1.0/src$ make
g++ -DNDEBUG -Wall -g -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing -c -o pawns.o pawns.cpp
pawns.cpp: In member function ‘void PawnInfoTable::clear()’:
pawns.cpp:165: error: ‘memset’ was not declared in this scope
make: *** [pawns.o] Error 1
roy@roy-laptop:~/chess/sf_1.0/src$

I hope this exercise will help you iron out kinks in compiling on Linux. In the meantime, I've downloaded the Windows .exe's that were posted to this forum and they work fine under Wine.

Regards,

Roy
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Stockfish 1.0

Post by Tord Romstad »

Hello Marco,

I am very happy to see this project, and I wish you good luck with it! This is how free software is meant to be used.

I tried to compile and run your program on my Mac, and it crashed after a few seconds. I was quickly able to identify the bug. Even if it does not crash the program on your computer, it will certainly have a negative impact on the performance, so it should definitely be fixed. The bug is in the TranspositionTable::retrieve function:

Code: Select all

/// TranspositionTable&#58;&#58;retrieve looks up the current position in the
/// transposition table. Returns a pointer to the TTEntry or NULL
/// if position is not found.

const TTEntry* TranspositionTable&#58;&#58;retrieve&#40;const Position &pos&#41; const &#123;

  TTEntry *tte = first_entry&#40;pos&#41;;

  for &#40;int i = 0; i < 4; i++)
  &#123;
      tte += i;
      if &#40;tte->key&#40;) == pos.get_key&#40;))
          return tte;
  &#125;
  return NULL;
&#125;
You clearly mean to iterate over the four first transposition table entries beginning with first_entry(pos), but that's not what the above code does: Notice that you add 'i' to 'tte' once in every iteration, which is wrong, and means that you will try to access memory beyond the end of the transposition table in the case that first_entry(pos) happens to point to the last cluster in the table. What you meant to write is probably something like this (untested, but should work):

Code: Select all

const TTEntry* TranspositionTable&#58;&#58;retrieve&#40;const Position &pos&#41; const &#123;

  TTEntry *first = first_entry&#40;pos&#41;, *tte;

  for &#40;int i = 0; i < 4; i++)
  &#123;
      tte = first + i;
      if &#40;tte->key&#40;) == pos.get_key&#40;))
          return tte;
  &#125;
  return NULL;
&#125;
The name "Stockfish" is great!

During my summer holiday this year, I spent a three very interesting days in the stormy and isolated archipelago of Røst in Northern Norway, outside the Lofoten islands. Røst is a very tiny island community, with just about 600 inhabitants (separated from continental Norway by a 4 hour ferry trip, with only one ferry per day), most of whom make their living from stockfish. During the trip, I learnt a lot about the history of the stockfish trade between Norway and Italy. In particular, the story of Pietro Querini, the Venetian merchant and nobleman who stranded on Røst after a storm in the winter of 1432 (while on his way from Crete to Flandern -- it must have been a terrible storm!) is told by everyone in Røst, and even the local pub is named after him. :)

According to the local traditions, the export of stockfish to Italy dates back to the 15th century, and started as a direct result of the contacts established by Querini.

Tord
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Stockfish 1.0

Post by Tord Romstad »

mcostalba wrote:Anyhow, please try to explictly add

#include <stdlib.h>

at the beginning of square.h

Better yet

#include <stdlib>
Actually, I think the most correct form in C++ is:

Code: Select all

#include <cstdlib>
Tord