Wrong suming output in simulink r2023A
2 次查看(过去 30 天)
显示 更早的评论
Greetings!
We are training a reinforcement learning agent using the R2023a version in Ubuntu 22.04 LTS. We have built a reward block that should result in a reward value of -150 when the input is under a particular range. We have observed that the input to the summing block in the reward function is of value -150 (-100, -50, 0, 0) while the output of the sum block is of value 106
When we tested with constant values, as shown in the attached image, the sum block resulted in a value of -150, as intended.
This has affected the training of agents drastically.
0 个评论
回答(1 个)
Steven Lord
2024-4-6
I don't work with Simulink that much, but I'd check the data types of the various signals in your code.
106 - (-150)
The fact that these two numbers differ by a power of 2 makes me suspicious that there's some conversion with wrapping going on.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!