A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'ML-Agents' started by ki_ha1984, Apr 22, 2020.
Is there any way to add dynamically the values of the behavior parameters with c#?
I do not understand the question. It is possible to edit the behavior parameters via script when creating the Agent. It is NOT possible to modify the behavior parameters once the Agent started requesting decisions. We recommend using prefabs to store the values of behavior parameters and to simply instantiate the prefab.
the problem is that I want to add Branch Sizes and the Space Size of the Vector observation within an Awake() function with C#.
When the Agent awakens, the Behavior Parameters are already registered. Maybe you could modify your Agent class to be :
public void OnEnable()
var behaviorParameters = GetComponent<BehaviorParameters>();
// Modify the values of behaviorParameters
This way you can have some code called before the Agent is enabled (and registers its behavior parameters)
On the other hand, I really think you should know before hand what is the observation and action space of the agent.
This is a bit old but I'm facing the same question.
In my case the reason I don't know the action space before hand it's because it will depend on the amount of data provided for the learning scenario. I'm working on a Production Plan automatic creation and depending on the amount of requirements and customers it will be how the model will be trained.