Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.17k stars 4.16k forks source link

Not able to add reward signals using gail_config.yaml #2452

Closed rajatpaliwal closed 5 years ago

rajatpaliwal commented 5 years ago

Hello, While trying to add reward signals in gail_config.yaml I am receiving an error saying

yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "config/gail_config.yaml", line 126, column 1

I tried removing tab characters to 2 spaces but didn't work.

Kindly help.

xiaomaogy commented 5 years ago

I think posting your .yaml file would help us see where the issue is.

xiaomaogy commented 5 years ago

Your file seems correct. Maybe there is some hidden \t that's not showing up. I would recommend taking one of our existing .yaml and replace the fields directly in that file to fine out what's wrong.

rajatpaliwal commented 5 years ago

Yes, the problem was I was editing the .yaml file in visual studio that was adding \t instead of spaces and was giving out error. Editing in Notepad++ solved the issue.

Query regarding gail_config: We are performing offline behavioral cloning with added reward signals by using "gail_config" file. But I don't see any reward points being added while the training is taking place , also the student agent is barely learning anything compared to training with offline_bc_config.yaml file. Any views on this point.

ervteng commented 5 years ago

@rajatpaliwal reward signals only work with the "ppo" trainer, as you need PPO to learn to maximize the reward signal. To use BC with reward signals, you could use the pretraining feature of PPO with a 0 steps parameter.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity in the last 14 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had activity in the last 28 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.