Train Multiple Agents for Area Coverage example not working
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to run example provided for RL learning "Train Multiple Agents for Area Coverage". Getting following errors:
- >> plotGrid-> Not enough input arguments.
- Error in plotGrid (line 15) -> if ~isequal(obstacles,-1)
- Error evaluating parameter 'Agent' in 'rlAreaCoverage/Agent A (Red)' Caused by: Unrecognized function or variable 'agentA'. Variable 'agentA' does not exist.
Could you please help with instrctions to run it successfuly?
https://in.mathworks.com/help/reinforcement-learning/ug/train-3-agents-for-area-coverage.html?s_eid=PSM_15028
댓글 수: 0
채택된 답변
Noah Prisament
2025년 2월 18일
Are you copying code blocks individually or using the command openExample('rl/TrainMultipleAgentsForAreaCoverageExample') to open the example? If you are doing the former, you may be missing a code block and causing these errors.
댓글 수: 2
Noah Prisament
2025년 2월 19일
편집: Noah Prisament
2025년 2월 19일
It looks like you are trying to manually run the model that is loaded using the Simulink UI. Instead you should run this model using the live script in the example. The workspace initialization in the live script is required in order to run the model, so all of the lines in the live script until at least line 114 need to be run in order for the model to work properly. Additionally, all of the lines until 136 need to be run in order to have the agents be trained.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Large-Scale Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!