Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Automated Hyperparameter Tuning for Machine Learning Agents

Discussion in 'Scripting' started by mbaske, Apr 28, 2018.

  1. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    fog9001 likes this.
  2. JPhilipp

    JPhilipp

    Joined:
    Oct 7, 2014
    Posts:
    56
    Thanks for sharing.

    I wonder if there's new tools in this field, in particular one's that independently and somehow smartly (maybe via machine learning itself) try to probe the hyperparameter combo space. Because doing one A/B test is feasible (if time-intensive), but considering that every parameter may need to be tuned in the context of tuning every other parameter... the combination count explodes!
     
  3. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    Yeah, the curse of dimensionality... AFAIK there's some research into ML automated hyperparameter search, but I'm not sure if any tools are readily available. An alternative could be bayesian optimization. I think I saw some projects on Github using a bayesian approach to finding hyperparameters, back when I was building my batch runner.
     
  4. ZenUnity

    ZenUnity

    Joined:
    Apr 21, 2013
    Posts:
    28
    Great tool, thanks for sharing. Do you have an updated version that works with the latest ml-agents?
     
  5. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    No sorry, the latest version is the one on Github.
     
  6. ademord

    ademord

    Joined:
    Mar 22, 2021
    Posts:
    49
    Hey guys, sorry that I am late to the party, anyone found or worked on maintaining a version of this project compatible with the current ML Agents? Hyperparameter search nowadays is kind of essential and would be great if we could use this tool or something similar
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,710
    One of these AI groups might have people more familiar with these "essential" things:

    https://forum.unity.com/categories/ai-navigation.542/

    Over here we code monkeys are still smashing the 0 rock against the 1 rock and seeing if anything fun happens.
     
  8. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    My bad - I posted this here before there was an ML Agents forum.
    I haven't updated the project because hacking the framework code, like I did back then, isn't easily maintainable. That would require adapting the code for every other ML Agents release. And to be honest, I've hardly used this myself, simply because I don't have the compute for doing extensive grid searches.
    I guess what would be more practical is a batch runner that sits on top of the framework. Something that can launch training processes and process their results, without having to hook into the underlying stuff and being tied to a specific version. Not sure how feasable that would be though, or if the framework provides a python interface one might utilize for that.
     
    Kurt-Dekker likes this.
  9. ademord

    ademord

    Joined:
    Mar 22, 2021
    Posts:
    49
    Thank you, I will look into making one myself then for my thesis project, and if it gets in good shape I'll post it here :)
     
  10. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    I'm happy to report there is now an updated single file solution that doesn't require any specific ML-Agents version. It pretty much works like described above. mbaske/ml-agents-hyperparams: Automated Hyperparameter Search for Unity ML-Agents (github.com)