question

Enoch avatar image
0 Likes"
Enoch asked Enoch commented

Reinforcement Learning tutorial training Problem

I followed the reinforcement learning tutorial. i don't understand why is there an error and how to solve this. I'm using python3.10.4.2023-12-20.png

FlexSim 24.0.0
reinforcement learningpython
2023-12-20.png (71.4 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Guldberg avatar image
1 Like"
Guldberg answered Enoch commented

The Gym API changed and requires more parameters now. I think that was the issue when I ran it. The python have to be updated to account for this. If you are not super into python, dump the code and the error message into chatGPT and it will help you resolve it.

At some point Flexsim should probably update the tutorial code.


· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Enoch avatar image Enoch commented ·
do you mean i need to update python3.10.4, or i need to fix the code?
0 Likes 0 ·
Guldberg avatar image Guldberg Enoch commented ·

Fix the code. Its the Gym lib that is causing the issue, not the python version.

You can try with the attached version. Just remember to change the paths (as stated in the tutorial)

flexsimRL.zip

0 Likes 0 ·
flexsimrl.zip (143.2 KiB)
Enoch avatar image Enoch Guldberg commented ·

i add a variable called truncated to avoid the error below. Is it ok if i fix like this? the code works fine but I'm concerned.

2023-12-20-174611.png


0 Likes 0 ·
Show more comments
Guldberg avatar image
0 Likes"
Guldberg answered

That should be fixed in the code I sent. Anyway chatGPT is your friend here, it will tell you what to change based on any error codes you give it. This is more related to python programming than Flexsim.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.