leabra icon indicating copy to clipboard operation
leabra copied to clipboard

TD algorithm not reflecting negative externally-delivered reinforcements (i.e., NegPV)

Open thazy opened this issue 4 years ago • 0 comments

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 } } }

thazy avatar Apr 27 '20 23:04 thazy