Fastest perft

Discussion of chess software programming and technical issues.

Moderator: Ras

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Fastest perft

Post by Daniel Shawul »

If at some point I gave the impression that the perft estimation efforts are a waste, then I regret not making the separation clearer than I did because I certainly appreciate those a lot.
Well the OP was criticizing the current perft discussion as a whole and you added to it by saying "perft don't sale" and now "carbon-emission problems".
The fact is we all waste our time the way we choose. It really becomes frustrating when someone not currently involved in what one does criticizes based on
grounds that can also be applied to what that someone does.
I'm polarizing because I want to get to the point of understanding the purpose of 'very deep exact perft'. The 'perft is useless' statement of others is way too crude for that question, so I split it up and focus on one aspect. If there is value in knowing the least N least significant digits of a very deep perft then I indeed don't understand that at all and you observed that quite right so. If you get irritated by my ignorance or the way I ask the question then you can attack me as a person or care to explain what it is.
I say is a joint effort and should be treated as such. If Steven did not decide to compute perft(13) and posted a betting pool, all those perft discussions wouldn't have existed.
Perft(13) hasn't been computed before and doing so definitely has its own benefits. For example I didn't know there was a odd-even effect until I saw the plots of perft(1)-perft(12). The effect certainly decreases from ply to ply and it would be interesting to know how perft(13) turns out. Computing deep perfts by itself is also a challenge and you can learn a lot about distributed computing from it. I have been a computational fanatic my self with end game table bases, and you also with those huge number of ICS games. So what we do/did is no more important than the deep perft computations. Chess engines testing also falls under the same roof. I used to be excited about it but got bored later once I had a cluster search and cluster testing scheme working appropriately. I felt there are other worthy efforts than waiting ten thousand games to finish for a possible +5 elo. In the end, what matters is the programmer got entertainment,education etc from it and I don't regret anything because of that. Program optimization ( use of hash tables, bulk counting and other tricks) is another goal. I , being a chess programmer, can choose perft as a target for anything I would like to experiment with. The means is more important here than the goal. You can put what everyone does here under the same microscope and conclude it is a worthless effort.
Thanks for asking. I stopped that project because somebody else took over and did a better job at making the results useful to others. Besides there was too much demand for the download site that I had to close it or my provider would charge me more that I could afford. I don't intend to go back to that.
I do not mean to say it was a worthless effort and infact I appreciate everything unique anyone does here. I mentioned it to put into perspective. I have done many things on the cluster even I would consider worthless (let alone my supervisor). I quit if I don't have fun from it or for other reasons.
PS: CO2 is useful for trees and plants. I like trees and plants.
Apparently not for the human beings and the atmosphere :)

cheers
Daniel
lucasart
Posts: 3241
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Fastest perft

Post by lucasart »

Daniel Shawul wrote:
If at some point I gave the impression that the perft estimation efforts are a waste, then I regret not making the separation clearer than I did because I certainly appreciate those a lot.
Well the OP was criticizing the current perft discussion as a whole and you added to it by saying "perft don't sale" and now "carbon-emission problems".
The fact is we all waste our time the way we choose. It really becomes frustrating when someone not currently involved in what one does criticizes based on
grounds that can also be applied to what that someone does.
I'm polarizing because I want to get to the point of understanding the purpose of 'very deep exact perft'. The 'perft is useless' statement of others is way too crude for that question, so I split it up and focus on one aspect. If there is value in knowing the least N least significant digits of a very deep perft then I indeed don't understand that at all and you observed that quite right so. If you get irritated by my ignorance or the way I ask the question then you can attack me as a person or care to explain what it is.
I say is a joint effort and should be treated as such. If Steven did not decide to compute perft(13) and posted a betting pool, all those perft discussions wouldn't have existed.
Perft(13) hasn't been computed before and doing so definitely has its own benefits. For example I didn't know there was a odd-even effect until I saw the plots of perft(1)-perft(12). The effect certainly decreases from ply to ply and it would be interesting to know how perft(13) turns out. Computing deep perfts by itself is also a challenge and you can learn a lot about distributed computing from it. I have been a computational fanatic my self with end game table bases, and you also with those huge number of ICS games. So what we do/did is no more important than the deep perft computations. Chess engines testing also falls under the same roof. I used to be excited about it but got bored later once I had a cluster search and cluster testing scheme working appropriately. I felt there are other worthy efforts than waiting ten thousand games to finish for a possible +5 elo. In the end, what matters is the programmer got entertainment,education etc from it and I don't regret anything because of that. Program optimization ( use of hash tables, bulk counting and other tricks) is another goal. I , being a chess programmer, can choose perft as a target for anything I would like to experiment with. The means is more important here than the goal. You can put what everyone does here under the same microscope and conclude it is a worthless effort.
Thanks for asking. I stopped that project because somebody else took over and did a better job at making the results useful to others. Besides there was too much demand for the download site that I had to close it or my provider would charge me more that I could afford. I don't intend to go back to that.
I do not mean to say it was a worthless effort and infact I appreciate everything unique anyone does here. I mentioned it to put into perspective. I have done many things on the cluster even I would consider worthless (let alone my supervisor). I quit if I don't have fun from it or for other reasons.
PS: CO2 is useful for trees and plants. I like trees and plants.
Apparently not for the human beings and the atmosphere :)

cheers
Daniel
Woaw, what a pathetic dispute about a totally useless subject (perft)... I am amazed I managed to trigger such aggressive stupidity, just with a sarcastic remark...
And I considered myself an ecologit, now look at all the CO2 you guys are producing ;-)
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Fastest perft

Post by Daniel Shawul »

Woaw, what a pathetic dispute about a totally useless subject (perft)... I am amazed I managed to trigger such aggressive stupidity, just with a sarcastic remark...
And I considered myself an ecologit, now look at all the CO2 you guys are producing Wink
Now don't take my punch line. You whiners complain about the perft-posts, carbon-dioxide emission and what have you, when you yourselves emit CrAp ! Also there is nothing about your post indicating sarcasm so don't pretend you meant something else
I don't understand all these posts on perft. The only point of having a perft function is to validate that a chess engine move generator is bugfree. But perft is not a goal in itself. It is totally useless, so I just can't understand all this fascination about fast perft computation...
So tell us genius where the sarcasm is ? You clearly took perft as a move generator validator, but all those discussions you never understood were not about that at all. So don't try to hide under a false pretense, when clearly something else is wrong here. So stupid take your "aggressive stupidity" with you...
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: Fastest perft

Post by marcelk »

Daniel Shawul wrote: I say is a joint effort and should be treated as such. If Steven did not decide to compute perft(13) and posted a betting pool, all those perft discussions wouldn't have existed.
That is a very nice point, touché.

The whole carbon remark got me pondering about what it would -actually- take to neutralize the greenhouse gas emission of such computation, or of my own computers for that matter. My preliminary conclusions are that:
1. there is a whole market out there for buying carbon offsets (mostly through airlines affiliated programs); and
2. that it is not really expensive (that is: just a small part of the machine depreciation and electricity costs.).

So putting my money where my mouth is: I'm considering to turn Rookie it into a carbon neutral project. After all, "rookie" is almost synonymous with "green", right...? My main reservation is I want to know the credibility of said organizations but I'm going to figure that one out. Thanks to very deep exact perft of course :-)
User avatar
Ajedrecista
Posts: 2101
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Fastest perft

Post by Ajedrecista »

Hello Marcel:

Sadly, last posts are going off-topic of 'fastest perft'. If the thread continues in this way, maybe the moderators have to close it.

Trying to talk about perft counters, JetChess is by far the fastest perft counter (more than qperft and others) in my computer (Intel Pentium D930). I usually get average speeds between 700 MN/s and 800 MN/s when counting Perft(8) of random positions (with 5 plies played from the starting position). I run Perft(9) of Petrov defence (1.- e4, e5; 2.- Nf3, Nf6) (until ply 13 is reached) and the average speed was around 727.4 MN/s. With qperft I get less than a half of average speed (in terms of nodes/second) on Perft(7) and Perft(8) drafts using the same hash size (when I use qperft, I do not run Perft(9) of random positions (with 4 plies played from the starting position) because I do not want to count nodes during 12 hours or more). Anyway, qperft holds as an excellent perft counter... but JetChess brings me fastest results.

Regards from Spain.

Ajedrecista.
kongsian
Posts: 46
Joined: Thu Jun 15, 2006 11:21 am

Re: Fastest perft

Post by kongsian »

Ajedrecista wrote:Hello Marcel:

Trying to talk about perft counters, JetChess is by far the fastest perft counter (more than qperft and others) in my computer (Intel Pentium D930). I usually get average speeds between 700 MN/s and 800 MN/s when counting Perft(8) of random positions (with 5 plies played from the starting position). I run Perft(9) of Petrov defence (1.- e4, e5; 2.- Nf3, Nf6) (until ply 13 is reached) and the average speed was around 727.4 MN/s. With qperft I get less than a half of average speed (in terms of nodes/second) on Perft(7) and Perft(8) drafts using the same hash size (when I use qperft, I do not run Perft(9) of random positions (with 4 plies played from the starting position) because I do not want to count nodes during 12 hours or more). Anyway, qperft holds as an excellent perft counter... but JetChess brings me fastest results.

Ajedrecista.
Perhaps you could try my perft available at https://github.com/kongsian/meleechess. Unfortunately I only have source and no Windows compiles available; perhaps someone here can be kind enough to try and produce a 32 and 64 bit exe. It is faster that qperft aned iperft, but not sure how it stack against JetChess. Like qperft, you need to run it from the command line and provide arguments like fen, depth and hashsize.

When I get more time next week, I'll try and get at least a 32-bit exe done. Am also looking to add multi-threaded capabilities.

Rgds.
Kong Sian
User avatar
Ajedrecista
Posts: 2101
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Fastest perft

Post by Ajedrecista »

kongsian wrote: Perhaps you could try my perft available at https://github.com/kongsian/meleechess. Unfortunately I only have source and no Windows compiles available; perhaps someone here can be kind enough to try and produce a 32 and 64 bit exe. It is faster that qperft aned iperft, but not sure how it stack against JetChess. Like qperft, you need to run it from the command line and provide arguments like fen, depth and hashsize.

When I get more time next week, I'll try and get at least a 32-bit exe done. Am also looking to add multi-threaded capabilities.

Rgds.
Kong Sian
Hello Kong:

Thank you very much for your interest. I took a quick look of some of your code... although I almost understand nothing, it is quite clear and ordered, even with comments explaining each thing. Hope you (or anyone else) can improve (if possible) this code of meleechess, and thanks for trying to provide Windows executables and multi-core support, which is really appreciated. I have no problem of running it from the command line because Muller taught me how to do the same with qperft (thanks Muller!).

Regards from Spain.

Ajedrecista.
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fastest perft

Post by hgm »

kongsian wrote:Perhaps you could try my perft available at https://github.com/kongsian/meleechess. Unfortunately I only have source and no Windows compiles available; perhaps someone here can be kind enough to try and produce a 32 and 64 bit exe. It is faster that qperft aned iperft, but not sure how it stack against JetChess. Like qperft, you need to run it from the command line and provide arguments like fen, depth and hashsize.
Well, it doesn't work for me. (Under Ubuntu 10.04.)

I used make, and I get a binary 'perft' in melee/src/perft. But when I run it, it just starts eating CPU, without printing anything. It does not even print the Usage when I run it without arguments. It just hangs, eating CPU...
abulmo
Posts: 151
Joined: Thu Nov 12, 2009 6:31 pm

Re: Fastest perft

Post by abulmo »

For me it works, under Fedora 15 for x64.

As I have a recent CPU (i7-2600K), here is a summary of some of the perft programs cited during this thread, to run perft 8 :

i-perft.exe (no-hash) : 7m15s.
oliperft (no-hash): 2m45s
qperft (HGM), 256 MB: 1m23s
meleechess, 256 MB: 1m0s
jetchess.exe, 256 MB: 42s

Windows programs were runned with wine. All the time were obtained through the time command. All programs computed perft from 1 to 8 (manually done for Jetchess).
Richard
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fastest perft

Post by hgm »

I guess qperft is slowed down by the fact that I only put effort in optimizing the regular move generator, and no effort in calculating the perft fast. It is true that it does bulk counting in the final ply, but it does that by measuring the size of the move stack (top minus start), but it still fills the move stack with encoded moves, just like it would do on any ply, while this data is never used. So it wastes time on encoding and storing the moves,while all it really has to do is increment the stack pointer (or another counter).

When I cut away that dead wood, by making a special move generator for the last ply that directly counts, rather than pushing moves on the stack, I gain 25% speed (the perft(7) time drops from 102.01 sec to 75.42 sec).

By being clever, rather than just fast, I am pretty sure I could reduce that by another factor 10.