Skip to content

Solver: Combine goal-ordering heuristics more effectively by assigning scores to goal choices #3488

Open
@grayjay

Description

@grayjay

@kosmikus mentioned this in #3453 (comment).

The scoring would be similar to the scoring described in #2860, except that it would apply to goals, instead of package, flag, and stanza choices. Scoring all nodes might actually be a simplification after #2860 is implemented.

Currently, the solver applies goal-ordering heuristics by either stably sorting the available goals or pruning non-preferred goals (when other goals are available). This approach gives too much weight to some of the heuristics, particularly the earlier pruning steps. Pruning is also problematic because it leaves fewer goals for features like --reorder-goals and "dynamic goal reordering" to work with. See #3453 (comment).

If heuristics were instead expressed as scores on goals, then the heuristics could be combined in a way that gives more control over their relative impact on the goal order that is used to explore the tree.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions