Aufgrund einer Wartung wird GitLab am 19.10. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 19.10. between 8:00 and 9:00 am.

Commit adf69ddf authored by Nicola Gatto's avatar Nicola Gatto
Browse files

Add convenient methods for configuration

parent 18344e12
Pipeline #162444 failed with stages
......@@ -102,4 +102,22 @@ public class ConfigurationSymbol extends CommonScopeSpanningSymbol {
return this.entryMap.containsKey("learning_method")
? (LearningMethod)this.entryMap.get("learning_method").getValue().getValue() : LearningMethod.SUPERVISED;
}
public boolean isReinforcementLearningMethod() {
return getLearningMethod().equals(LearningMethod.REINFORCEMENT);
}
public boolean hasCritic() {
return getEntryMap().containsKey("critic");
}
public Optional<String> getCriticName() {
if (!hasCritic()) {
return Optional.empty();
}
final Object criticNameValue = getEntry("critic").getValue().getValue();
assert criticNameValue instanceof String;
return Optional.of((String)criticNameValue);
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment