| View previous topic :: View next topic |
| Author |
Message |
Lucas Braesch

Joined: 31 May 2010 Posts: 1730
|
Post subject: Re: Project help required: Bitboard Fruit 2.1 Posted: Fri May 11, 2012 11:26 am |
|
|
| ZirconiumX wrote: |
It would appear that I have buggered the quiet piece move generator, so that only pawn quiet moves, captures and promotions are generated.
But I practically followed DC's implementation to the letter:
|
Here is the protocol I follow, to give you an idea:
1. non functional modification
1.1. move generation or board playing code, low level bitboard machinery and the likes. run a perft verification on the following positions
http://chessprogramming.wikispaces.com/Perft+Results
all the way to the last depth indicated in the page and all positions. the slightest difference indicates a bug, and must be fixed before attempting anything else. You can use DC to help you debug your perft problems. Let's say for eg that your perft(3) is wrong in the start position, then run DC as follows:
| Code: |
lucas@lucas-desktop:~/Chess/Engines$ ./doublecheck_3.4.1
uci
id name DoubleCheck 3.4
id author Lucas Braesch
option name Hash type spin default 32 min 1 max 8192
option name Verbose type check default true
uciok
ucinewgame
position startpos
perft 3
Nb1a3 400
Nb1c3 440
Ng1f3 440
Ng1h3 400
a2a3 380
b2b3 420
c2c3 420
d2d3 539
e2e3 599
f2f3 380
g2g3 420
h2h3 380
a2a4 420
b2b4 421
c2c4 441
d2d4 560
e2e4 600
f2f4 401
g2g4 421
h2h4 420
time(ms) = 0
perft(3) = 8902
|
DC displays perft(N) but also all the root moves with their perft(N-1). If you code the same funtion you can compare line by line and debug recusrively. For eg after c2c4 you have sth different to 441, then repeat the operation on a perft(2) in the fen reached after c2c4 etc. Finding bugs this way is very quick and painless, so this should help you a lot and it's worth writing a proper perft function that displays the perft(N-1).
1.2 other non functional modification
run a ./DC bench and compare the nodes. The time also validates alleged speed improvements. Always use a profiler to guide you before doing useless optimizations that mess up your code for no good reason.
2. other modifications
The mere fact that your modification reaches fater depth 13 in the start position or whatever doesn't mean anything. Even the fact that it scores better in tactical EPD test suites, isn't relevant either (although a version that scores better in thpose and the same in self play should be preferred).
The only way is self testing with lots of games. Typically I run 1000 very fast games. Often the modification preserves the speed in NPS (as verified by the ./DC bench) and so I can run these 1000 games in a fixed node limit (typically 50000 or 100000 nodes).
To summarize:
* write a ./FruitFly bench similar to SF's benchmark function
* write a proper perft function like DC
* follow the protocol to the letter.
I know it sounds painful and tedious, but it's the only way forward, and the time you take doing that now will be reimbursed hundred folds, you'll see.
PS: Also put assert at the entry point of every function to validate the correctness of its arguments, and embed into such assert-checked functions even the most trivial operations |
|
| Back to top |
|
 |
|
| Subject |
Author |
Date/Time |
Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Tue May 08, 2012 3:20 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Tue May 08, 2012 3:31 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Tue May 08, 2012 5:06 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Ronald de Man |
Tue May 08, 2012 6:43 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Evert Glebbeek |
Tue May 08, 2012 8:34 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Tue May 08, 2012 8:41 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Tue May 08, 2012 8:43 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Tue May 08, 2012 10:09 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Ronald de Man |
Tue May 08, 2012 10:15 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Tue May 08, 2012 10:21 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Ronald de Man |
Tue May 08, 2012 10:59 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Wed May 09, 2012 11:33 am |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Sun May 13, 2012 5:11 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sun May 13, 2012 10:13 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Mon May 14, 2012 2:17 am |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Mon May 14, 2012 10:19 am |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Mon May 14, 2012 10:53 am |
Re: Project help required: Bitboard Fruit 2.1 |
Mincho Georgiev |
Mon May 14, 2012 12:19 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Mon May 14, 2012 12:28 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Mon May 14, 2012 3:10 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Mon May 14, 2012 4:25 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Mon May 14, 2012 4:34 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Mon May 14, 2012 4:46 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Mon May 14, 2012 5:05 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Mon May 14, 2012 8:51 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Mon May 14, 2012 10:43 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Tue May 15, 2012 5:41 am |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Tue May 15, 2012 2:45 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Tue May 15, 2012 4:04 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Evert Glebbeek |
Tue May 15, 2012 4:41 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Mon May 14, 2012 10:41 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Mincho Georgiev |
Mon May 14, 2012 6:22 am |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Sun May 13, 2012 5:09 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Ronald de Man |
Tue May 08, 2012 10:11 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Tue May 08, 2012 10:18 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Robert Hyatt |
Sun May 13, 2012 5:14 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Sun May 13, 2012 6:35 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Sun May 13, 2012 8:24 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sun May 13, 2012 10:22 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Mon May 14, 2012 6:56 am |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sun May 13, 2012 10:18 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Tue May 08, 2012 4:12 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Lucas Braesch |
Wed May 09, 2012 5:01 am |
Re: Project help required: Bitboard Fruit 2.1 |
Lucas Braesch |
Wed May 09, 2012 5:13 am |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Wed May 09, 2012 11:35 am |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Wed May 09, 2012 2:50 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Wed May 09, 2012 2:57 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Wed May 09, 2012 3:27 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Thu May 10, 2012 1:32 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Thu May 10, 2012 2:47 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Thu May 10, 2012 3:11 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Thu May 10, 2012 3:14 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Thu May 10, 2012 11:06 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Fri May 11, 2012 10:14 am |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Fri May 11, 2012 10:28 am |
Re: Project help required: Bitboard Fruit 2.1 |
Lucas Braesch |
Fri May 11, 2012 11:26 am |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sat May 12, 2012 2:06 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Sat May 12, 2012 3:54 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Evert Glebbeek |
Sat May 12, 2012 4:20 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Sat May 12, 2012 5:00 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Sat May 12, 2012 5:15 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sat May 12, 2012 5:32 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sat May 12, 2012 8:54 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Sven Schüle |
Sat May 12, 2012 5:21 pm |
Re: Project help required: Bitboard Fruit 2.1 |
H.G.Muller |
Thu May 10, 2012 3:25 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Matthew R. Brades |
Thu May 10, 2012 3:06 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Ronald de Man |
Thu May 10, 2012 6:42 pm |
Re: Project help required: Bitboard Fruit 2.1 |
Lucas Braesch |
Thu May 10, 2012 10:51 am |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|