writing my own c# chess engine I'm now trying to speed it up.
my program is written in c#, can't use any assembler optimization( pospolation count etc) , is 32bit, use bitboard, no magicbitboard, no hashtable, lookuptable for knight & king, shift for pawns.
on my 2 years old pc my perft function can run at 1.2 Mnodes/s
I need to define a target speed to reach
can you point me to engines with perft function I can test? i need some good engine that can be run without asm optimization and with has table disabled.
It doesn't need to be a c# program
thank you
search speed
Moderators: hgm, Rebel, chrisw
-
- Posts: 286
- Joined: Mon Mar 13, 2006 5:23 pm
- Location: Québec
Re: search speed
You could try Sharper it's an engine written in C#. It was used a couple years ago to compute the value of perft(11) from the start position.
Mathieu Pagé
mathieu@mathieupage.com
mathieu@mathieupage.com
-
- Posts: 161
- Joined: Thu Jan 08, 2009 9:06 pm
- Location: San Francisco, USA
Re: search speed
Hi,
Few things you want to be careful about when measuring your speed against other programs that can do perft are:
1) Are you making and unmaking leaf nodes too? Most of the programs do, since it makes sense, you really want to see the speed of make/unmake.
2) Are you using hashing/caching/transposition tables or anything that would stop you from actually making/unmaking ALL (legal) moves?
Regards,
Vlad.
Few things you want to be careful about when measuring your speed against other programs that can do perft are:
1) Are you making and unmaking leaf nodes too? Most of the programs do, since it makes sense, you really want to see the speed of make/unmake.
2) Are you using hashing/caching/transposition tables or anything that would stop you from actually making/unmaking ALL (legal) moves?
Regards,
Vlad.
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: search speed
1) i only make domove and don't do unmake, a game is an array of position so unmake move is somethink like "index--;"
2) my code doesn't have any kind of hashin/caching/transposition till now
sharper is a very very fast c++ cengine
2) my code doesn't have any kind of hashin/caching/transposition till now
sharper is a very very fast c++ cengine
-
- Posts: 1437
- Joined: Wed Apr 21, 2010 4:58 am
- Location: Australia
- Full name: Nguyen Hong Pham
Re: search speed
I guess that he means the method of implementation of perft, not only do/unmake. There are two ways, very little different in implementation but may give a difference on speed:elcabesa wrote:1) i only make domove and don't do unmake, a game is an array of position so unmake move is somethink like "index--;"
if (depth == 0) return 1;
n_moves = GenerateMoves(move_list);
vs
n_moves = GenerateMoves(move_list);
if (depth == 1) return n_moves;
Take a look at documentation: http://chessprogramming.wikispaces.com/Perft
2) my code doesn't have any kind of hashin/caching/transposition till now
sharper is a very very fast c++ cengine
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: search speed
it's a
program.
i know the other one is faster, but I think i implemented it this way to get a legal move generator.
Maybe it's possible to implement it the other way
Code: Select all
if(depth==0) return 1;
i know the other one is faster, but I think i implemented it this way to get a legal move generator.
Maybe it's possible to implement it the other way
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: search speed
I think it's the other way round. You can only do "return n_moves" after move generation at depth 1 if you have a fully legal move generator, while the "if (depth == 0) return 1" approach allows for a pseudo-legal move generator if you immediately unmake illegal moves.elcabesa wrote:it's aprogram.Code: Select all
if(depth==0) return 1;
i know the other one is faster, but I think i implemented it this way to get a legal move generator.
Maybe it's possible to implement it the other way
Sven