- Home /
"AddReward" not adding reward: Unity mlagents
Hello, I'm working with "mlagents" with unity at the moment, but I ran into a problem.
Problem: When I call the function "AddReward", the Cumulative Reward does not go higher then the value i put in the "()"
for example:
AddReward(0.1f); //--- I add a reward
Debug.Log(GetCumulativeReward()); //--- Print Cumulative Reward
When i call this function it just jumps to 0.1 and stays there, even if I call it again, and the same if i put "-0.1" in (it jumps to -0.1 and stays there)
What i have treid:
Made sure I called "AddReward" and not "SetReward"
Used "SetReward" and just put "GetCumulativeReward() + 1" in the "()"
Both did not work
any fixes?
Update: GetCumulativeReward() Retruns the reward for that episode, not al the episodes, so there was not probelm
Answer by berrangejanko · Jan 24, 2021 at 07:27 PM
GetCumulativeReward() Retruns the reward for that episode, not al the episodes, so there was not probelm
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How angry bird's "GAME OVER" system work? 2 Answers
Stop enemies from grouping up 1 Answer
I'm A beginner 1 Answer
Need help applying gravity using C# 2 Answers