Neghina position

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

Moderators: hgm, Rebel, chrisw

Spliffjiffer
Posts: 416
Joined: Thu Aug 02, 2012 7:48 pm
Location: Germany

Re: Neghina position

Post by Spliffjiffer »

Ovyron wrote: Tue Nov 26, 2019 4:48 am
Spliffjiffer wrote: Tue Nov 26, 2019 4:45 am :-)...ok its very often the case that the PV is NOT accurate, weather in SF nor its derivatives nor in any engine ??
Yes, and people take advantage of it to win correspondence chess games.
hey ovi :-)...you respond so fast that even my correction from "weather" to "wether" was not fast enough, sure i give u right :-)
Wahrheiten sind Illusionen von denen wir aber vergessen haben dass sie welche sind.
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Neghina position

Post by jp »

Spliffjiffer wrote: Tue Nov 26, 2019 5:00 am hey ovi :-)...you respond so fast that even my correction from "weather" to "wether" was not fast enough, sure i give u right :-)
Don't worry, Spliffjiffer, because you will have to correct it again (correctly this time), from "wether" to "whether".
Spliffjiffer
Posts: 416
Joined: Thu Aug 02, 2012 7:48 pm
Location: Germany

Re: Neghina position

Post by Spliffjiffer »

jp wrote: Tue Nov 26, 2019 1:13 pm
Spliffjiffer wrote: Tue Nov 26, 2019 5:00 am hey ovi :-)...you respond so fast that even my correction from "weather" to "wether" was not fast enough, sure i give u right :-)
Don't worry, Spliffjiffer, because you will have to correct it again (correctly this time), from "wether" to "whether".
omg, a castrated sheep...no, that was not i wanted to tell !!....whether, whether, whether, ok...some exercise, thank you very much jp !...ill try to learn it :-)
Wahrheiten sind Illusionen von denen wir aber vergessen haben dass sie welche sind.
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Neghina position

Post by jp »

Spliffjiffer wrote: Tue Nov 26, 2019 1:56 pm omg, a castrated sheep...
That must refer to NN engines running on normal people's hardware. :wink:
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Neghina position

Post by Ovyron »

Dann Corbit wrote: Tue Nov 26, 2019 4:57 am A pv is only accurate to the point where the opponent engine or player makes a different move.
So you get 1 ply, and maybe more.
Exactly. So I still don't get why people would sit on the root position since only getting 1 ply doesn't change with more time. When the PV gets inaccurate I call it the "tail of the variation." If the first move on the PV is a mistake (because it changes the theoretical result of best play) then it's only a tail with no head :shock:

I went as far as calling the PV garbage the other day, since my analysis would be the same if I was just getting a move choice and a score:
Ovyron wrote: Wed Sep 18, 2019 4:40 pm(using code tags so this wall of text doesn't shoot my message's length to oblivion)

Code: Select all

The "weakness" of A/B engines is that their PVs are garbage. Seriously, I have tried every single analysis method I could think about with them, the most successful ones by far were the ones where I put in my analysis tree the move that the engine played (the 1st move in its PV), and threw away the rest, which was never useful (if you use MultiPV, you take note of all the 1st moves on the many PVs, and throw the rest away, or you can exclude the best move from analysis, see what's the second best, and throw the rest of its PV away).

The problem with engines is that, for this PV that they show there's a "weakest link", that is, a move that if they have the position in their face, they wouldn't play at all. Never. If you can find this move, you can refute their line.

What happens is that on a given PV, only the main move is analyzed to this depth, the -next move for this side- that appears will have been analyzed to 2 depths less, and the next one to 4 depths less...

For an analysis to Depth 70, from move 11 (which is the case here), the engine will show a line like this:

11.A a 12.B b 13.C c 14.D d 15.E e 16.F f 17.G g 18.H h 19.I i 20.J j 21.K k 22.L l 23.M m 24.N n 25.O o 26.P p 27.Q q 28.R r 29.S s 30.T t 31.U u ...

Now, due to reductions and extensions, what follows isn't -precise-, but it is -accurate-, only A is at depth 70, you can see how the move quality of the rest of the moves goes downhill like this:

A/70 Depth
B/68 Depth
C/66 Depth
D/64 Depth
E/62 Depth
F/60 Depth
G/58 Depth
H/56 Depth
I/54 Depth
J/52 Depth
K/50 Depth
L/48 Depth
M/46 Depth
O/44 Depth
P/42 Depth
Q/40 Depth
R/38 Depth
S/36 Depth
T/34 Depth
U/32 Depth

That is, to get a better PV than the one you have, you don't need to wait till depth 71, all you need to do is jumping into any of these positions, and reach what I call "relative depth +1". Say, you can jump to 24...n and reach depth 45 on there, or to move 27...q and reach depth 39 on there.

But what you want is to find the weakest link, where is it? Who knows, but you'll notice the closer you get to the root, the longer it takes to reach "relative depth +1." So you can follow the next procedure:

1.Jump to move 30...t and reach depth 33.
IF score == 0.00 THEN go to 2. ELSE score >= 0.00 you refuted the line! Congrats!

2.Jump to move 29...s and reach depth 35.
IF score == 0.00 THEN go to 3. ELSE score >= 0.00 you refuted the line! Congrats!

3.Jump to move 28...r and reach depth 37.
IF score == 0.00 THEN go to 4. ELSE score >= 0.00 you refuted the line! Congrats!

...

If you do it all the way up to 11...a at Depth 69 and you got 0.00 all along, then I concede, Stockfish's line is solid, and it is 0.00, and I couldn't have refuted it, blah blah blah.

Otherwise, you'll see that there was some garbage in the PV, but that Stockfish couldn't see at this relative depth, because it was outside its horizon. You can make the horizon larger in a much faster time than it takes Stockfish to reach Depth 71. Heck, it takes Stockfish so long to get to the next depth, that you probably can do "relative depth +2" or "relative depth +3" and get ahead of Stockfish's depth when it is done!

What do you do when you've refuted this line? Well, you know from the root that it's 0.00 because if this falls Stockfish has another 0.00 line somewhere. You can explore the variations until you find it, and then you can use the same trick to refute this line to a >0.00 score. Once this is done, you can find another one and find the same. 

Eventually, Stockfish will run out of 0.00 lines, so you'll be able to have a root score that is >0.00. You'll have a score of >0.00 even though Stockfish at Depth 71 or Depth 72 will continue to show 0.00. Why is this? Because the moves that take it down are still outside of its horizon, and there's moves it will just not see unless the relevant position is on its face (sometimes it will not even see it on its face, you need to use MultiPV on there, or use a different engine that sees the move so you feed it and it sees the truth.)

And now that the root position has a >0.00 score in your tree, you can do this all over again, but shotgun all the variations with this score, which you can call S, and after your root position has score S, you can do this all over again to make the root position >S on your tree, and so on.

What you'll find out if that this is a much more productive endeavor than letting the engine unassisted with Infinite Analysis for hours. SO MUCH that I could easily let my engine analyzing some position unassisted while I'm asleep, having some high depth PV when I wake up, but I don't do it, because it's a waste of time, because only the first move of the PV is useful and the rest is garbage, because you're much better off building a consistent line that has the same relative depth for the moves like this:

A/26 Depth
B/26 Depth
C/26 Depth
D/26 Depth
E/26 Depth
F/26 Depth
G/26 Depth
H/26 Depth
I/26 Depth
J/26 Depth
K/26 Depth
L/26 Depth
M/26 Depth
O/26 Depth
P/26 Depth
Q/26 Depth
R/26 Depth
S/26 Depth
T/26 Depth
U/26 Depth

Because Depth 70 continues V/30 W/28 X/26 Y/24 Z/22 - And you'll have Y/26 Z/26 - You'll be outsearching Depth 70 by 4 depths and they'll continue to go up after move Z, where Depth 70 will be relative Depth 20, and you can refute it in a second.
I like this picture:

Image

The top left is a PV, if you are lucky it has hit the target's center at random, but the rest of the PV could be shots at random. The bottom left is what you get after analyzing the positions interactively, your accuracy gets better but it takes time to get the right shots on future positions.

The top right is people fooling themselves into thinking they're understanding what's going on (they have plenty of analysis in irrelevant lines missing a key move), increasing their precision more and more for positions that will not appear in the game. This includes all my lost games. Of course, you need to be playing a game to tell this and the next one apart.

The bottom right is the chess truth, that can be approached arbitrarily, some people think they can achieve it within days, others think such a chess truth doesn't exist in principle, others that to get it you'd need the entire solution of chess. But on a good day you'll have your bottom left against an opponent's top right and it'll be good enough to win.

I'm glad PVs are not accurate, if they were humans would be obsolete, and corr chess wouldn't be more fun than checking results on a calculator.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Neghina position

Post by zullil »

Stockfish-dev reached depth 88 without finding the key move. I stopped the search, and, without clearing the hash, gave Stockfish the key. From there, the problem was (relatively) easy to solve:

info depth 49 seldepth 84 multipv 1 score cp -1515 nodes 1723881577154 nps 46499922 hashfull 583 tbhits 1041762529 time 37072784 pv d8e8 h6e6 e8d8 g2f3 d7a4 e6f6 a4d1 f3e4 d1h1 d4f3 h1b1 e4e3 b6b5 f6f8 d8e7 f8h8 c7c5 h8h7 e7d8 f3g5 b1g1 e3e4 g1b1 g5e6 d8c8 h7h8 c8d7 e6c5 d7c6 h8h6 c6c7 c5e6 c7b7 e6f4 a6a5 e5e6 b1h1 e4f5 h1c6 h6h8 c6d6 d3e5 b5b4 h8h7 b7a6 e6e7 d6b8 f4d5 b8g8 h7f7 g8c8 f5f4 b4c3 e7e8q c8e8 d5c7 a6b6 c7e8 c3c2 f7c7 b6b5 e8d6 b5b6 c7c4 c2c1q c4c1 a5a4
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Neghina position

Post by ernest »

zullil wrote: Fri Nov 29, 2019 10:19 am
info depth 49 seldepth 84 multipv 1 score cp -1515 nodes 1723881577154 nps 46499922 hashfull 583 tbhits 1041762529 time 37072784 pv d8e8 h6e6
So here the Black Queen does not capture the Rook...
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Neghina position

Post by zullil »

ernest wrote: Sat Nov 30, 2019 12:53 am
zullil wrote: Fri Nov 29, 2019 10:19 am
info depth 49 seldepth 84 multipv 1 score cp -1515 nodes 1723881577154 nps 46499922 hashfull 583 tbhits 1041762529 time 37072784 pv d8e8 h6e6
So here the Black Queen does not capture the Rook...
The point is that the evaluation is -1515, meaning that Stockfish recognizes that the position is lost for Black. I should have simply omitted the PV.
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Neghina position

Post by jp »

zullil wrote: Fri Nov 29, 2019 10:19 am Stockfish-dev reached depth 88 without finding the key move. I stopped the search, and, without clearing the hash, gave Stockfish the key.
By key move, do you mean the first move, Nd4?
Surely SF should not need to be fed that!
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Neghina position

Post by zullil »

jp wrote: Sat Nov 30, 2019 12:21 pm
zullil wrote: Fri Nov 29, 2019 10:19 am Stockfish-dev reached depth 88 without finding the key move. I stopped the search, and, without clearing the hash, gave Stockfish the key.
By key move, do you mean the first move, Nd4?
Surely SF should not need to be fed that!
Yes, Nd4. I believe it was still fourth best when I terminated the search.