Generate heuristic alternatives and keep local Pareto fronts in embedding space.
More...
Generate heuristic alternatives and keep local Pareto fronts in embedding space.
Support QDEvo's semantic survival and parent selection through callbacks.
Normalize each embedding before comparing cosine similarities. In
insertion order, find the first cluster where the candidate matches
every current member. A candidate competes only in that cluster. If
no cluster qualifies, it starts another one. Clusters retain their
identity after pruning. A callback can canonicalize its heuristic
representation before proposing it to share the duplicate filter.
:param propose: Callable taking (tuple_of_parent_entries, rng) and returning
a hashable immutable heuristic or None to skip the proposal.
The parent tuple is empty while bootstrapping. A dominating crossover
parent is passed first.
:param embed: Callable mapping a valid heuristic to a finite nonzero vector.
:param evaluate: Callable returning a finite objective vector, or None for a failed heuristic.
:param fitness_weights: Two or more signed directions, positive for maximize and negative for minimize.
:param similarity: Minimum cosine similarity to every currently retained cluster member.
:param crossover_probability: Probability of drawing two distinct parents when available.
:param seed: Private proposal and parent selection seed.
Definition at line 42 of file qdevo.py.
| qdpy.algorithms.qdevo.QDEvo.run |
( |
| self, |
|
|
| budget, |
|
|
* | , |
|
|
| initial = (), |
|
|
| proposal_limit = None ) |
Continue search under separate exact evaluation and proposal caps.
Evaluate optional seeds first, then spend up to budget more exact calls.
Previously evaluated candidates and declined proposals consume no
evaluation calls. Each generator invocation counts toward the
proposal cap, which defaults to ten times budget. Evaluation
returning None is counted as invalid, and callback errors propagate.
Definition at line 147 of file qdevo.py.