question

mark zhen avatar image
1 Like"
mark zhen asked Jeanette F commented

THE REINFORCEMENT LEARNING problem

我的路徑貼進去後,並沒有將flexsim正確地跑出來,我想知道問題發生在哪裡

1659939854633.png

1659939861967.png

還有一個問題我已經確認安裝好 beasline3了!但我還是發現了一些問題我確定我是有下面的介面的,可以幫我解決這個問題嗎?1659963600969.png

1659965839620.png

FlexSim 22.0.0
reinforcement learningpythonmachine learning
1659939854633.png (15.4 KiB)
1659939861967.png (28.3 KiB)
1659963600969.png (18.4 KiB)
1659965839620.png (8.6 KiB)
· 4
5 |100000

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

David Seo avatar image David Seo commented ·

Hi. @mark zhen

There is no rule that only English should be used in this forum site, but I think it is polite for each other who uses this site to use English for everyone who accesses here if possible.
Of course, members in non-English speaking countries, including you and me, are not familiar with English. However, I think it would be good to share the knowledge of this site to express it in English even by your turning a translator for everyone.
My writing doesn't harm you, so I hope there's no misunderstanding. It's my personal opinion.

2 Likes 2 ·
mark zhen avatar image mark zhen David Seo commented ·

謝謝你的回复,不過我之所以會用中文,主要是怕翻譯後無法表達清楚我想要表達的意思。

0 Likes 0 ·
mark zhen avatar image mark zhen mark zhen commented ·

Thank you for your reply, but the main reason why I will use Chinese is that I am afraid that after translation, I will not be able to express what I want clearly.

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @mark zhen , was Jordan Johnson'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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson commented

In your first question, you say that the python script does not run correctly because it gets stuck "waiting for FlexSim to connect". The previous message indicates that FlexSim is opening a model called StatisticsCollectorTutorialModel.fsm. That model doesn't have a Reinforcement Learning tool in it, so it cannot connect to the python script.

In your second question, you ask about why Visual Studio Code is underlining the stable_baselines3 import statements. There are two possible reasons. The first is that Visual Studio Code is not configured to use the correct python interpreter. You can have many python interpreters installed on your computer, but Visual Studio Code will only use one. The second reason is that Visual Studio Code is just out of date with your python installation. I don't know how often it checks to see if your import lines are correct. You show a picture of the correct output for the script so perhaps it is a highlighting issue in Visual Studio Code.

Please contact your local distributor for further support:
[email protected]

· 12
5 |100000

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

mark zhen avatar image mark zhen commented ·

@Jordan Johnson

Hello the first one I know a few problems, but I have tried to check and I found no problems,


The second problem, I don't know how I solved it, I just tried again and it was successful.


I still have some new problems,


The third problem is that i followed the steps of any instructable guide i started my python but nothing happened, (my p1 shown)


The fourth question is what I want to ask about the training part I can freely compile? For example, can I find some programs about reinforcement learning on the Internet that can be directly applied to it? Or do I have some other format specification that must be followed?


The fifth question is my part about the teaching guide I understand what the data representation means when training the model

1660066658896.png

p1

1660067101166.png

0 Likes 0 ·
1660066658896.png (114.7 KiB)
Jordan Johnson avatar image Jordan Johnson ♦♦ mark zhen commented ·

Third problem: flexsim_inference.py creates a server that uses the trained brain. Once you start the server, you can use the option in the Reinforcement Learning Tool, in the On Request Action trigger, to Query a Server for an Action. Then you can run the model. When the model calls requestdecision(), or when one of the decision events happen, the model will query the server for the next action. If training worked well, the model will perform well, because can use the trained brain.

Fourth question: you are free to use any part of the python scripts however you want. If you find another Reinforcement Learning framework, you can use the scripts we provide as an example. You can see that flexsim_environment.py communicates with FlexSim over a socket. If you use a new framework, you will need to learn how to translate FlexSim's responses into the correct data types needed by your framework.

Fifth question: I'm sorry I don't understand your fifth question. Can you ask another way?

0 Likes 0 ·
mark zhen avatar image mark zhen Jordan Johnson ♦♦ commented ·

This is currently displayed in vs but I don't see any information about the pageThe fifth question is that I want to understand that there are a lot of parameters in the trained model. Can you explain some key parameters?1660070750299.png

0 Likes 0 ·
1660070750299.png (17.0 KiB)
Show more comments