Hello there,
How does one (typically) implement left/right imbalance ? What first comes to my mind is simply counting the pieces on the left and right side of the board but that seems to be a little too "unprecise".
(Happy holidays )
Greetings from germany
Left/right imbalance checkers/draughts
-
- Posts: 20
- Joined: Mon Oct 17, 2016 09:05
- Real name: Robin Messemer
Re: Left/right imbalance checkers/draughts
You can count the pieces for white and black in the board columns in a clever way, and then take the absolute difference.
A good example you can find in the source code of Scan.
In NNUE (see other posts in this forum) you don't need to do that, as features are extracted within the NN, which is the beauty of NN, but also creates a black box approach.
Bert
A good example you can find in the source code of Scan.
In NNUE (see other posts in this forum) you don't need to do that, as features are extracted within the NN, which is the beauty of NN, but also creates a black box approach.
Bert
-
- Posts: 859
- Joined: Sat Apr 28, 2007 14:53
- Real name: Ed Gilbert
- Location: Morristown, NJ USA
- Contact:
Re: Left/right imbalance checkers/draughts
edit: I tried to give a simple explanation, but I got it wrong. For the white men on the left side of the board, sum the distances of the men to the horizontal center. Do the same for the right side. Subtract the left side sum from the right side sum, and take the absolute value of the difference. That is white's balance term.How does one (typically) implement left/right imbalance ? What first comes to my mind is simply counting the pieces on the left and right side of the board but that seems to be a little too "unprecise".
-- Ed
Re: Left/right imbalance checkers/draughts
Thanks Ed,Ed Gilbert wrote: ↑Wed Dec 30, 2020 13:25edit: I tried to give a simple explanation, but I got it wrong. For the white men on the left side of the board, sum the distances of the men to the horizontal center. Do the same for the right side. Subtract the left side sum from the right side sum, and take the absolute value of the difference. That is white's balance term.How does one (typically) implement left/right imbalance ? What first comes to my mind is simply counting the pieces on the left and right side of the board but that seems to be a little too "unprecise".
-- Ed
what about white men above the horizontal center? Do they count or are ignored?
If they count their distance to the horizontal center would be negative compared to men below the horizontal center wouldn't they?
Maybe you consider the absolute distance in this case.
best regards,
Alvaro
-
- Posts: 859
- Joined: Sat Apr 28, 2007 14:53
- Real name: Ed Gilbert
- Location: Morristown, NJ USA
- Contact:
Re: Left/right imbalance checkers/draughts
Perhaps you misunderstood what I meant by horizontal center. Squares 3, 13, 23, 33, 43 have a distance of 1 to the center, as do 8, 18, 28, 38, and 48. Squares 9, 19, 29, 39, 49 have a distance of 3 to the center, as do 2, 12, 22, 32, and 42. The general idea is to encourage a roughly equal distribution of men between left and right sides, so that one flank is not under-protected.Alvaro wrote: ↑Mon Feb 01, 2021 20:24what about white men above the horizontal center? Do they count or are ignored?
If they count their distance to the horizontal center would be negative compared to men below the horizontal center wouldn't they?
Maybe you consider the absolute distance in this case.
I don't know if this is sound draughts strategy or not. Perhaps there are better ways to do it.