concepts.dm.pdsketch.planners.solution_score_tracker.MostPromisingTrajectoryTracker#

class MostPromisingTrajectoryTracker[source]#

Bases: object

This is a tracker for tracking the most promising next action, used in joint learning settings where we don’t have knowledge about the actual transition function or the goal.

Methods

check(new_score)

If the new score is better than the current best score, return True.

update(new_score, solution)

Update the best score and the solution.

Attributes

threshold

A score threshold.

best_score

The best score achived so far.

solution

The solution associated with the best_score.

__init__(threshold)[source]#

Initialize the tracker.

Parameters:

threshold (float) – the threshold for the score.

__new__(**kwargs)#
check(new_score)[source]#

If the new score is better than the current best score, return True.

Parameters:

new_score (float) – the new score.

Returns:

True if the new score is better than the current best score.

Return type:

bool

update(new_score, solution)[source]#

Update the best score and the solution.

Parameters:
  • new_score (float) – the new score.

  • solution (Any) – the new solution.

best_score: float#

The best score achived so far.

solution: Any#

The solution associated with the best_score.

threshold: float#

A score threshold.