My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
Tapered Eval
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Tapered Eval
Most use total pieces. Not sure why you would just use opponent pieces, except perhaps for king safety scaling.Robert Pope wrote:My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
-
- Posts: 793
- Joined: Sun Aug 03, 2014 4:48 am
- Location: London, UK
Re: Tapered Eval
It doesn't really matter in practice.Robert Pope wrote:My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
If there is a significant imbalance in material, the game is probably already won/lost anyways.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Tapered Eval
It does make the resolution twice as coarse, which has a negative effect.matthewlai wrote:It doesn't really matter in practice.Robert Pope wrote:My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
If there is a significant imbalance in material, the game is probably already won/lost anyways.
-
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Tapered Eval
What do you mean by bulky?
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Tapered Eval
I use opposing pieces as an index to the scaling factor. Pawns are not counted.
--Jon
--Jon
-
- Posts: 589
- Joined: Tue Jun 04, 2013 10:15 pm
Re: Tapered Eval
It is a bug to use the sum of pieces instead of opponent pieces. Think of king safety and passers. But it is a bug of the same order of magnitude as, say, worrying about opposite square colors for the bishop pair bonus: one of zero practical impact, if you consider winning or losing games. Many programs now copy the Fruit design with score tuples, and for that you need one scalar game phase. You don't need to follow.Robert Pope wrote:My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
Wether or not to ignore pawns is also rather arbitrary. The tuner will resolve any differences.
[Account deleted]
-
- Posts: 793
- Joined: Sun Aug 03, 2014 4:48 am
- Location: London, UK
Re: Tapered Eval
The steps are also twice as big though, with every exchange.bob wrote:It does make the resolution twice as coarse, which has a negative effect.matthewlai wrote:It doesn't really matter in practice.Robert Pope wrote:My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
If there is a significant imbalance in material, the game is probably already won/lost anyways.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
-
- Posts: 558
- Joined: Sat Mar 25, 2006 8:27 pm
Re: Tapered Eval
In fruit, stage is a simple function of pieces captured. In Abbess, the stage is a lookup of the 1071 possible permutations of pieces on the board: Index=Pawns*63 + Minors*7 + MajorsFerdy wrote:What do you mean by bulky?
so that every possible piece combination can have its own stage.
That is obviously bad, because I don't have adequate data to tune every combination. But at the same time, I disagree with a simple subtraction of pieces -- how much a Knight loss changes the phase should be different if you have only 5 pieces left than if it is in the first 5 moves. Also, you should be in 100% endgame well before you are down to K vs. K. So, I want to switch to something formula driven, but more tunable than just the parameters in Fruit.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Tapered Eval
Surely you don't mean a different "phase" for each side, since evaluation has to cover both sides? I don't see how this would be a "bug" at all. And doing it twice would have some computational cost.mvk wrote:It is a bug to use the sum of pieces instead of opponent pieces. Think of king safety and passers. But it is a bug of the same order of magnitude as, say, worrying about opposite square colors for the bishop pair bonus: one of zero practical impact, if you consider winning or losing games. Many programs now copy the Fruit design with score tuples, and for that you need one scalar game phase. You don't need to follow.Robert Pope wrote:My current code for game phase is really bulky, so I was looking at what some other programs do. I was reading a description of (I think) Rookie's evaluation, and I noticed that it was basing the game phase on the remaining pieces of the opponent, rather than all pieces. Is this common practice, or is it just as common to use all pieces?
While I was wondering about that, I wandered over to the chess programming wiki, and it appears that Fruit uses all pieces, but pawns have zero impact on the game phase. Did I read that right?
Wether or not to ignore pawns is also rather arbitrary. The tuner will resolve any differences.
If the piece counts are different for the two sides, I doubt the phase scaling matters much anyway, the game is already out of hand most of the time.