I’ve been working through some tutorials, and keep getting to the part about training the agents using a particular tool. If I understand it correctly, the brain models that this training process generates can be assigned to agents in unity editor and will control the agent at runtime.
I can certainly see how this tool is useful for running through many generations as quickly as possible. However, I’m working on an evolution simulator and want to use ML-agent brains for the “instincts” that are passed down to descendants. So, I’d like to be able to create new/random brains, as well as copy existing ones, with and without varying amounts of “mutations”. It seems like I need to use a sub-set of stuff the trainer tool does when it runs, but only when the simulation actually calls for it.
I’ve tried creating new NNModel’s and NNModelData’s using ScriptableObject functions, and assigning the result to an agent’s Behavior Parameters component: but this just generates a bunch of runtime errors when I assign it.
How do I manually create, copy and mutate these brains, at runtime?