Build a tabular successor-feature repertoire using optimistic linear support.
More...
Go to the source code of this file.
|
| | qdpy.algorithms.sfols.tabular_optimal_policy (continuation, features, reward_weights, *, gamma=.99) |
| | Compute a deterministic scalar-optimal policy by finite-state policy iteration.
|
| | qdpy.algorithms.sfols._corners (values) |
| | qdpy.algorithms.sfols.tabular_sfols (continuation, features, start, *, gamma=.99, max_policy_solves=32, tolerance=1e-7) |
| | Learn a finite-state policy repertoire for a simplex of linear rewards.
|
Build a tabular successor-feature repertoire using optimistic linear support.
- See also
- https://proceedings.mlr.press/v162/alegre22a.html
Definition in file sfols.py.
◆ _corners()
| qdpy.algorithms.sfols._corners |
( |
| values | ) |
|
|
protected |
Enumerate vertices of each policy's region on the reward simplex.
Definition at line 74 of file sfols.py.
◆ tabular_optimal_policy()
| qdpy.algorithms.sfols.tabular_optimal_policy |
( |
| continuation, |
|
|
| features, |
|
|
| reward_weights, |
|
|
* | , |
|
|
| gamma = .99 ) |
Compute a deterministic scalar-optimal policy by finite-state policy iteration.
Return the integer action table for a fixed linear reward.
Definition at line 64 of file sfols.py.
◆ tabular_sfols()
| qdpy.algorithms.sfols.tabular_sfols |
( |
| continuation, |
|
|
| features, |
|
|
| start, |
|
|
* | , |
|
|
| gamma = .99, |
|
|
| max_policy_solves = 32, |
|
|
| tolerance = 1e-7 ) |
Learn a finite-state policy repertoire for a simplex of linear rewards.
- Parameters
-
| continuation | Substochastic transition array [state, action, state]. |
| features | Expected immediate feature array [state, action, feature]. |
| start | Initial-state probability vector. |
| gamma | Discount in [0, 1). |
| max_policy_solves | Hard cap on scalar optimal-policy queries. |
| tolerance | Target absolute gap in discounted reward. |
- Returns
- Supported policies, their successor features, and search accounting.
Solve the most promising corner of the current policy envelope next.
The search first solves unit reward weights. For each corner of
the current piecewise-linear value envelope, a linear program
bounds the value of any unknown policy using the solved tasks.
Numerical roundoff in policy evaluation is tracked through
a Bellman residual bound. Corner enumeration is intended for small
reward spaces. Auditing uses the supplied start distribution.
Definition at line 107 of file sfols.py.