There's plenty of examples where more code is faster than less code. You're being pretty ignorant. No one will be convinced by your hand-waving arguments.dangi12012 wrote: ↑Sat Dec 18, 2021 2:58 pmIn text form normal messages may seem like snippish or arrogant but thats because its text form. Dont assume any emotions on my side.AndrewGrant wrote: ↑Sat Dec 18, 2021 2:37 pm "I think you know that, too". I'm not so sure of this. I don't think he understands the amount of effort required to do 100.00%, vs 99.99%. He acts like the process of make-verify-unmake is entirely useless, but fails to recognize that the effort required to go around this is greater (as it stands, in practice in engines, like I stated originally). More code, and more instructions, and more operations, are required in order to ensure verified moves are legal.
Its extremely foolish and arrogant to assert that what people have been doing for decades is wrong and easily fixed -- ALTHOUGH IT HAPPENS FROM TIME TO TIME TO BE THE CASE. If this is such a case, then show it. Pretty simple. Modify an engine, demonstrate the speedup, post results and then flex on decades of hobbyists, computer scientists, and chess programmers missing what you see so clearly.
Put up or shut up.
What I say is this (and it is self evident)
make-verify-unmake is longer and wastes cpu cycles compared to:
make-unmake
That is clear as day. If you say otherwise its you who would have to back it up.
On that point: More code, and more instructions, and more operations, are required in order to ensure verified moves are legal.
Thats what my movegen proved wrong. All you need is a single and instruction to resolve all pins on the board. And one AND instruction to resolve all check-evasions.
An engine has to call "ISLEGAL" on every single node it walks. And that is 30 Million calls/s with complex code behind it. Thats not nothing.
I dont know how you can even pretend that there is a discussion to be made...
We need to scrap Perft()
Moderator: Ras
-
- Posts: 391
- Joined: Tue Oct 08, 2019 11:39 pm
- Full name: Tomasz Sobczyk
Re: We need to scrap Perft()
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.
Maybe you copied your stockfish commits from someone else too?
I will look into that.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: We need to scrap Perft()
Sopel is a confirmed forum troll. When he enteres a discussion you know every value is lost.
So I promise we stay on topic now:
Perft() vs "And Speedt() would end every leaf with a call to Quiessence()"
But as was said before Quiessence() is not a standard piece of code..
So if Quiessence() would be standardised is OPs idea good?
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
Um... he's not. Plain and simple. Failing to acknoledge your feelings of grandeur isn't trolling. It's just pointing out the obvious.dangi12012 wrote: ↑Sat Dec 18, 2021 3:17 pm Sopel is a confirmed forum troll. When he enteres a discussion you know every value is lost.
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
I think just replace QS with a cperft (exactly like perft, but captures-only and dig deeper until no more captures are available).dangi12012 wrote: ↑Sat Dec 18, 2021 3:17 pm Perft() vs "And Speedt() would end every leaf with a call to Quiessence()"
But as was said before Quiessence() is not a standard piece of code..
So if Quiessence() would be standardised is OPs idea good?
Last edited by R. Tomasi on Sat Dec 18, 2021 3:21 pm, edited 1 time in total.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: We need to scrap Perft()
So normal perft + capture expansion for every leaf node.R. Tomasi wrote: ↑Sat Dec 18, 2021 3:20 pmI think just replace QS with a cperft (exactly like perft, but captures-only and dig deeper until no more captures are available).dangi12012 wrote: ↑Sat Dec 18, 2021 3:17 pm Perft() vs "And Speedt() would end every leaf with a call to Quiessence()"
But as was said before Quiessence() is not a standard piece of code..
So if Quiessence() would be standardised is OPs idea good?
Why is it good to standardize that? But I see the value there. You dont test movegen only but actual QS for every leaf too.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 2696
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: We need to scrap Perft()
No, it isn't, because most moves are actually legal.dangi12012 wrote: ↑Sat Dec 18, 2021 3:11 pmThats exactly my point. You literally bloat the thing you sort for no reason
No, it isn't. First, Big-Oh is meaningless for the typical list length of move lists. Second, most engines don't even do NlogN sorting, but have a move picker like SF, effectively a selection sort, because the first move already cuts in most cases. That's the point of move sorting.Sorting is expensive NlogN.
No, it isn't. Most moves are not illegal to begin with, in particular the hash moves where you don't even generate a move list.Makemove / Unmake on an not legal move is expensive.
No, they aren't. Thanks to LTO and inlining.Function calls are expensive.
As I said, you are free to prove your claims just with a patch to SF. As long as it is functionally identical, but just faster, you don't need some 100k games to prove its worth because identical but faster is automatically better.
Last edited by Ras on Sat Dec 18, 2021 3:25 pm, edited 1 time in total.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
Well that's my suggestion. I'm happy to discuss alternatives. My reasoning is the following:dangi12012 wrote: ↑Sat Dec 18, 2021 3:21 pmSo normal perft + capture expansion for every leaf node.R. Tomasi wrote: ↑Sat Dec 18, 2021 3:20 pmI think just replace QS with a cperft (exactly like perft, but captures-only and dig deeper until no more captures are available).dangi12012 wrote: ↑Sat Dec 18, 2021 3:17 pm Perft() vs "And Speedt() would end every leaf with a call to Quiessence()"
But as was said before Quiessence() is not a standard piece of code..
So if Quiessence() would be standardised is OPs idea good?
Why is it good to standardize that?
Perft is first and foremost a tool to test the correctness of move generators. It's vital, and virtually everyone who is writing a chess engine uses it to very the movegen. But most engines have special movegens for captures/QS. It would be really nice to have the equivalent of perft for testing those. Since QS isn't standardized, I would think just copy-pasting the perft routine one has and modifying it to only look at/generate captures and not stop at a specific depth. Would probably take less than 5mins to implement in most engines and might help lots with tracking movegen bugs in QS.
-
- Posts: 2696
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: We need to scrap Perft()
I don't think so because first, QS is not standardised, and second, not even the moves are standardised. For example, many engines don't generate underpromotions in QS. The consequence is that you don't have reference result numbers that you could verify against.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: We need to scrap Perft()
Indeed, that's why I suggest doing it the way I did.Ras wrote: ↑Sat Dec 18, 2021 3:28 pmI don't think so because first, QS is not standardised, and second, not even the moves are standardised. For example, many engines don't generate underpromotions in QS. The consequence is that you don't have reference result numbers that you could verify against.
-
- Posts: 2696
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: We need to scrap Perft()
OK, that would solve the problem how to obtain reference results - but at the expense of still not being what is done in real QS, even discounting pruning and just looking at the move generators. See the "no underpromotions in QS" example. So that would still not test how moves are generated in QS, which was the objective of the proposal.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net