Sac of the day

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

Moderator: Ras

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

Re: Sac of the day

Post by Tord Romstad »

Eelco de Groot wrote:

Code: Select all

inline Value PawnInfo::eg_value() const { // EdG: was Value(mgValue)?
  return Value(egValue);
Thanks, Eelco!

This is indeed a clear bug, and I had not noticed it myself before now.

Tord
User avatar
Eelco de Groot
Posts: 4697
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Sac of the day

Post by Eelco de Groot »

Hello Tord, I just tried to compile the sources of Glaurung 2.1 with some altered code but am running into a few errors, I was wondering if this could be a minor bug in types.h or have I not looked in the right place yet?

Code: Select all

#else

typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16;
typedef unsigned __int16 int16_t;
typedef __int32 int32;
typedef unsigned __int32 uint32_t;
typedef __int64 int64;
typedef unsigned __int64 uint64_t;
Should the unsigned 16 bit typedef not be uint16_t?

When compiling the slightly altered source I get a compiler error in search.h here:

Code: Select all

////
//// Prototypes
////

extern void init_threads();
extern void stop_threads();
extern void think(const Position &pos, bool infinite, bool ponder, int time,
                  int increment, int movesToGo, int maxDepth, int maxNodes,
                  int maxTime, Move searchMoves[]);
extern int64_t nodes_searched();
The error messages, apologizing for mentioning inferior programnames here:

c:\documents and settings\e. de groot\mijn documenten\rybka\ancalagon_1\sources_1\src\search.h(86) : error C2146: syntax error : missing ';' before identifier 'nodes_searched'
c:\documents and settings\e. de groot\mijn documenten\rybka\ancalagon_1\sources_1\src\search.h(86) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\e. de groot\mijn documenten\rybka\ancalagon_1\sources_1\src\search.h(86) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

It seems the compiler does not recognize int64_t? I have not yet looked at all the ocurrences in the source of int64_t but I suspect at the moment I should input uint64_t For a nodecounter it makes sense not to expect negative numbers?

I'll try again, I believe I got similar errors from Microsoft C++ in book.h but have not gotten as far as examing those at the moment.


Regards, Eelco
User avatar
Eelco de Groot
Posts: 4697
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Sac of the day

Post by Eelco de Groot »

I should input uint64_t For a nodecounter it makes sense not to expect negative numbers
The 080422 sources use int64 signed integers for all the nodecounters so I'll try to follow that, and change typedefs to only use *_t endings for all the unsigned integers. One of the 8 bit typedefs,

Code: Select all

 int8_t
, the signed 8 bit, should be changed also to int8 but only uint8_t is used in the sources as far as I can see.

Eelco

I changed the types.h definitions to:

Code: Select all

#else

typedef __int8 int8;
typedef unsigned __int8 uint8_t;
typedef __int16 int16;
typedef unsigned __int16 uint16_t;
typedef __int32 int32;
typedef unsigned __int32 uint32_t;
typedef __int64 int64;
typedef unsigned __int64 uint64_t;

#endif // !defined(_MSC_VER)