Fastest perft

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Ajedrecista
Posts: 2103
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Fastest perft

Post by Ajedrecista »

Hello Muller:
hgm wrote:Did you run qperft with the proper arguments? If you run it without arguments, it just prints how you should use it, and exits immediately. It is not an interactive application, it should be run from a terminal / command prompt.
According to you, I run it without arguments (by the way, I do not understand what do you mean with 'arguments') because when I double click the .exe, it exits immediately, no time to react (do not print anything). So, I have to open it with cmd? I do not know how. Thanks for giving an explanation of why it did not work for me.

I said that JetChess was faster than qperft in view of results posted in Talkchess some years ago (link provided by the wikispace Chessprogramming). I have seen the code of qperft and :shock: Great job! I suppose you do not use qperft for estimating Perft(13)...

Regards from Spain.

Ajedrecista.
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: Fastest perft

Post by marcelk »

stegemma wrote:The discussion about useless of perft raise up periodically. I still think that everything that was so difficult or just so interesting to somebody to make hes/her brain getting hot is a good thing, despite for its usefullness or... uselessness.
There are:
1. exact perft as debugging tool
2. perft as efficient programming contest
3. deep perft estimation as recreational mathematics
4. deep exact perft calculation on starting position as competition (Integer sequence database)

Of these,
1 is extremely useful as means to make a chess program (of which the usefulness is up to the reader),
2 and 3 have entertainment and educational value, not unlike chess composition or solving soduko puzzles, and
4 is a way to emit huge amounts of CO2 into the atmosphere for your own glory

But that is just an opinion.

PS: even if in the specific case the required electricity is generated from hydro, wind or nuclear, as long as the grid is relying on burning fossil fuels to meet overall demand, not running deep perft means less CO2.
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: Fastest perft

Post by stegemma »

marcelk wrote:
stegemma wrote:...4 is a way to emit huge amounts of CO2 into the atmosphere for your own glory
...
Yes, but working on perfct can raise your knowledge on programming so that (if you're a professional) you can make more efficient software in business solutions. A single perfct runned on nighttime can be payed by some thousands of your customers that works better and faster in daytime. Ok, that seems little fool... but spending the same CPU time playing on FB or even just running on a yard... or making love... will produce the same amount of CO2 than a one hour perfct :)
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 »

Ajedrecista wrote:According to you, I run it without arguments (by the way, I do not understand what do you mean with 'arguments') because when I double click the .exe, it exits immediately, no time to react (do not print anything).
Arguments are what you type after the name of the command. Like

qperft 6 "4k3/8/8/8/8/8/8/4K3 w - - 0 1"

if you want to calculate perft(6) from the given FEN.
So, I have to open it with cmd? I do not know how. Thanks for giving an explanation of why it did not work for me.

I said that JetChess was faster than qperft in view of results posted in Talkchess some years ago (link provided by the wikispace Chessprogramming). I have seen the code of qperft and :shock: Great job! I suppose you do not use qperft for estimating Perft(13)...
In fact I did use qperft for that, with two lines of code added to it to do the pruning.
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 »

marcelk wrote:Of these,
1 is extremely useful as means to make a chess program (of which the usefulness is up to the reader),
2 and 3 have entertainment and educational value, not unlike chess composition or solving soduko puzzles, and
4 is a way to emit huge amounts of CO2 into the atmosphere for your own glory
The point of course is that all this is just as true for making a Chess program. Tuning a strong Chess program emits huge amounts of CO2, and Chess is a totally useless game.
User avatar
Ajedrecista
Posts: 2103
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Fastest perft

Post by Ajedrecista »

Hi Muller:

Thank you very much! It works fine now (also i-perft and OliPerft). Using qperft with hash = 256 or 512 MB (I do not remember) Perft(7) = 3,195,901,860 was calculated in around 17 seconds in my computer, which is pretty good; but JetChess counts Perft(7) in less than 9 seconds. It would be very nice that Thomas Zipproth will add lines of code to JetChess for doing the pruning, and also add multi-core support, for seeing how much the estimates of Perft(13) differ between qperft and JetChess.

Please keep the good work.

Regards from Spain.

Ajedrecista.
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: Fastest perft

Post by marcelk »

hgm wrote: The point of course is that all this is just as true for making a Chess program. Tuning a strong Chess program emits huge amounts of CO2, and Chess is a totally useless game.
Indeed, with only the minor difference that the entertainment component of the resulting chess games is of a somewhat different category than that of 19809210192201437 (2011) vs 19809210192201437 (2020).
User avatar
Ajedrecista
Posts: 2103
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Fastest perft

Post by Ajedrecista »

Indeed, with only the minor difference that the entertainment component of the resulting chess games is of a somewhat different category than that of 19809210192201437 (2011) vs 19809210192201437 (2020).
Hello Marcel:

It is clear that each person has his/her own oppinion. Perft count is useful for improving codes of counting nodes, and it needs optimizations that are not obvious (other people know it far better than me). As someone said before, please let each one do whatever he/she wants (regarding chess): programming engines, probing various methods on Perft... All people can not do the same thing: not all people are engineers, or doctors, or teachers... but we need all of them! Same applies in computer chess IMHO. So please continue improving your projects: for example, Bookie is so good! Congrats! And not only Bookie...

I want to point out that your random (I suppose it is random) estimate is fairly wrong because you wrote ~ 1.980921e+16 when the true value will be about 100 times bigger! :wink: Just a typo, everybody are sometimes wrong (specially me). Please keep your good work!

Regards from Spain.

Ajedrecista.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Fastest perft

Post by Daniel Shawul »

Apparently you are emitting a lot of CrAp than I can bear. That is more toxic than Co2. Why don't you go back to your non-glory seeking, non-carbon emitting, more entertaining, more educational research of collecting gazillion ICS chess games than you would ever need!? I am convinced you know shit about the current perft endeavors even though you act like an expert summarizing the benefits and all. There is hardly any real research in chess compared to Go for example. Many methods used in a real Go playing engine has been used in the perft estimation in an expected way. Attach an eval to the leaves and you have a go/chess engine! Exact perft calculation is also necessary to compare performance of methods , accuracy & bias... So please save us the lecture and go back to whatever you are doing. We already got your opinion if that is what it is. Every one has one.
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: Fastest perft

Post by marcelk »

I am convinced you know shit about the current perft endeavors even though you act like an expert summarizing the benefits and all. There is hardly any real research in chess compared to Go for example. Many methods used in a real Go playing engine has been used in the perft estimation in an expected way. Attach an eval to the leaves and you have a go/chess engine!
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.
Exact perft calculation is also necessary to compare performance of methods , accuracy & bias...
Yes of course... and I didn't challenge that at all... But a very deep exact perft that runs for a year? Unless the effort is about finding some closed-form for the solution, like the chess equivalent of finding the hexadecimal expansion of pi, what can one do with that result that one cannot use a shallower perft for that runs for, say, a day? (I don't know who is claiming such closed-form can be resonably expected to exist though)

Sometimes the justification for a travel is the travel itself and not the destination. So far in this case I only see a benefit for the traveller and the progress messages sent during the trip are, well, postcards saying that he is doing well enjoying the trip. But I don't see (yet) who is waiting for the final postcard saying "and the last digits are 653213" and continue working on that result instead of leaving it at a "congratulations you made it".

Sometimes the justification for a travel is the vehicle. I also built a distributed perft once as a nice starting point for making a distributed search. But also there I didn't need to run it for a year to know the vehicle works.

Let me put the question more specific: what are others going to do with those least significant digits that they couldn't do with simpler means?

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.
Daniel Shawul wrote:Apparently you are emitting a lot of CrAp than I can bear. That is more toxic than Co2. Why don't you go back to your non-glory seeking, non-carbon emitting, more entertaining, more educational research of collecting gazillion ICS chess games than you would ever need!?
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.

PS: CO2 is useful for trees and plants. I like trees and plants.