Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The option curriculum was specified in your YAML file, but is invalid. #1

Open
praslisa opened this issue Nov 3, 2020 · 8 comments

Comments

@praslisa
Copy link

praslisa commented Nov 3, 2020

Hello,
I am getting this error when trying to train:
mlagents.trainers.exception.TrainerConfigError: The option curriculum was specified in your YAML file, but is invalid.

Any advice?

Thanks

Monica

@adamprice97
Copy link
Owner

adamprice97 commented Nov 5, 2020

I think ml-agents has changed the way it handles curriculums. You'll have to update the curriculum file: https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Training-ML-Agents.md#curriculum

Or, you could use an older version of ml-agents.

@praslisa
Copy link
Author

thanks!

@praslisa
Copy link
Author

I am wondering in your code, you have 3 agents, all the 3 agents have their own neural network when training? Thanks!

@adamprice97
Copy link
Owner

No, they all actually train the same NN, but the input vector is unique from each agent (i.e hunter agent one always the first two variables on the input array). This set up was just something I was playing with at the time, but I don't recommend it. You would likely get better results if 3 separate NN were trained, one for each agent, but I couldn't find a clear way to do that in ML-Agents when I made this.

@praslisa
Copy link
Author

Hi Adam,

Thanks for your response! Where do you specify agent 1 submits observations for the first 2 variables, agent 2 for the next 2 variables? Where do you have this setup?
Also any recommendations on how to train 3 neural networks based on your prior research? I was thinking to try to train them one at the time with the goal to just collide with the pray and after that put the 3 agents together with their own nn models. Not sure if this would work. What do you think?

Thanks a lot!
Monica

@adamprice97
Copy link
Owner

adamprice97 commented Nov 13, 2020

The observations are set in the inspector, but looking at it again, the version on github actually doesn't use the input vector I described, and instead, the control agent is always the first 2 input vars:

Unity_2020-11-13_11-32-23

'I was thinking to try to train them one at the time with the goal to just collide with the pray and after that put the 3 agents together with their own nn models.'

This will only work to an extent. You would likely get issues with the input vector as it assumes there are 2 other hunter agents present. If trained without them present, you could get issues when they are introduced.

I haven't looked into training multiple agents at once in ML-Agents. You could create a different nn for each agent and alternate which nn is trained throughout the training. i.e 200.000 steps on agent1, then 200,000 steps on agent2, then agent3 and back to agent and so on. This would be tedious unless you find a way to automate it.

You could also try just training one NN that outputs an action vector for each agent, so it would be 8 vars in and 6 vars out. This would likely train faster than the current approach, but it would change some of the nuances of the project as the agents wouldn't be independent.

@praslisa
Copy link
Author

Thanks Adam for your suggestions! Do you know if the neural network is multi-threaded in unity? For example if there are 5 agents and only 1 neural network, while training, the agent observations are sent to NN from only one particular agent ( ie just 1 agent that sends observations to the nn) or is the NN multi-threaded and its taking observations from all 5 agents concurrently?

Thanks a lot!

@adamprice97
Copy link
Owner

Observations are stored in the training algorithm's memory, so you can use as many agents as you want to train a single NN. Threading doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants