Journey 03 — Recommend a solver
Rank solver arms for a fixed ProblemProfile under different objectives (balanced, precision, survival, efficiency) and read dead zones.
Prerequisites: Journey 02 — you understand ProblemProfile. Scenario: One profile, several objectives, ranked arms
Key APIs
solvscout.recommend(profile, objective=...)Recommendation.bestRecommendation.rankingsArmRecommendation.dead_zone
Concepts to internalize
- Objectives — balanced (default), precision, survival, efficiency. The top arm can change with your goal.
- dead_zone — arms SolvTune will not recommend on this profile class, with a reason string.
- SolverConfig on best — tuned knobs ready to map into solvsrk.run(); journey 05 shows the opaque token path instead.
- Confidence — how close your problem is to benchmarked corpus entries.
Important code
The guided tour script wraps this pattern. Copy the production shape into your pipeline:
import solvscout as scout
rhs = ... # Rössler from journey 02
profile = scout.classify(rhs, [1, 1, 1], (0, 100)).profile
for objective in ('balanced', 'precision', 'survival', 'efficiency'):
rec = scout.recommend(profile, objective=objective)
best = rec.best
print(objective, best.arm if best else None, best.confidence if best else None)
# Full ranking with scores and dead-zone reasons:
rec = scout.recommend(profile, objective='balanced')
for r in rec.rankings:
print(r.arm, r.score, r.confidence, r.dead_zone, r.dead_zone_reason)Act-by-act walkthrough
Act 1 — Classify once, recommend many ways
recommend(profile, objective=...) ranks every active solver arm for the chosen goal. Objectives: 'balanced' (default), 'precision', 'survival', 'efficiency'.
| Field | Value | Notes |
|---|---|---|
problem | rossler | |
stiffness | S1 |
Act 2 — Compare objectives
The top pick can change with the objective - a survival-first choice is not always the most precise one. best is the top viable arm.
recommend() per objective (4 steps)
| Field | Value | Notes |
|---|---|---|
best_arm | solvsrk | |
confidence | high | |
n_viable | 14 | |
n_dead_zones | 0 | |
best_arm | solvsrk | |
confidence | high | |
n_viable | 14 | |
n_dead_zones | 0 | |
best_arm | solvsrk | |
confidence | high | |
n_viable | 14 | |
n_dead_zones | 0 | |
best_arm | ext_cvode_bdf | |
confidence | low | |
n_viable | 14 | |
n_dead_zones | 0 |
Act 3 — Read the full ranking
Each ArmRecommendation carries a score, confidence, survival_rate, and a ready-to-use SolverConfig. dead_zone arms are flagged with a reason.
balanced ranking (14 steps)
| Field | Value | Notes |
|---|---|---|
score | 0.7199 | |
confidence | high | |
survival_rate | 1.0 | |
dead_zone | False | |
reason | - | |
score | 0.7186 | |
confidence | high | |
survival_rate | 1.0 | |
dead_zone | False | |
reason | - | |
score | 0.6964 | |
confidence | high | |
survival_rate | 1.0 | |
dead_zone | False | |
reason | - | |
score | 0.6903 | |
confidence | high | |
survival_rate | 1.0 | |
dead_zone | False | |
reason | - | |
score | 0.6322 | |
confidence | high | |
survival_rate | 1.0 | |
dead_zone | False | |
reason | - | |
score | 0.6216 | |
confidence | high | |
survival_rate | 1.0 | |
dead_zone | False | |
reason | - | |
score | 0.6031 | |
confidence | low | |
survival_rate | 0.8 | |
dead_zone | False | |
reason | - | |
score | 0.5818 | |
confidence | low | |
survival_rate | 0.75 | |
dead_zone | False | |
reason | - | |
score | 0.5691 | |
confidence | low | |
survival_rate | 0.72 | |
dead_zone | False | |
reason | - | |
score | 0.5691 | |
confidence | low | |
survival_rate | 0.72 | |
dead_zone | False | |
reason | - | |
score | 0.4968 | |
confidence | low | |
survival_rate | 0.55 | |
dead_zone | False | |
reason | - | |
score | 0.4968 | |
confidence | low | |
survival_rate | 0.55 | |
dead_zone | False | |
reason | - | |
score | 0.4968 | |
confidence | low | |
survival_rate | 0.55 | |
dead_zone | False | |
reason | - | |
score | 0.494 | |
confidence | high | |
survival_rate | 0.75 | |
dead_zone | False | |
reason | - |
Guided tour output
Verified console capture from 03_recommend.py:
One profile, several objectives, ranked arms
-- Act 1 - Classify once, recommend many ways --
-> recommend(profile, objective=...) ranks every active solver arm for the chosen goal. Objectives: 'balanced' (default), 'precision', 'survival', 'efficiency'.
problem: rossler
stiffness: S1
-- Act 2 - Compare objectives --
-> The top pick can change with the objective - a survival-first choice is not always the most precise one. best is the top viable arm.
_section: recommend() per objective (4 steps)
best_arm: solvsrk
confidence: high
n_viable: 14
n_dead_zones: 0
best_arm: solvsrk
confidence: high
n_viable: 14
n_dead_zones: 0
best_arm: solvsrk
confidence: high
n_viable: 14
n_dead_zones: 0
best_arm: ext_cvode_bdf
confidence: low
n_viable: 14
n_dead_zones: 0
-- Act 3 - Read the full ranking --
-> Each ArmRecommendation carries a score, confidence, survival_rate, and a ready-to-use SolverConfig. dead_zone arms are flagged with a reason.
_section: balanced ranking (14 steps)
score: 0.7199
confidence: high
survival_rate: 1.0
dead_zone: False
reason: -
score: 0.7186
confidence: high
survival_rate: 1.0
dead_zone: False
reason: -
score: 0.6964
confidence: high
survival_rate: 1.0
dead_zone: False
reason: -
score: 0.6903
confidence: high
survival_rate: 1.0
dead_zone: False
reason: -
score: 0.6322
confidence: high
survival_rate: 1.0
dead_zone: False
reason: -
score: 0.6216
confidence: high
survival_rate: 1.0
dead_zone: False
reason: -
score: 0.6031
confidence: low
survival_rate: 0.8
dead_zone: False
reason: -
score: 0.5818
confidence: low
survival_rate: 0.75
dead_zone: False
reason: -
score: 0.5691
confidence: low
survival_rate: 0.72
dead_zone: False
reason: -
score: 0.5691
confidence: low
survival_rate: 0.72
dead_zone: False
reason: -
score: 0.4968
confidence: low
survival_rate: 0.55
dead_zone: False
reason: -
score: 0.4968
confidence: low
survival_rate: 0.55
dead_zone: False
reason: -
score: 0.4968
confidence: low
survival_rate: 0.55
dead_zone: False
reason: -
score: 0.494
confidence: high
survival_rate: 0.75
dead_zone: False
reason: -
-- Run complete --
next_journey: 04_compare_arms.py
best_arm: solvsrkRun it
cd python
# Guided tour — narrated scenario walkthrough (recommended first run):
python examples/journeys/03_recommend.py
# Production one-liner — same API call you ship:
python -c "import solvscout as s; rhs=lambda t,y:(lambda x,z,w:[-z-w,x+0.2*z,0.2+w*(x-5.7)])(*y); c=s.classify(rhs,[1,1,1],(0,100)); print(s.recommend(c.profile).best.arm)"What comes next
Journey 04 uses compare() for a full corpus-backed work-precision table.
Navigation
← Journey 02 — Classify an RHS · Journey 04 — Compare arms →