One step forward again

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
OliverUwira
Posts: 170
Joined: Mon Sep 13, 2010 9:57 am
Location: Frankfurt am Main

One step forward again

Post by OliverUwira »

Hello everybody,

it's been a long time since I've touched my engine, but recently I lay hands on Kurt again, and at least now I've got it to a point where it's giving me beating in blitz games.

It also beats the old version but still doesn't stand much of a chance against the engines shipped with Arena. My evaluation is still too thick...

Anyway I'll just post a link here for the curious amongst you all:

http://home.arcor.de/steve-o13/kurt/kurt_0_9_beta

Note that it still doesn't quite work under Arena 2.1 (and I don't really know why yet). Also there is something wrong with the repetition detection.

Credits go to the Stockfish team for the logarithmic reduction formula and to Mr Hyatt for the ultimate reference to look at if one wants to find out what's going pear-shaped in one's own implementation.

Here's also some encouragement to other authors of weaker engines:
I've found such a load of ridiculous bugs in my old implementation that it almost wasn't funny anymore (-:

For example:

Your move generator might well recognise en passant conditions correctly, but have you checked that the function translating e2e4 to the internal move structure does also? *d'oh*

Sign errors when shifting mate scores out of the hashtable, anyone? (-:

Legal check escapes should also be legal, otherwise there is no point...

Cheers everybody,
Oliver
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: One step forward again

Post by Dann Corbit »

your hask key needs initialization in CalculatePawnKey():

Code: Select all

hashkey CalculatePawnKey(Position *pos)
{
	int sqr;
	hashkey key={0};
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: One step forward again

Post by Dann Corbit »

64 bit binary, a few small tweaks, project files:
http://cap.connx.com/chess-engines/new- ... _9_beta.7z
User avatar
OliverUwira
Posts: 170
Joined: Mon Sep 13, 2010 9:57 am
Location: Frankfurt am Main

Re: One step forward again

Post by OliverUwira »

Geez,

your binary is almost twice as fast on my laptop as mine... well, I'm just using VC++ Express so I can't compile for 64 bits...

Or were your minor tweaks actually big tweaks?

Many thanks anyway, especially for pointing out yet another bug.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: One step forward again

Post by Dann Corbit »

OliverUwira wrote:Geez,

your binary is almost twice as fast on my laptop as mine... well, I'm just using VC++ Express so I can't compile for 64 bits...

Or were your minor tweaks actually big tweaks?
The source and project used for the build are included in the archive file.
I did not even make a PGO binary yet. I guess it will be 20% faster.
Most changes were probably irrelevant. You can use diff to find out what I changed (set to ignore whitespace because I reformatted the code so I can read it easier)
Many thanks anyway, especially for pointing out yet another bug.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: One step forward again

Post by Dann Corbit »

Dann Corbit wrote:
OliverUwira wrote:Geez,

your binary is almost twice as fast on my laptop as mine... well, I'm just using VC++ Express so I can't compile for 64 bits...

Or were your minor tweaks actually big tweaks?
The source and project used for the build are included in the archive file.
I did not even make a PGO binary yet. I guess it will be 20% faster.
Most changes were probably irrelevant. You can use diff to find out what I changed (set to ignore whitespace because I reformatted the code so I can read it easier)
Many thanks anyway, especially for pointing out yet another bug.
Same link:
http://cap.connx.com/chess-engines/new- ... _9_beta.7z
now has a PGO binary in it.
It's only about 4% faster.
User avatar
OliverUwira
Posts: 170
Joined: Mon Sep 13, 2010 9:57 am
Location: Frankfurt am Main

Re: One step forward again

Post by OliverUwira »

Dann Corbit wrote: Same link:
http://cap.connx.com/chess-engines/new- ... _9_beta.7z
now has a PGO binary in it.
It's only about 4% faster.
That's still incredibly faster than the original one. So mostly this should be because VC++ Express can't do 64 bits. Apparently most of this speedup should be the bitboard boost, yes?

This brings me to another question. Do you have a recommendation as to a free compiler I could use?
Volker Annuss
Posts: 180
Joined: Mon Sep 03, 2007 9:15 am

Re: One step forward again

Post by Volker Annuss »

You can use WPG System 64 or the Microsoft 64 bit compiler that comes with the Windows SDK from the command line.
User avatar
OliverUwira
Posts: 170
Joined: Mon Sep 13, 2010 9:57 am
Location: Frankfurt am Main

Re: One step forward again

Post by OliverUwira »

Thank you,

I'm going to keep this in mind for the future.

For now, I've found that I could get VS 2010 from my university (-: