see

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: see

Post by AlvaroBegue »

flok wrote:
tomitank wrote:100 - 975 + 325 - 325 + 325 = 550
AlvaroBegue wrote:No, that's not it at all. It's -550. I can break it down if you can't figure it out. But don't start with the material value of the queen, because the pawn is the first thing to go.
Please do because I can't figure it out.
First of all: why an odd number of additions? there are 6 pieces?
But there are only 5 captures.

Let's imagine the sequence of moves if everyone captures everything till the end (although they don't have to: Either player could stop and take the "stand pat" score, like in quiescence search).

qxP, Nxq, nxN, Nxn, nxN

Let's write down the sequence of captured piece values, with sign:
+100, -975, +325, -325, +325

Now compute the partial sums (material balance at each step):
+100, -875, -550, -875, -550

Now start at the penultimate place in the list (the second -875) and think of whether the player to move would prefer the material balance at that time (the number we are looking at) or the result of the recapture (the next element in the list).

+100, -875, -550, >>-875<<, -550

In this case it was black's turn, and black would rather see -550 than -875, because in the convention of signs we are using in this post, higher means better for black. So we replace the -875 with -550 and we move back.

+100, -875, >>-550<<, -550, -550

White is indifferent as to whether to pick the -550 from not standing pat or the -550 from recapturing.

+100, >>-875<<, -550, -550, -550

It's black's turn, so black would rather take the -550 from recapturing.

>>+100<<, -550, -550, -550, -550

It's white's turn, so -550 is better than +100.

-550, -550, -550, -550, -550

The result of SEE is the first number, so -550.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: see

Post by elcabesa »

I haven't understood if you correctly understood the see.
The see is relative to a move.
In this position queen capturing the pawn has a see of -550.
Left Knight capturing pawn has a see of 100
Right knight capturing pawn had a see of 100.

I have calculated the see by mind.. and they can be wrong. But the important thing is that a move has a see.
A see without the first move doesn't exist
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: see

Post by AlvaroBegue »

elcabesa wrote:I haven't understood if you correctly understood the see.
The see is relative to a move.
In this position queen capturing the pawn has a see of -550.
Left Knight capturing pawn has a see of 100
Right knight capturing pawn had a see of 100.

I have calculated the see by mind.. and they can be wrong. But the important thing is that a move has a see.
A see without the first move doesn't exist
Well, he said this: "The left black queen is attacking the white pawn. What should be the SEE value?"

I assume in this whole thread we have been talking about the SEE value of the black queen capturing the white pawn.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: see

Post by elcabesa »

Me too.
But since I don't know what are the knowledge of folkert and the post doesn't specify it very well, I have specified it.
flok

Re: see

Post by flok »

I think I understand it :-)
It's just that I find it difficult to get it right.
But the current version does all 3 cases right! (queen/knight/knight as attacker giving -550, 100 and 100)

Thank you all.


(more testcases welcome but don't feel obliged :-)
petero2
Posts: 688
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: see

Post by petero2 »

flok wrote:(more testcases welcome but don't feel obliged :-)
I have some test cases I used when implementing SEE in cuckoochess:

https://github.com/peterosterlund2/droi ... .java#L276

In complicated cases the SEE value may depend on your implementation though. This can happen when there are multiple X-ray threats to the target square.
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: see

Post by Steve Maughan »

You may find this blog post helpful:

https://www.chessprogramming.net/static ... -in-chess/

Steve
http://www.chessprogramming.net - Maverick Chess Engine
Maarten Claessens
Posts: 106
Joined: Mon May 12, 2014 10:08 am
Location: Near Nijmegen

Re: see

Post by Maarten Claessens »

What about the see-value of fxe5 in this position:
[d]8/2q2k2/4rb2/4pR2/5P2/3N4/Q7/4K3 w - - 0 1
Nothing is unstable (Lawrence Krauss)
flok

Re: see

Post by flok »

I would say +975.

(for pawn 100, knight 325, bishop 325, rook 500, queen 975, king 10000)
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: see

Post by elcabesa »

Why?
My see doesn't take in account checks and maybe pinned pieces.(I have to check the source).
I think the result depend on how you calculate it.