diff --git a/demo/include/demo/cost_estimator.hpp b/demo/include/demo/cost_estimator.hpp index 1b6c441..eaf442f 100644 --- a/demo/include/demo/cost_estimator.hpp +++ b/demo/include/demo/cost_estimator.hpp @@ -11,6 +11,9 @@ namespace demo { +/** + * @brief The CostEstimator estimates a cost quantity for a given command to be used as a decision heuristic. + */ struct CostEstimator : public arbitration_graphs::CostEstimator { struct Parameters { /// @brief The radius of the neighborhood around the end of the path that is checked for dots. @@ -22,6 +25,13 @@ struct CostEstimator : public arbitration_graphs::CostEstimator { : environmentModel_{std::move(environmentModel)}, parameters_{paramters} { } + /** + * @brief Estimate the cost of a command. + * + * The cost is estimated using two metrics: The steps per dot along the path and the dot density at around the end + * of the path. This is done to balance the short-term gain by following a path with many dots and the long-term + * gain by moving towards a promising area. + */ double estimateCost(const Command& command, bool /*isActive*/) override; private: