I have a question about reinforcement learning example

I have a question about reinforcement learning example

ting_wei_h
Not applicable
18 Views
4 Replies
Message 1 of 5

I have a question about reinforcement learning example

ting_wei_h
Not applicable

[ FlexSim 23.0.0 ]

Image.png

I want to know what this official website provides

int done = (Model.time > 1000);

Does this mean that it will calculate the value of Reward every 1000 seconds?

0 Likes
Accepted solutions (1)
19 Views
4 Replies
Replies (4)
Message 2 of 5

kavika_faleumu
Autodesk
Autodesk
Hey @Ryan_Wei, could you please reupload your image? I'm unable to see it. Thank you!
0 Likes
Message 3 of 5

ting_wei_h
Not applicable

I'm so sorry

Here is the image:

1694875374763.png

0 Likes
Message 4 of 5

moehlmann_fe
Explorer
Explorer
Accepted solution

The reward function passes an array with two elements to the reinforcement learning algorithm. The first value ist the reward itself. The second value controls whether the algorithm continues the current simulation run (0) or concludes the run and starts a new one (1).

(Model.time > 1000) evaluates either to 0 or 1, depending on the current time in the simulation. So the first time the reward is send after the simulation passes 1000s, a new replication will be started.

Message 5 of 5

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Ryan_Wei, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes