Cfish is back!

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Cfish is back!

Post by syzygy »

zullil wrote: Tue Jul 07, 2020 2:32 pm
Milos wrote: Tue Jul 07, 2020 2:30 pm
zullil wrote: Tue Jul 07, 2020 2:21 pm
Milos wrote: Tue Jul 07, 2020 1:57 pm
zullil wrote: Tue Jul 07, 2020 1:15 pm Ronald has brought Cfish back in sync with Stockfish-dev. Both have "bench signature" 4882833.

https://github.com/syzygy1/Cfish
Next step Cfish-NN :D
That can wait until after Ronald has time for Cfish-NonLazySMP. :wink:
Cfish doesn't support LazySMP?
So there is C++ code in LazySMP??? I would assume since pthreads are pure C that translation would be trivial.
You misunderstand. I want Cfish-YBW (or anything other than LazySMP). :wink:
My attempt of some time (years) ago to get that working unfortunately failed. At the time, I thought I could do better than SF's old YBW implementation by copying the approach I use in my private engine, but I had only very limited succes. The very low branching factor of Stockfish makes it difficult to find enough work for all threads. Perhaps even worse is that all threads need to synchronise after each iteration of the aspiration search.

Maybe I will give it a try again some day but no promises...
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Cfish is back!

Post by syzygy »

zullil wrote: Tue Jul 07, 2020 8:01 pm
Dann Corbit wrote: Tue Jul 07, 2020 7:27 pm
zullil wrote: Tue Jul 07, 2020 1:15 pm Ronald has brought Cfish back in sync with Stockfish-dev. Both have "bench signature" 4882833.

https://github.com/syzygy1/Cfish
This is very good news. I notice that the name for the official release version is:
Cfish-cfish_11_fixed
It makes me ask what was broken.
Maybe this explains? https://github.com/syzygy1/Cfish/commit ... b51b0180c3
I think there is still a discrepancy in bench node counts at rather high depths.
Should someone find a quick way to produce a different node count, let me know. (Otherwise I will just have to be patient when I decide to hunt down the problem and fix it.)

If there is some obvious problem with threading or time control, let me know too. My quality ocntrol mainly consists of being careful and verifying default bench node counts :-)
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Cfish is back!

Post by syzygy »

syzygy wrote: Tue Jul 07, 2020 11:55 pm I think there is still a discrepancy in bench node counts at rather high depths.
E.g. bench 256 1 20 searches 57633211 where SF searches 57633212 nodes.

I also noticed that the reported seldepth is different (perhaps always off by one, not sure).

So at least two bugs still to be fixed.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Cfish is back!

Post by zullil »

syzygy wrote: Tue Jul 07, 2020 11:47 pm
zullil wrote: Tue Jul 07, 2020 2:32 pm
Milos wrote: Tue Jul 07, 2020 2:30 pm
zullil wrote: Tue Jul 07, 2020 2:21 pm
Milos wrote: Tue Jul 07, 2020 1:57 pm
zullil wrote: Tue Jul 07, 2020 1:15 pm Ronald has brought Cfish back in sync with Stockfish-dev. Both have "bench signature" 4882833.

https://github.com/syzygy1/Cfish
Next step Cfish-NN :D
That can wait until after Ronald has time for Cfish-NonLazySMP. :wink:
Cfish doesn't support LazySMP?
So there is C++ code in LazySMP??? I would assume since pthreads are pure C that translation would be trivial.
You misunderstand. I want Cfish-YBW (or anything other than LazySMP). :wink:
My attempt of some time (years) ago to get that working unfortunately failed. At the time, I thought I could do better than SF's old YBW implementation by copying the approach I use in my private engine, but I had only very limited succes. The very low branching factor of Stockfish makes it difficult to find enough work for all threads. Perhaps even worse is that all threads need to synchronise after each iteration of the aspiration search.

Maybe I will give it a try again some day but no promises...
Understood. It's great to have Cfish back in any case.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Cfish is back!

Post by Ovyron »

Cfish is awesome, much better performance than anything else in my machine. This is with 3 cores, basically switching to Cfish is like using 4 cores.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Cfish is back!

Post by Dann Corbit »

I also saw an asmfish branch on his site.
Maybe we get two miracles.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Cfish is back!

Post by MikeB »

zullil wrote: Wed Jul 08, 2020 1:15 am
syzygy wrote: Tue Jul 07, 2020 11:47 pm
zullil wrote: Tue Jul 07, 2020 2:32 pm
Milos wrote: Tue Jul 07, 2020 2:30 pm
zullil wrote: Tue Jul 07, 2020 2:21 pm
Milos wrote: Tue Jul 07, 2020 1:57 pm
zullil wrote: Tue Jul 07, 2020 1:15 pm Ronald has brought Cfish back in sync with Stockfish-dev. Both have "bench signature" 4882833.

https://github.com/syzygy1/Cfish
Next step Cfish-NN :D
That can wait until after Ronald has time for Cfish-NonLazySMP. :wink:
Cfish doesn't support LazySMP?
So there is C++ code in LazySMP??? I would assume since pthreads are pure C that translation would be trivial.
You misunderstand. I want Cfish-YBW (or anything other than LazySMP). :wink:
My attempt of some time (years) ago to get that working unfortunately failed. At the time, I thought I could do better than SF's old YBW implementation by copying the approach I use in my private engine, but I had only very limited succes. The very low branching factor of Stockfish makes it difficult to find enough work for all threads. Perhaps even worse is that all threads need to synchronise after each iteration of the aspiration search.

Maybe I will give it a try again some day but no promises...
Understood. It's great to have Cfish back in any case.
Speed kills and cfish has the speed. Great to see it back!
Image
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Cfish is back!

Post by syzygy »

syzygy wrote: Wed Jul 08, 2020 12:20 am
syzygy wrote: Tue Jul 07, 2020 11:55 pm I think there is still a discrepancy in bench node counts at rather high depths.
E.g. bench 256 1 20 searches 57633211 where SF searches 57633212 nodes.

I also noticed that the reported seldepth is different (perhaps always off by one, not sure).

So at least two bugs still to be fixed.
Bench 256 1 20 now searches 57633212 nodes.
It seems I missed a small patch in May 2018.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Cfish is back!

Post by zullil »

syzygy wrote: Thu Jul 09, 2020 12:59 am
syzygy wrote: Wed Jul 08, 2020 12:20 am
syzygy wrote: Tue Jul 07, 2020 11:55 pm I think there is still a discrepancy in bench node counts at rather high depths.
E.g. bench 256 1 20 searches 57633211 where SF searches 57633212 nodes.

I also noticed that the reported seldepth is different (perhaps always off by one, not sure).

So at least two bugs still to be fixed.
Bench 256 1 20 now searches 57633212 nodes.
It seems I missed a small patch in May 2018.
Indeed. Nodes searched : 57633212

Good that you were able to quickly ascertain the cause of the discrepancy.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Cfish is back!

Post by syzygy »

zullil wrote: Thu Jul 09, 2020 1:35 am
syzygy wrote: Thu Jul 09, 2020 12:59 am
syzygy wrote: Wed Jul 08, 2020 12:20 am
syzygy wrote: Tue Jul 07, 2020 11:55 pm I think there is still a discrepancy in bench node counts at rather high depths.
E.g. bench 256 1 20 searches 57633211 where SF searches 57633212 nodes.

I also noticed that the reported seldepth is different (perhaps always off by one, not sure).

So at least two bugs still to be fixed.
Bench 256 1 20 now searches 57633212 nodes.
It seems I missed a small patch in May 2018.
Indeed. Nodes searched : 57633212

Good that you were able to quickly ascertain the cause of the discrepancy.
Unfortunately the node counts of longer benches are still off :-)

I also noticed that, on my laptop, Cfish and SF are about equal in speed when I set the hash size to 1024 or higher. I haven't tried on my desktop yet, but this surprised me a bit.