|
QDpy
|
Weighted script portfolios with progressive unpruning and MAP-Elites. More...
Go to the source code of this file.
Classes | |
| class | qdpy.algorithms.portfolio_mcts.PortfolioMCTSResult |
| A measured path and the planner's simulation and branching counts. More... | |
| class | qdpy.algorithms.portfolio_mcts.PortfolioQDResult |
| A planner repertoire with separately counted outer and inner work. More... | |
| class | qdpy.algorithms.portfolio_mcts._Node |
| class | qdpy.algorithms.portfolio_mcts._Edge |
| class | qdpy.algorithms.portfolio_mcts._Planner |
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.algorithms.portfolio_mcts.portfolio_mcts (start, *, scripts, weights, simulate, budget, horizon, simulations=None, initial_fraction=.5, unprune_at=4, unprune_rate=2., exploration=1.414, progressive_bias=1., discount=1., seed=0) | |
| Plan with weighted scripts and a visit-dependent expansion limit. | |
| qdpy.algorithms.portfolio_mcts.portfolio_map_elites (archive, scenarios, *, scripts, simulate, summarize, budget, plan_budget, horizon, random_initial=8, planner_options=None, seed=0) | |
| Run the outer MAP-Elites search over script weights. | |
Weighted script portfolios with progressive unpruning and MAP-Elites.
Definition in file portfolio_mcts.py.
| qdpy.algorithms.portfolio_mcts.portfolio_map_elites | ( | archive, | |
| scenarios, | |||
| * | , | ||
| scripts, | |||
| simulate, | |||
| summarize, | |||
| budget, | |||
| plan_budget, | |||
| horizon, | |||
| random_initial = 8, | |||
| planner_options = None, | |||
| seed = 0 ) |
Run the outer MAP-Elites search over script weights.
| archive | Empty scalar Grid or CVTGrid for planner strategies. |
| scenarios | Ordered panel of initial simulator states. |
| scripts | Ordered action-ranking callbacks. |
| simulate | Deterministic transition callback used by every planner. |
| summarize | Callable (plans) returning ((fitness,), descriptors). |
| budget | Number of weight vectors to evaluate. |
| plan_budget | Maximum simulator calls per candidate and scenario. |
| horizon | Maximum path length in each plan. |
| random_initial | Number of random samples after single-script seeds. |
| planner_options | Optional keyword options for portfolio_mcts. |
| seed | Private outer search and scenario seed. |
Seed with one active script at a time and then mutate one weight per proposal.
Definition at line 213 of file portfolio_mcts.py.
| qdpy.algorithms.portfolio_mcts.portfolio_mcts | ( | start, | |
| * | , | ||
| scripts, | |||
| weights, | |||
| simulate, | |||
| budget, | |||
| horizon, | |||
| simulations = None, | |||
| initial_fraction = .5, | |||
| unprune_at = 4, | |||
| unprune_rate = 2., | |||
| exploration = 1.414, | |||
| progressive_bias = 1., | |||
| discount = 1., | |||
| seed = 0 ) |
Plan with weighted scripts and a visit-dependent expansion limit.
| start | Initial simulator state. |
| scripts | Ordered callables (state) yielding legal (action, score) pairs. |
| weights | Nonnegative script weights in [0, 1]. |
| simulate | Pure callable (state, action) returning (successor, reward, terminated). |
| budget | Hard cap on simulator transitions. |
| horizon | Maximum simulated actions in each path. |
| simulations | Maximum tree simulations, default equal to budget. |
| initial_fraction | Fraction of ranked actions eligible at the start. |
| unprune_at | Visits before the first extra action becomes eligible. |
| unprune_rate | Exponential growth in intervals between newly eligible actions. |
| exploration | UCB exploration coefficient. |
| progressive_bias | Coefficient of the decaying script heuristic. |
| discount | Return discount in (0, 1]. |
| seed | Private seed for weighted rollouts. |
Rank duplicate suggestions by their strongest weighted score. At each node, start with the most preferred fraction of actions and gradually expose the rest as visits accumulate. Score visited actions by UCB with a decaying script bias. Cache deterministic tree edges, and charge every actual simulator call, including rollouts.
Definition at line 170 of file portfolio_mcts.py.