Front-load strategy mode: pocket 50% until L6, then 25% (near-identical arrival to flat 25%, ~double the early draw)
- pocketPctFor(): per-phase pocket resolution ('frontload' sentinel); computePlan/boostSim/plan-text/summary-card all honor it
- strategy select + share param mode=frontload + Sponsor Guide entry
- tests 7b: frontload matches 50%-behavior below L6 and 25%-behavior from L6, total <= flat-50
This commit is contained in:
@@ -135,6 +135,23 @@ console.log("7) strategy modes:");
|
||||
check("parked timeline runs 10 collection cycles", tl.length === 10);
|
||||
}
|
||||
|
||||
console.log("7b) Front-load strategy (pocket 50% until L6, then 25%):");
|
||||
{
|
||||
const phases = getPhaseSequence(0);
|
||||
const fl = computePlan(phases, "frontload");
|
||||
const p25 = computePlan(phases, 25);
|
||||
const p50 = computePlan(phases, 50);
|
||||
for (const k of phases) {
|
||||
if (k === "3xL7") continue;
|
||||
const isLate = Math.max(...PHASE_SLOTS[k]) >= 6;
|
||||
const want = isLate ? p25[k].cycles : p50[k].cycles;
|
||||
check(`frontload ${k} = ${isLate ? "25%" : "50%"} behavior (${fl[k].cycles}cy)`,
|
||||
fl[k].cycles === want, `want ${want}`);
|
||||
}
|
||||
const total = (plan) => phases.reduce((s, k) => s + plan[k].cycles, 0);
|
||||
check(`frontload total ${total(fl)} <= flat-50 total ${total(p50)}`, total(fl) <= total(p50));
|
||||
}
|
||||
|
||||
console.log("8) Boost Planner (extra-funds combos, Marty 2026-07-31):");
|
||||
{
|
||||
// 8a. boostSim with $0 extra must agree with computePlan for every start.
|
||||
|
||||
Reference in New Issue
Block a user