Move Generator, test it till where?

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Move Generator, test it till where?

Post by Luis Babboni »

Hi,

I´m trying to do a chess engine, Soberango.
Actually seems I just did the moves generator.
I said "seems" cause I´m still testing it looking for bugs.
I´m using perft results from here:
https://chessprogramming.wikispaces.com/Perft+Results
Actually I aproved this:
Initial position: till ply 7.
Kiwipete: completed.
Position 3: completed.
Position 4: completed.
Position 5: completed.
Position 6: till ply 5.

To where do you suggest to continue?
From initial position, ply 13 means for my engine (have an speed of about 1,000,000 moves per second) more than 62,000 years!! :-D

Thanks.
elcabesa
Posts: 858
Joined: Sun May 23, 2010 1:32 pm

Re: Move Generator, test it till where?

Post by elcabesa »

I used this tecnique to debug my movegen as soon as I ended with the position on the wiki.

playing random games I create a set of near 7000 positions.
then I calculate the perft value up to 6 for every position using an engine I think it souhld be bug free, I used stockfish.
finally I compared my perft resutl with the ones of stockfish.
when all the 7000 position gave me the right perft I was reasonably secure that my movegen was probably bug free.

if you like I still have the script for generating the 7000 position with Stockfish and probably with your engine too.
I lack the script to compare the 2 result. I remembered that I hacked my engineand/or stockfish so they give me the the result in the same format :)
User avatar
Kotlov
Posts: 269
Joined: Fri Jul 10, 2015 9:23 pm
Location: Russia

Re: Move Generator, test it till where?

Post by Kotlov »

read more
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Move Generator, test it till where?

Post by Luis Babboni »

Thnaks guys for your answers!
elcabesa wrote:I used this tecnique to debug my movegen as soon as I ended with the position on the wiki.
...
The point is that I´m not seeing the way to do it for example from initial position further than ply 10 as maximum (3 years at me actual engine speed!!).
Kotlov wrote:read more
I think I must do it for example to understood Marco´s suggestions, but for the moment I did not even made an UCI or Winboard interpreter. :oops:
I searched here for "perft" and could not found nothing about a reasonable point to stop testing. :?

Sorry if I missing something obvious?
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Move Generator, test it till where?

Post by Luis Babboni »

Marco, those "7000 positions" means 7000 FENs and theire respective perft results?
I think I could use it!! :P
elcabesa
Posts: 858
Joined: Sun May 23, 2010 1:32 pm

Re: Move Generator, test it till where?

Post by elcabesa »

I have a file to generate the circa 7000 positions.

if you look at vajolet github account you'll find a test directory. inside you'll find "perft-random.txt"

it's a file that could be used to generate the perft resutl with stockfish, open a command line and digit:
stockfish <perft-random.txt >perft-result.txt

and you'll have all the perftresult in perft-restult.txt file.

you need yto wait enough toime , maybe a day, to have all the perft result and then you have to cleanup the file, but you could do it with python, by abd, or with a good editor to remove the unuseful lines
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Move Generator, test it till where?

Post by Luis Babboni »

Mmmm.... I´m not sure if I´m able to do it right now, but I´ll catch it and seems to be a good point to do at the same time as I continue with the rest of the engine.

Tanti grazie Marco!
elcabesa
Posts: 858
Joined: Sun May 23, 2010 1:32 pm

Re: Move Generator, test it till where?

Post by elcabesa »

prego!
you are welcome