Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Discussion Switching between Inference and Heuristic Automatically

Discussion in 'ML-Agents' started by AOverton, Apr 20, 2024.

  1. AOverton

    AOverton

    Joined:
    Apr 7, 2023
    Posts:
    2
    Basically what I am trying to do is to train an agent with both inference and heuristic functions. If manual input is given, then take that action. If no manual input is given, use the inference functionality get actions.

    I am using ML-Agents for the training of the model.

    I have tried putting the option of a RequestDecision call in the Heuristic method. That did not work. It seems that if you have the Behavior Type set to Heuristic Only, it will not do anything with the RequestDecision call.

    It seems there should be a way to do this.

    Thanks in advance for your input.
     
  2. smallg2023

    smallg2023

    Joined:
    Sep 2, 2018
    Posts:
    154
    not sure i understand the question fully but if you use manual decision requesting it should be possible (i.e. use a control script that manually calls RequestDecision if no input was received from the user.

    note that if this is for training you'll want to have the input automated as training in real time is gonna take forever
     
  3. AOverton

    AOverton

    Joined:
    Apr 7, 2023
    Posts:
    2
    I tried calling the RequestDecision function from the Heuristic function, which is what has the manual control. It did not work. Is the inference functionality not available unless you have the Behavior Type set to Inference or Default?

    As to the matter of the time it takes to train, this is what I am trying to show. In general, neural nets take a while to train. I am wanting to compare the training performance of various training methods, including the mixed automated manual method.
     
  4. smallg2023

    smallg2023

    Joined:
    Sep 2, 2018
    Posts:
    154
    yes you will need to keep it in inference mode to let the AI act