ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Training multiple brains simultaneously using curricula

Open drArthur opened this issue 8 years ago • 5 comments

Hi, I'm looking into training multiple brains simultaneously while also using curriculum. Is it even possible? And if it is, which brain's reward is being measured in order to change the lesson?

drArthur avatar Apr 16 '18 17:04 drArthur

It is possible to train curriculum with multiple brains but it is a little bit tricky. If you look at the _get_progress method of the trainer_controller.py script, this is how the progress is defined.

  • If the thresholds are in progress setting, the progress is defined as the average across brain of step / max_step.
  • If the the thresholds are in reward setting, the progress is defined as the sum of the rewards across brains. I hope this helps.

vincentpierre avatar Apr 16 '18 20:04 vincentpierre

Thanks! This helps me a lot. I'll probably try to edit the code a bit, so that the reward thresholds can be set for both brains seperately, and the lesson is changed when each threshold is met.

drArthur avatar Apr 17 '18 05:04 drArthur

HI @drArthur,

If you end up implementing this, we'd be happy to potentially accept it as a PR. I know others have brought up the desire for more control over per-brain reward thresholds when setting the curricula as well.

awjuliani avatar Apr 17 '18 16:04 awjuliani

This is a feature we are actively working on. Going to be closing this issue for now.

awjuliani avatar Jun 28 '18 21:06 awjuliani

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.

github-actions[bot] avatar Jan 29 '21 02:01 github-actions[bot]