Open djm0539 opened 3 years ago
The world_init_swarm.m will initialize the world with "str1" - size of environment, and "str2" - number of agents/robots. You cannot import the file because there is no parameter file of the environment yet (the positions of the agents and obstacles, etc.)
Now, before running "create_environment.m", you may notice a line:
filename = strcat('../data/environmentswarm',num2str(sizeworld),'',num2str(agent_num),'.mat'); This specifies that the information of the environment will be saved to a .mat file in the Folder called "data". You need to create a folder named "data". Then run the code "create_environment.m"
You can manually edit the script to generate the number of agents and size of environment, and even the locations of the agents and obstacles as you like.
I think the main reason why you cannot run the main code is because there is no environment file (.mat) yet. And also, you need to change the code where you declare the location of the files so that they match with each other. This you need to figure out on your own as you may have configured the directories different from mine.
If you face further issue, please tell me.
dear teacher I have get all data under your guidance now I want to generate the image by ScalableAnalysis.m and sensitivity_analysis.m but i get a blank imagine so i want to get the solution do i need to create a folder for files_share_9 and Folder_ROI?
dear teacher I have get all data under your guidance now I want to generate the image by ScalableAnalysis.m and sensitivity_analysis.m but i get a blank imagine so i want to get the solution do i need to create a folder for files_share_9 and Folder_ROI?
You need to create a folder for files_share_9. you can comment out the code related to Folder_ROI as you possibly do not need it.
I am not sure what problem you are facing. Can you provide some screenshot of the errors that you face and the project directory.
Maybe you can comment out the code lines that involve the use of data like share_4 or share_16 if you do not have them at the moment. The image will then show the figure of the files_share_9 only. Again I am not sure what issues you face until I see what happens.
I have sent you an email there are two picture
hello teacher. I have run your code completely . First of all, thank you for solving my doubts , Secondly, I would like to ask a question. If I want to join a formation-containment controller ,I need to add it to which folder or what would need to be changed ,And it would be better if you can provide some source of code about this controller . Looking forward to your response
Sorry that I have not responsed promptly to your previous question. It's wonderful that you can figure out and run the code successfully.
Regarding your question, I am not sure what your question is. Are you asking how to build a formation-containment controller with the idea of this code? Or are you asking about how to implement this code as a component of the formation-containment controller that you are working on?
Honestly, I do not have much experience in designing a formation-containment controller. This code is an initial study on how to use Reinforcement Learning to form a specific formation. Now, this means that it has a lot of potential to actually deploy in a real system to create a formation to do a lot of applications. However, I also believe that this code is not mature enough to actually be applied in a formation-containment controller yet.
This does not mean it is not possible though. There are a way to apply this algorithm to solve such problem. The SQL algorithm in this github is for the agent to form a shape that the user designs. For a full formation-containment problem:
why fail to importdata cant open file
fail to world_init_swarm file = importdata(filename);
fail to SQL [NumberStateRows,NumberStateCols,flag_num,agent_num,obstacle_num,flag_position,obstacle_position,agent_position,ROI_area] = world_init_swarm(str1,str2);
fail to main SQL('50','4')
I have study sometimes,please teache me ,thanks