Closed mbalesni closed 3 years ago
Hello, I've made this environment using the version of ML-Agents of December 2019. But I'm confused I can't find what version it was. In the packages file there is no indication of the ML-Agent version. It was the version published between november and december 2019.
"I tried versions of MLAgents from 1.5.0-preview (local from the repository) to 0.16.0-preview (from Unity registry). Older versions resolve the "namespace not found" issues, but still have the "no suitable method to override" errors." However, you shouldn't use an older version of ML-Agents to use this environment since a lot of things have changed.
This environment is not suitable anymore for new ML-Agents versions.
"methods that way, and I think there's a bigger difference there than a name change.": The only solution I have for you, is that you can update the environment by using another environment (such as Pyramids) and looking at PyramidsArea.cs and PyramidsAgent.cs code to see the difference between MayanAdventure code and new Unity ML-Agents version code (most of the differences will be I think in Action and Initialize methods). I don't think there are tons of modifications to make but the best way to update it is really to see the differences in terms of functions between a working environment (such as Pyramids) and this one.
Have a nice day,
Hey @simoninithomas, thanks for the suggestion, the Pyramids example did help me figure out the necessary updates and everything works now. Thank you!
@nick-baliesnyi can you please share the changes?
I have looked at the file from pyramid agent and there is no indication of how to change the CollectObservations, Heuristic and AgentReset methods. Thanks!
@markbugeja sure! You can see the changes I made here. This works for me with MLAgents Release 10, Unity 2019.4.15f1.
I should probably create a pull request with the changes later this week.
@nick-baliesnyi thanks! I will take a look 👍
I am setting up the environment using the Unity ML Installation docs, as suggested in the Readme, and am running into issues of what I think is version mismatch between the environment's
MayanAdventureAgent.cs
script and theAgent
class from MLAgents Unity package.As seen in the screenshot below, the script is failing when tries to inherit the Agent class and override some of its methods.
What I tried so far:
I tried versions of MLAgents from
1.5.0-preview
(local from the repository) to0.16.0-preview
(from Unity registry). Older versions resolve the "namespace not found" issues, but still have the "no suitable method to override" errors.I tried to manually resolve the version mismatch by modifying the
MayanAdventureAgent.cs
script. I solved the "namespace not found" issues by replacingusing MLAgents;
withusing Unity.MLAgents;
, as I saw used by the package itself. I also fixedInitializeAgent
andAgentAction
"no suitable method to override" errors by renaming them to their up-to-date namesInitialize
andOnActionReceived
. However, I couldn't solve the issues withCollectObservations
,Heuristic
andAgentReset
methods that way, and I think there's a bigger difference there than a name change.Unity versions tried
The question: Is there a known setup that can run the environment without problems?