Skip to content

Commit

Permalink
safety tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lshoek committed Aug 19, 2020
1 parent 35822fb commit 41711bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Artifact/AestheticEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ std::vector<double> AestheticEvaluator::evaluate(cv::Mat im)
if (!isnan(result)) {
aestheticReward = result;
}
else {
// for safety
IC = 0.0;
PC = 0.0;
PCt0 = 0.0;
PCt1 = 0.0;
PCdiffRaw = 0.0;
}
}

// Make aesthetic reward partly proportional to the coverage reward to prevent high rewards for low coverage artifacts
Expand Down
1 change: 1 addition & 0 deletions src/Simulator/SimulationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ void SimulationManager::startSimulation()
if (!bHasSimulationId) {
_uniqueSimId = info.ga_id;
_simDir = NTRS_SIMS_DIR + '/' + _uniqueSimId + '/';
bHasSimulationId = true;
ofLog() << ">> Simulation ID: " << _uniqueSimId;
}
else if (_uniqueSimId != info.ga_id) {
Expand Down
3 changes: 3 additions & 0 deletions src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ void ofApp::imGui()
if (ImGui::Begin("Overlay", NULL, flags | ImGuiWindowFlags_NoScrollbar)) {
ImGui::Text("Meta");
ImGui::Separator();
if (simulationManager.isInitialized()) {
ImGui::Text(&simulationManager.getUniqueSimId()[0]);
}
ImGui::Dummy(margin);

glm::vec3 cpos = simulationManager.getCamera()->getPosition();
Expand Down

0 comments on commit 41711bf

Please sign in to comment.