In td.go file of pbwm package, the function on the RewInteg layer does not reflect NegPV values clamped on the Rew layer. Note how plus phase Act takes only nrn.Ge value as its current Reward value, which presumably reflects the net input fm Reward layer only and Ge is positive-rectified? Here is the relevant function:
func (ly *TDRewIntegLayer) ActFmG(ltime leabra.Time) {
rply, _ := ly.RewPredLayer()
if rply == nil {
return
}
rpActP := rply.Neurons[0].ActP
rpAct := rply.Neurons[0].Act
for ni := range ly.Neurons {
nrn := &ly.Neurons[ni]
if nrn.IsOff() {
continue
}
if ltime.Quarter == 3 { // plus phase
nrn.Act = nrn.Ge + ly.RewInteg.DiscountrpAct
} else {
nrn.Act = rpActP // previous actP
}
}
}