I am trying to understand the implementation of Tapered Eval in Fruit: https://www.chessprogramming.org/Tapere ... on_example
PawnPhase is 0 there, and therefore all multiplications with PawnPhase are useless, and actually TotalPhase is just 24 and not 256 like the code suggests, hence the phase is between 0 and 24.
I have also checked the sources of Fruit and it looks like the copy of it in the wiki is correct.
Did I miss something here?
Tapered Eval in Fruit
Moderators: hgm, Rebel, chrisw
-
- Posts: 57
- Joined: Fri Jul 23, 2021 5:24 pm
- Location: Elin Pelin
- Full name: Guido Flohr
-
- Posts: 879
- Joined: Mon Dec 15, 2008 11:45 am
Re: Tapered Eval in Fruit
I guess this will provide you the answer.gflohr wrote: ↑Thu Sep 16, 2021 1:25 pm I am trying to understand the implementation of Tapered Eval in Fruit: https://www.chessprogramming.org/Tapere ... on_example
PawnPhase is 0 there, and therefore all multiplications with PawnPhase are useless, and actually TotalPhase is just 24 and not 256 like the code suggests, hence the phase is between 0 and 24.
I have also checked the sources of Fruit and it looks like the copy of it in the wiki is correct.
Did I miss something here?
Especially this part
-
- Posts: 489
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Tapered Eval in Fruit
The last line of the code you linked to scales phase to [0,256] assuming integer arithmetic. I would guess because phase changes slower than eval is called, so you can use shifts in eval not division for the tapering.
Last edited by op12no2 on Thu Sep 16, 2021 8:57 pm, edited 1 time in total.
-
- Posts: 57
- Joined: Fri Jul 23, 2021 5:24 pm
- Location: Elin Pelin
- Full name: Guido Flohr
Re: Tapered Eval in Fruit
But doesn't that essentially ignore the number of pawns on the board?
-
- Posts: 489
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
-
- Posts: 57
- Joined: Fri Jul 23, 2021 5:24 pm
- Location: Elin Pelin
- Full name: Guido Flohr
Re: Tapered Eval in Fruit
Okay, but why? Aren't 16 pawns on the board very middle-game and zero very end-game?
-
- Posts: 489
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Tapered Eval in Fruit
I don't think there is a good answer other than it seems to work; amongst probably endless other schemes (some including pawns) that also work. The weights can also be tuned, so pick something that seems sensible to you and then tune later perhaps.
-
- Posts: 57
- Joined: Fri Jul 23, 2021 5:24 pm
- Location: Elin Pelin
- Full name: Guido Flohr
Re: Tapered Eval in Fruit
I will try to update the wiki. And kudos for Lozza, btw.
-
- Posts: 489
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins