Wrong suming output in simulink r2023A

조회 수: 1 (최근 30일)
Joshi Kumar V
Joshi Kumar V 2024년 4월 6일
답변: Steven Lord 2024년 4월 6일
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.

답변 (1개)

Steven Lord
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)
ans = 256
The fact that these two numbers differ by a power of 2 makes me suspicious that there's some conversion with wrapping going on.

카테고리

Help CenterFile Exchange에서 Reinforcement Learning에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by