A0 subtlety

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jackd
Posts: 25
Joined: Mon Dec 10, 2018 2:45 pm
Full name: jack d.

A0 subtlety

Post by jackd »

Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: A0 subtlety

Post by Daniel Shawul »

jackd wrote: Mon Feb 11, 2019 5:17 pm Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
All the history input planes are oriented for the current side to move, i.e. at time t.
chrisw
Posts: 4313
Joined: Tue Apr 03, 2012 4:28 pm

Re: A0 subtlety

Post by chrisw »

Daniel Shawul wrote: Mon Feb 11, 2019 6:08 pm
jackd wrote: Mon Feb 11, 2019 5:17 pm Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
All the history input planes are oriented for the current side to move, i.e. at time t.
Would it matter if they weren’t?
(That’s a serious question btw)
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: A0 subtlety

Post by Daniel Shawul »

chrisw wrote: Thu Feb 14, 2019 4:28 pm
Daniel Shawul wrote: Mon Feb 11, 2019 6:08 pm
jackd wrote: Mon Feb 11, 2019 5:17 pm Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
All the history input planes are oriented for the current side to move, i.e. at time t.
Would it matter if they weren’t?
(That’s a serious question btw)
I suppose not but it would make it a little bit harder because the network has to learn to flip the board
every step in the history. I do not think history planes matter much anyway to begin with.
chrisw
Posts: 4313
Joined: Tue Apr 03, 2012 4:28 pm

Re: A0 subtlety

Post by chrisw »

Daniel Shawul wrote: Thu Feb 14, 2019 5:14 pm
chrisw wrote: Thu Feb 14, 2019 4:28 pm
Daniel Shawul wrote: Mon Feb 11, 2019 6:08 pm
jackd wrote: Mon Feb 11, 2019 5:17 pm Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
All the history input planes are oriented for the current side to move, i.e. at time t.
Would it matter if they weren’t?
(That’s a serious question btw)
I suppose not but it would make it a little bit harder because the network has to learn to flip the board
every step in the history. I do not think history planes matter much anyway to begin with.
I thought it would depend on how the convolution filters were tracking the data (in what order). Does it track 3x3 across each 8x8 map of chessboard cells, and then combine those outputs - so I suppose it must be best to combine a1 to a1 region and so on, rather than a1 to a8. Difficult to wrap head around.
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: A0 subtlety

Post by AlvaroBegue »

chrisw wrote: Thu Feb 14, 2019 6:44 pm
Daniel Shawul wrote: Thu Feb 14, 2019 5:14 pm
chrisw wrote: Thu Feb 14, 2019 4:28 pm
Daniel Shawul wrote: Mon Feb 11, 2019 6:08 pm
jackd wrote: Mon Feb 11, 2019 5:17 pm Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
All the history input planes are oriented for the current side to move, i.e. at time t.
Would it matter if they weren’t?
(That’s a serious question btw)
I suppose not but it would make it a little bit harder because the network has to learn to flip the board
every step in the history. I do not think history planes matter much anyway to begin with.
I thought it would depend on how the convolution filters were tracking the data (in what order). Does it track 3x3 across each 8x8 map of chessboard cells, and then combine those outputs - so I suppose it must be best to combine a1 to a1 region and so on, rather than a1 to a8. Difficult to wrap head around.
I agree with this. However, it's very likely that the history inputs are mostly irrelevant, as Daniel Shawul mentioned.
chrisw
Posts: 4313
Joined: Tue Apr 03, 2012 4:28 pm

Re: A0 subtlety

Post by chrisw »

AlvaroBegue wrote: Thu Feb 14, 2019 11:55 pm
chrisw wrote: Thu Feb 14, 2019 6:44 pm
Daniel Shawul wrote: Thu Feb 14, 2019 5:14 pm
chrisw wrote: Thu Feb 14, 2019 4:28 pm
Daniel Shawul wrote: Mon Feb 11, 2019 6:08 pm
jackd wrote: Mon Feb 11, 2019 5:17 pm Was a set of input planes representing a position at time (t - T + 1) oriented for the side to move at time t or time (t - T + 1)?
All the history input planes are oriented for the current side to move, i.e. at time t.
Would it matter if they weren’t?
(That’s a serious question btw)
I suppose not but it would make it a little bit harder because the network has to learn to flip the board
every step in the history. I do not think history planes matter much anyway to begin with.
I thought it would depend on how the convolution filters were tracking the data (in what order). Does it track 3x3 across each 8x8 map of chessboard cells, and then combine those outputs - so I suppose it must be best to combine a1 to a1 region and so on, rather than a1 to a8. Difficult to wrap head around.
I agree with this. However, it's very likely that the history inputs are mostly irrelevant, as Daniel Shawul mentioned.
well, for me, it is clear that they, or some form of equivalence, are vital. Attempts at explanations have met with uniform blank looks or raised eyebrows, so I’ll just stick with this view, and we’ll see. It won’t be the first time.
jackd
Posts: 25
Joined: Mon Dec 10, 2018 2:45 pm
Full name: jack d.

Re: A0 subtlety

Post by jackd »

If the input is always oriented for the side to move, then should the policy output also be mirrored for black? Like if the best move was g8f6 the policy output would b1c3?
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: A0 subtlety

Post by Daniel Shawul »

jackd wrote: Fri Feb 15, 2019 9:06 pm If the input is always oriented for the side to move, then should the policy output also be mirrored for black? Like if the best move was g8f6 the policy output would b1c3?
I always evaluate for white to move, so the board has to be flipped horizontally when it is black to move and ofcourse all moves are flipped as well
So g8f6 becomes g1f3 (not b1c3). Btw this has nothing to do with your original question of history planes.

@chrisw Good point on the a1->a8 mapping. Indeed the innder dot product over the volume (channels) will be messed up if the history planes are not aligned properly.
jackd
Posts: 25
Joined: Mon Dec 10, 2018 2:45 pm
Full name: jack d.

Re: A0 subtlety

Post by jackd »

@Daniel Shawul

How strong is your policy network on it's own?