Commit 9ea86925 authored by Nicola Gatto's avatar Nicola Gatto

Fix test reward function to new CoCo check

parent 3c4ca5bc
...@@ -3,10 +3,14 @@ package cartpole.agent.reward; ...@@ -3,10 +3,14 @@ package cartpole.agent.reward;
component Reward { component Reward {
ports ports
in Q^{4} state, in Q^{4} state,
in B isTerminal,
out Q reward; out Q reward;
implementation Math { implementation Math {
Q rew = state(1); if isTerminal
reward = rew; reward = -1;
else
reward = 1;
end
} }
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment