Hello everyone,
I’m copying this together from the example-sourcecode of the unreleased master. So some of the terminology might be outdated.
Making use of curriculums enables us to change the environment by providing external parameters in the curriculum.json file.
To stick to the examples that file could look like this:
{
"measure" : "progress",
"thresholds" : [0.1, 0.3, 0.5],
"min_lesson_length": 100,
"signal_smoothing" : true,
"parameters" :
{
"small_wall_height" : [1.5, 2.0, 2.5, 4.0]
}
}
To access these values in Unity you can use the Academy-Singleton like this:
m_Academy.FloatProperties.GetPropertyWithDefault("small_wall_height", 4)
But how do you guys debug your code with a construct like this? E.g. have the property have different values to test your setup without calling mlagents-learn every time you want to test a different value?
I can think of multiple ways:
#1 change the default value in the argument of GetPropertyWithDefault
this is OK for small projects where every parameter is only used once in code. If you access the parameter in multiple places, you have to change the default value multiple times. That gets messy fast.
#2 call GetPropertyWithDefault at every episode start, and store parameters in variables
Check if it returns the default-value. If it can’t get a value, overwrite the variables with debug-parameters.
This seems to be the go-to solution, but you loose the convinience of using the Academy-singleton. And you’ll need an extra class.
#3 somehow write values into EnvironmentVariables without using sidechannels
In my opinion this would be the most elegant solution. Now, if that script parses a json-file directly, these variables are supplied hardcoded, or in the GUI is of secondary nature.
Has anybode written anything like this and could share their code?
#4 ?
I’m overlooking something, and everything is much easier than I think
Input to this is welcome