I am making an ML agent that modifies different noise and height parameters on a generated terrain mesh.
Is there some way for me to:
- Tell the agent to make a change to the parameters of the noise (I am doing this with OnActionReceived)
- Wait till the terrain chunks have been generated to collect observations on the generated terrain(About 2 seconds till the terrain is generated)
- AFTER the generation is completed(2-3 second delay), assign a reward based on the calculated parameters of the terrain and end the episode
- Start a new episode and reset the generator to random noise, make the agent take a new action and generate terrain
I am quite stuck on 2 and 3. I was thinking of delaying the generator taking an action using the DecisionRequester but I am quite stuck as to how I can make the agent wait for the generation to complete and then add a reward.
Is there some way for me to make it a decision every 5 seconds and then collect observations/assign rewards after the terrain is generated?