if devaluation:
if t < self.trials - self.trials_test:
U = U[0]
else:
U = U[1]
Wouldn't it be better to keep U an array, and just change the corresponding entry? It would throw an error later anyway, when self.env.obtained_rewrads(t,U) is called, as that function expects an array of size > 2.
In
run agent()
, there is this piece of code:Wouldn't it be better to keep
U
an array, and just change the corresponding entry? It would throw an error later anyway, whenself.env.obtained_rewrads(t,U)
is called, as that function expects an array of size > 2.