Starting over again

Discussion of chess software programming and technical issues.

Moderator: Ras

adieguez

Re: Starting over again

Post by adieguez »

Hi, that's 53% faster the 64 bit binary, looks fine.

am sorry about my ignorance, but a program which does not use bitboards or 64 bits integers, when being compiled for 64 bits gets still faster in a 64 bits environment(how much?), or just equal?

And would you expect any improvement in speed for a program which only use bitboards for pawns and another for rays checking and nothing else?
Dann Corbit wrote:I get 690K NPS with your binary,
I get 760K NPS with my 32 bit binary,
and I get 1.17M NPS with my 64 bit binary.

Here is the version I was fiddling with (compressed with 7-zip):
http://cap.connx.com/chess-engines/new-approach/kurt.7z

I doubled the size of your eval hash, though it does not seem to make a large difference.

#define EC_SIZE 524288
#define EC_MASK 524287
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Starting over again

Post by Dann Corbit »

adieguez wrote:Hi, that's 53% faster the 64 bit binary, looks fine.

am sorry about my ignorance, but a program which does not use bitboards or 64 bits integers, when being compiled for 64 bits gets still faster in a 64 bits environment(how much?), or just equal?
A little bit faster, if any. It is bitboard programs that get the giant benefit.
And would you expect any improvement in speed for a program which only use bitboards for pawns and another for rays checking and nothing else?
Some benefit. It would depend on how much time the program spends doing that. Now that we have 64 bit operating systems and 64 bit compilers, all the guys who chose bitboards are reaping the benefits.
For other programs (e.g. 0x88) you can still get some benefits like bigger hash tables.
Dann Corbit wrote:I get 690K NPS with your binary,
I get 760K NPS with my 32 bit binary,
and I get 1.17M NPS with my 64 bit binary.

Here is the version I was fiddling with (compressed with 7-zip):
http://cap.connx.com/chess-engines/new-approach/kurt.7z

I doubled the size of your eval hash, though it does not seem to make a large difference.

#define EC_SIZE 524288
#define EC_MASK 524287
OliverUwira

Re: Starting over again

Post by OliverUwira »

Dann Corbit wrote:I get 690K NPS with your binary,
I get 760K NPS with my 32 bit binary,
and I get 1.17M NPS with my 64 bit binary.

Here is the version I was fiddling with (compressed with 7-zip):
http://cap.connx.com/chess-engines/new-approach/kurt.7z

I doubled the size of your eval hash, though it does not seem to make a large difference.

#define EC_SIZE 524288
#define EC_MASK 524287
Seems like I really need to learn about compiling, too.

Concerning the eval cache, I thought, that a smaller size might be ok if I manage to get a lot of cutoffs... I've never tested it thouroughly, though.

What do you all think about the GetPinnedPieces, which is also used very often, in Eval as well as in move generation - this should be a bottleneck, too, I guess.
adieguez wrote:Hi, that's 53% faster the 64 bit binary, looks fine.

am sorry about my ignorance, but a program which does not use bitboards or 64 bits integers, when being compiled for 64 bits gets still faster in a 64 bits environment(how much?), or just equal?

And would you expect any improvement in speed for a program which only use bitboards for pawns and another for rays checking and nothing else?
I've decided on a bitboard engine, gambling on the fact that I would once have a 64 bit box.... now I technically have one, but it came with the 32bit version of Vista only...
adieguez

Re: Starting over again

Post by adieguez »

Dann Corbit wrote:
adieguez wrote:Hi, that's 53% faster the 64 bit binary, looks fine.

am sorry about my ignorance, but a program which does not use bitboards or 64 bits integers, when being compiled for 64 bits gets still faster in a 64 bits environment(how much?), or just equal?
A little bit faster, if any. It is bitboard programs that get the giant benefit.
And would you expect any improvement in speed for a program which only use bitboards for pawns and another for rays checking and nothing else?
Some benefit. It would depend on how much time the program spends doing that. Now that we have 64 bit operating systems and 64 bit compilers, all the guys who chose bitboards are reaping the benefits.
For other programs (e.g. 0x88) you can still get some benefits like bigger hash tables.

Aaaah ok I didn't know about the hashtable, I understand the entries don't step by 4 bytes anymore. Anyway, I think I will hardly ever be really bitboardy, don't like much. I get the feeling I will feel even much worse than when I write <<1 or >>2 for example. Later I don't want to touch it and try * 3 instead of <<1 just because it is infinitesimaly slower. With bitboards will be worse, let say I want to change something it could be too much aditional work instead of changing it right away.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Starting over again

Post by Dann Corbit »

After you fool around with bitboards for a while, you will fall in love with them. Soon you will find yourself thinking in bitboards.

Things like shift by 9/7 for pawn attacks with every pawn at once will fill your heart with joy. (The 8 advances them one row and one more or one less will point at the squares right and left of the space directly ahead).

Look at the lovely compactness of Olithink. The beauty is almost arcane.
User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 12:00 pm
Location: Slovakia, EU

Re: Starting over again

Post by rvida »

Dann Corbit wrote:After you fool around with bitboards for a while, you will fall in love with them. Soon you will find yourself thinking in bitboards.
That is very true. Bitboards are so natural way of thinking for me, I will never look back to 0x88. Move generation was fine, but doing all the ray-scanning and looping in eval drove me nuts at times. I didnt even bother fixing bugs in Pascal sources which I found during the process of porting Critter to C (and bitboards).
adieguez

Re: Starting over again

Post by adieguez »

Am a lost case, you won't convince me :) I declare myself a nonbitboarder from now on.
Dann Corbit wrote:After you fool around with bitboards for a while, you will fall in love with them. Soon you will find yourself thinking in bitboards.

Things like shift by 9/7 for pawn attacks with every pawn at once will fill your heart with joy. (The 8 advances them one row and one more or one less will point at the squares right and left of the space directly ahead).

Look at the lovely compactness of Olithink. The beauty is almost arcane.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Starting over again

Post by Dann Corbit »

adieguez wrote:Am a lost case, you won't convince me :) I declare myself a nonbitboarder from now on.
Dann Corbit wrote:After you fool around with bitboards for a while, you will fall in love with them. Soon you will find yourself thinking in bitboards.

Things like shift by 9/7 for pawn attacks with every pawn at once will fill your heart with joy. (The 8 advances them one row and one more or one less will point at the squares right and left of the space directly ahead).

Look at the lovely compactness of Olithink. The beauty is almost arcane.
You have no idea of the power of the dark side.
After all, it is only black that can mate in 2.
OliverUwira

Re: Starting over again

Post by OliverUwira »

As far as I can see, the bitboards are the only things that really work in my engine )-:

Compared to three years ago, I now have a second machine to run longer tests and I'm sure an engine isn't supposed to show Mate in 0 or Mate in 116.. hash table debugging is going to be the next task.