From 0df9e052cdf4569778ffe9388ed136d908aa010c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Sat, 4 Jul 2026 01:30:58 -0500 Subject: [PATCH 01/10] initial commit --- package-lock.json | 16 ++- src/Data/data.json | 26 ++++- src/Theories/CTs/RZ.ts | 9 +- src/Theories/T1-T8/T8.ts | 225 +++++++++++++++++++++++++++------------ 4 files changed, 196 insertions(+), 80 deletions(-) diff --git a/package-lock.json b/package-lock.json index c3582b58..d7114f57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3382,10 +3382,20 @@ } }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1" diff --git a/src/Data/data.json b/src/Data/data.json index 14e7cbc0..22d3e2d3 100644 --- a/src/Data/data.json +++ b/src/Data/data.json @@ -409,6 +409,9 @@ "T8": { "stratFilterCondition": "Idle || (Semi-Idle && rho < 100)" }, + "T8SingleMS": { + "stratFilterCondition": "Semi-Idle && rho >= 37 && rho < 60" + }, "T8noC3": { "stratFilterCondition": "(Idle || Semi-Idle) && rho < 25" }, @@ -421,12 +424,24 @@ "T8Snax": { "stratFilterCondition": "Semi-Idle" }, + "T8SnaxSingleMS": { + "stratFilterCondition": "Semi-Idle && rho >= 37 && rho < 60" + }, "T8Coast": { "stratFilterCondition": "Semi-Idle" }, + "T8SingleMSCoast": { + "stratFilterCondition": "Semi-Idle && rho >= 37 && rho < 60" + }, "T8noC3d": { "stratFilterCondition": "(Active || Very-Active) && rho < 60" }, + "T8noC3d2": { + "stratFilterCondition": "(Active || Very-Active) && rho < 60" + }, + "T8noC3dSingleMS": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 40 && rho < 60" + }, "T8noC5d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" }, @@ -436,17 +451,20 @@ "T8d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 40 && rho < 100" }, + "T8dSingleMS": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 37 && rho < 60" + }, "T8Play": { - "stratFilterCondition": "Active && rho >= 220" + "stratFilterCondition": "Active && ((rho < 5) || (rho >= 20 && rho < 60) || (rho >= 80 && rho < 100) || rho >= 220)" }, "T8PlayCoast": { - "stratFilterCondition": "Active && rho >= 220" + "stratFilterCondition": "Active && ((rho < 5) || (rho >= 20 && rho < 60) || (rho >= 80 && rho < 100) || rho >= 220)" }, "T8PlaySolarswap": { - "stratFilterCondition": "Very-Active" + "stratFilterCondition": "Very-Active && rho > 60" }, "T8PlaySolarswapCoast": { - "stratFilterCondition": "Very-Active" + "stratFilterCondition": "Very-Active && rho > 60" } } }, diff --git a/src/Theories/CTs/RZ.ts b/src/Theories/CTs/RZ.ts index bd0ad5d6..c285a528 100644 --- a/src/Theories/CTs/RZ.ts +++ b/src/Theories/CTs/RZ.ts @@ -238,7 +238,7 @@ export default async function rz(data: theoryData) { retArr.push(ret); } let bestRet = retArr[0]; - for(let i = 0; i < retArr.length; i++) { + for(let i = 1; i < retArr.length; i++) { bestRet = getBestResult(bestRet, retArr[i]); } return bestRet; @@ -605,12 +605,11 @@ class rzSim extends theoryClass { else throw error; } let stratExtra = ""; - if (this.strat.includes("BH")) - { + if (this.strat.includes("BH")) { stratExtra += ` t=${this.bhAtRecovery ? this.t_var.toFixed(2) : this.targetZero.toFixed(2)}` } if (this.strat.includes("MS") && this.swapPointDelta != 0) { - stratExtra += ` swap:${logToExp(this.lastPub + this.swapPointDelta, 2)}` + stratExtra += ` ${logToExp(this.lastPub + this.swapPointDelta, 2)}` } if (this.normalPubRho != -1) { // if(this.maxC1LevelActual == -1) @@ -618,7 +617,7 @@ class rzSim extends theoryClass { // else // stratExtra += ` c1=${this.variables[0].level}/${this.maxC1LevelActual} c2=${this.variables[1].level}` } - if (this.maxW1 !== Infinity){ + if (this.maxW1 !== Infinity) { stratExtra += ` w1: ${this.maxW1}`; } this.trimBoughtVars(); diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index bc8c18d8..75d465d4 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -3,32 +3,88 @@ import theoryClass from "../theory"; import Variable from "../../Utils/variable"; import { ExponentialValue, StepwisePowerSumValue } from "../../Utils/value"; import { ExponentialCost, FirstFreeCost } from '../../Utils/cost'; -import { add, l10, getR9multiplier, toCallables, getLastLevel, getBestResult } from "../../Utils/helpers"; +import { add, l10, getR9multiplier, toCallables, getLastLevel, getBestResult, logToExp } from "../../Utils/helpers"; + +const MXStrats = ["T8", "T8Coast", "T8Snax", "T8d", "T8noC3d"]; +const isMX = (strat: string, rho: number) => ( + rho >= 37 + && rho < 60 + && ( + strat.includes("SingleMS") + || MXStrats.includes(strat) + ) +); export default async function t8(data: theoryData): Promise { - let res; - if(!data.strat.includes("Coast")) { - const sim = new t8Sim(data); - res = await sim.simulate(); + async function getResult (data: theoryData, MX: number = 0, ss: number = 0): Promise { + let res; + if (!data.strat.includes("Coast")) { + const sim = new t8Sim(data); + sim.milestoneVariant = MX; + sim.ssPoint = ss; + res = await sim.simulate(); + } + else { + let data2: theoryData = JSON.parse(JSON.stringify(data)); + data2.strat = data2.strat.replace("Coast", ""); + const sim1 = new t8Sim(data2); + sim1.milestoneVariant = MX; + sim1.ssPoint = ss; + const res1 = await sim1.simulate(); + const lastC1 = getLastLevel("c1", res1.boughtVars); + const lastC3 = getLastLevel("c3", res1.boughtVars); + const lastC5 = getLastLevel("c5", res1.boughtVars); + const sim2 = new t8Sim(data); + sim2.milestoneVariant = MX; + sim2.ssPoint = ss; + sim2.variables[0].setOriginalCap(lastC1) + sim2.variables[0].configureCap(13); + sim2.variables[2].setOriginalCap(lastC3) + sim2.variables[2].configureCap(4); + sim2.variables[4].setOriginalCap(lastC5) + sim2.variables[4].configureCap(1); + res = await sim2.simulate(); + } + return res; + } + + let result: simResult; + // T8MX and T8MX...SingleMS + if ((data.strat.includes("SingleMS") || isMX(data.strat, data.rho))) { + const altOptions = data.strat.includes("T8noC3d") ? [0, 2, 3] : [0, 1, 2, 3]; + let retArr = []; + + if (data.strat.includes("SingleMS")) { + let tempResult: simResult; + const ssInit = 40; + const ssCap = 60; + const ssStep = 0.1; + + result = await getResult(data, altOptions[0], ssInit); + for (let i = 1; i < altOptions.length; i++) { + result = getBestResult(result, await getResult(data, altOptions[i], ssInit)); + } + for (let ssDelta=ssInit+ssStep; ssDelta <= ssCap; ssDelta+=ssStep) { + if (result.pubRho < ssDelta) break; + tempResult = await getResult(data, altOptions[0], ssDelta) + for (let i = 1; i < altOptions.length; i++) { + tempResult = getBestResult(result, await getResult(data, altOptions[i], ssDelta)); + } + result = getBestResult(result, tempResult); + //if (result !== tempResult) break; + } + } + else { + result = await getResult(data, altOptions[0]) + for (let i = 0; i < altOptions.length; i++) { + result = getBestResult(result, await getResult(data, altOptions[i])); + } + } } else { - let data2: theoryData = JSON.parse(JSON.stringify(data)); - data2.strat = data2.strat.replace("Coast", ""); - const sim1 = new t8Sim(data2); - const res1 = await sim1.simulate(); - const lastC1 = getLastLevel("c1", res1.boughtVars); - const lastC3 = getLastLevel("c3", res1.boughtVars); - const lastC5 = getLastLevel("c5", res1.boughtVars); - const sim2 = new t8Sim(data); - sim2.variables[0].setOriginalCap(lastC1) - sim2.variables[0].configureCap(13); - sim2.variables[2].setOriginalCap(lastC3) - sim2.variables[2].configureCap(4); - sim2.variables[4].setOriginalCap(lastC5) - sim2.variables[4].configureCap(1); - res = await sim2.simulate(); + result = await getResult(data); } - return res; + return result; } type theory = "T8"; @@ -44,53 +100,63 @@ class t8Sim extends theoryClass { dy: number; dz: number; msTimer: number; + ssPoint: number; + milestoneVariant: number; getBuyingConditions(): conditionFunction[] { + const idleStrat = new Array(5).fill(true); + const idleCoastStrat = [ + () => this.variables[0].shouldBuy, + true, + () => this.variables[2].shouldBuy, + true, + () => this.variables[4].shouldBuy, + ]; + const snaxStrat = [ + () => this.curMult < 1.6, + true, + () => this.curMult < 2.3, + true, + () => this.curMult < 2.3 + ]; + const dBaseStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, true]; + const noC3dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, true]; + const playStrat = [ + () => this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost), + true, + () => this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + true, + () => this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + ]; + const playCoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), + ]; + const conditions: Record = { - T8: [true, true, true, true, true], + T8: idleStrat, + T8SingleMS: idleStrat, T8noC3: [true, true, false, true, true], T8noC5: [true, true, true, true, false], T8noC35: [true, true, false, true, false], - T8Snax: [() => this.curMult < 1.6, true, () => this.curMult < 2.3, true, () => this.curMult < 2.3], - T8Coast: [ - () => this.variables[0].shouldBuy, - true, - () => this.variables[2].shouldBuy, - true, - () => this.variables[4].shouldBuy, - ], - T8noC3d: [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, true], + T8Snax: snaxStrat, + T8SnaxSingleMS: snaxStrat, + T8Coast: idleCoastStrat, + T8SingleMSCoast: idleCoastStrat, + T8noC3d: noC3dStrat, + T8noC3d2: noC3dStrat, + T8noC3dSingleMS: noC3dStrat, T8noC5d: [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, false], T8noC35d: [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, false], - T8d: [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, true], - T8Play: [ - () => this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost), - true, - () => this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), - true, - () => this.variables[4].cost + l10(4) < Math.min(this.variables[1].cost, this.variables[3].cost), - ], - T8PlayCoast: [ - () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost)), - true, - () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), - true, - () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), - ], - T8PlaySolarswap: [ - () => this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost), - true, - () => this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), - true, - () => this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), - ], - T8PlaySolarswapCoast: [ - () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost)), - true, - () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), - true, - () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), - ] + T8d: dBaseStrat, + T8dSingleMS: dBaseStrat, + T8Play: playStrat, + T8PlayCoast: playCoastStrat, + T8PlaySolarswap: playStrat, + T8PlaySolarswapCoast: playCoastStrat }; return toCallables(conditions[this.strat]); } @@ -99,18 +165,30 @@ class t8Sim extends theoryClass { return conditions; } getMilestonePriority(): number[] { - const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); switch (this.strat) { case "T8noC3": return [0, 2, 3]; - case "T8noC3d": return [0, 2, 3]; + case "T8noC3d": return this.milestoneVariant > 0 ? [this.milestoneVariant] : [0, 2, 3]; case "T8noC5": return [0, 2, 1]; case "T8noC5d": return [0, 2, 1]; case "T8noC35": return [0, 2]; case "T8noC35d": return [0, 2]; } - if (milestoneCount < 3) return [0]; - else if (milestoneCount == 3) return [3]; - else return [2, 0, 3, 1]; + + const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); + switch (milestoneCount) { + case 2: + if ( + + (this.strat.includes("SingleMS") && + this.maxRho >= this.ssPoint) + ) { + return [this.milestoneVariant]; + } + case 0: + case 1: return [0]; + case 3: return [3]; + default: return [2, 0, 3, 1]; + } } updateMilestones(): void { const prevAttractor = this.milestones[0]; @@ -185,6 +263,8 @@ class t8Sim extends theoryClass { new Variable({ name: "c5", cost: new ExponentialCost(1e2, 1.15 * Math.log2(7), true), valueScaling: new ExponentialValue(7) }), ]; this.msTimer = 0; + this.ssPoint = 0; + this.milestoneVariant = this.strat.includes("MX") ? 3 : 0; this.updateMilestones(); } async simulate(): Promise { @@ -199,10 +279,19 @@ class t8Sim extends theoryClass { if(this.variables[4].shouldFork) await this.doForkVariable(4) } let stratExtra = ""; - if(this.strat.includes("Coast")) { + if ( + this.strat.includes("SingleMS") + //&& this.maxRho >= this.ssPoint + ) { + stratExtra += ` ${logToExp(this.ssPoint)}`; + } + if (this.strat.includes("SingleMS") || (isMX(this.strat, this.maxRho) && this.milestoneVariant > 0)) { + stratExtra += ` M${this.milestoneVariant}`; + } + if (this.strat.includes("Coast")) { stratExtra += this.variables[0].prepareExtraForCap(getLastLevel("c1", this.boughtVars)) + - this.variables[2].prepareExtraForCap(getLastLevel("c3", this.boughtVars)) + - this.variables[4].prepareExtraForCap(getLastLevel("c5", this.boughtVars)) + this.variables[2].prepareExtraForCap(getLastLevel("c3", this.boughtVars)) + + this.variables[4].prepareExtraForCap(getLastLevel("c5", this.boughtVars)) } this.trimBoughtVars(); return getBestResult(this.createResult(stratExtra), this.bestForkRes); From 81b7f0c2d5229fc40266b494e721b41df5edad1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Thu, 9 Jul 2026 17:39:56 -0500 Subject: [PATCH 02/10] Finish T8 strat routing --- src/Data/data.json | 46 ++++---- src/Theories/T1-T8/T8.ts | 223 ++++++++++++++++++++++++--------------- tsconfig.json | 2 +- 3 files changed, 163 insertions(+), 108 deletions(-) diff --git a/src/Data/data.json b/src/Data/data.json index 22d3e2d3..60a52fa5 100644 --- a/src/Data/data.json +++ b/src/Data/data.json @@ -410,61 +410,67 @@ "stratFilterCondition": "Idle || (Semi-Idle && rho < 100)" }, "T8SingleMS": { - "stratFilterCondition": "Semi-Idle && rho >= 37 && rho < 60" + "stratFilterCondition": "Semi-Idle && rho >= 20 && rho < 80" }, "T8noC3": { - "stratFilterCondition": "(Idle || Semi-Idle) && rho < 25" + "stratFilterCondition": "(Idle || Semi-Idle) && ((rho < 40) || (rho >=50 && rho < 80) || (rho >= 155 && rho < 160))" }, "T8noC5": { "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 160 && rho < 220" }, "T8noC35": { - "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 100 && rho < 160" + "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 80 && rho < 160" }, "T8Snax": { "stratFilterCondition": "Semi-Idle" }, "T8SnaxSingleMS": { - "stratFilterCondition": "Semi-Idle && rho >= 37 && rho < 60" + "stratFilterCondition": "Semi-Idle && rho >= 50 && rho < 60" }, "T8Coast": { "stratFilterCondition": "Semi-Idle" }, "T8SingleMSCoast": { - "stratFilterCondition": "Semi-Idle && rho >= 37 && rho < 60" + "stratFilterCondition": "Semi-Idle && rho >= 20 && rho < 80" }, "T8noC3d": { - "stratFilterCondition": "(Active || Very-Active) && rho < 60" + "stratFilterCondition": "(Active || Very-Active) && ((rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" }, - "T8noC3d2": { - "stratFilterCondition": "(Active || Very-Active) && rho < 60" + "T8noC3dCoast": { + "stratFilterCondition": "(Active || Very-Active) && ((rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" }, "T8noC3dSingleMS": { - "stratFilterCondition": "(Active || Very-Active) && rho >= 40 && rho < 60" + "stratFilterCondition": "(Active || Very-Active) && ((rho >= 20 && rho < 40) || (rho >= 50 && rho < 80))" + }, + "T8noC3dSingleMSCoast": { + "stratFilterCondition": "(Active || Very-Active) && ((rho >= 20 && rho < 40) || (rho >= 50 && rho < 80))" }, "T8noC5d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" }, - "T8noC35d": { - "stratFilterCondition": "(Active || Very-Active) && rho >= 100 && rho < 160" - }, - "T8d": { - "stratFilterCondition": "(Active || Very-Active) && rho >= 40 && rho < 100" + "T8noC5dCoast": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" }, - "T8dSingleMS": { - "stratFilterCondition": "(Active || Very-Active) && rho >= 37 && rho < 60" + "T8noC35d": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, "T8Play": { - "stratFilterCondition": "Active && ((rho < 5) || (rho >= 20 && rho < 60) || (rho >= 80 && rho < 100) || rho >= 220)" + "stratFilterCondition": "Active && ((rho >= 20 && rho < 100) || (rho >= 220))" + }, + "T8PlaySingleMS": { + "stratFilterCondition": "Active && rho >= 160 && rho <= 220" }, "T8PlayCoast": { - "stratFilterCondition": "Active && ((rho < 5) || (rho >= 20 && rho < 60) || (rho >= 80 && rho < 100) || rho >= 220)" + "stratFilterCondition": "Active && ((rho >= 20 && rho < 100) || (rho >= 220))" + }, + "T8PlaySingleMSCoast": { + "stratFilterCondition": "Active && rho >= 160 && rho <= 220" }, "T8PlaySolarswap": { - "stratFilterCondition": "Very-Active && rho > 60" + "stratFilterCondition": "Very-Active && rho >= 40" }, "T8PlaySolarswapCoast": { - "stratFilterCondition": "Very-Active && rho > 60" + "stratFilterCondition": "Very-Active && rho >= 40" } } }, diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index 75d465d4..11118a6a 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -2,41 +2,43 @@ import { global } from "../../Sim/main"; import theoryClass from "../theory"; import Variable from "../../Utils/variable"; import { ExponentialValue, StepwisePowerSumValue } from "../../Utils/value"; -import { ExponentialCost, FirstFreeCost } from '../../Utils/cost'; -import { add, l10, getR9multiplier, toCallables, getLastLevel, getBestResult, logToExp } from "../../Utils/helpers"; +import { ExponentialCost, FirstFreeCost, parseValue } from '../../Utils/cost'; +import { add, l10, getR9multiplier, toCallables, getLastLevel, getBestResult, logToExp, defaultResult } from "../../Utils/helpers"; -const MXStrats = ["T8", "T8Coast", "T8Snax", "T8d", "T8noC3d"]; -const isMX = (strat: string, rho: number) => ( - rho >= 37 - && rho < 60 - && ( - strat.includes("SingleMS") - || MXStrats.includes(strat) - ) -); +//106-70, 73-48, 60-40 +const ssPoints = [ + [ // For T8noC3d + ...Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), + ...Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) + ].toSorted((a,b) => a - b), + Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(3))))) * (lvl + 1)), + Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), + Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) +]; +console.log(ssPoints); export default async function t8(data: theoryData): Promise { - async function getResult (data: theoryData, MX: number = 0, ss: number = 0): Promise { + console.log(data); + async function getResult ( + data: theoryData, + MXVariant: number = 0, + ss: number = 0 + ): Promise { let res; if (!data.strat.includes("Coast")) { - const sim = new t8Sim(data); - sim.milestoneVariant = MX; - sim.ssPoint = ss; + const sim = new t8Sim(data, MXVariant, ss); res = await sim.simulate(); } else { + return defaultResult(); let data2: theoryData = JSON.parse(JSON.stringify(data)); data2.strat = data2.strat.replace("Coast", ""); - const sim1 = new t8Sim(data2); - sim1.milestoneVariant = MX; - sim1.ssPoint = ss; + const sim1 = new t8Sim(data2, MXVariant, ss); const res1 = await sim1.simulate(); const lastC1 = getLastLevel("c1", res1.boughtVars); const lastC3 = getLastLevel("c3", res1.boughtVars); const lastC5 = getLastLevel("c5", res1.boughtVars); - const sim2 = new t8Sim(data); - sim2.milestoneVariant = MX; - sim2.ssPoint = ss; + const sim2 = new t8Sim(data, MXVariant, ss); sim2.variables[0].setOriginalCap(lastC1) sim2.variables[0].configureCap(13); sim2.variables[2].setOriginalCap(lastC3) @@ -48,38 +50,28 @@ export default async function t8(data: theoryData): Promise { return res; } - let result: simResult; - // T8MX and T8MX...SingleMS - if ((data.strat.includes("SingleMS") || isMX(data.strat, data.rho))) { - const altOptions = data.strat.includes("T8noC3d") ? [0, 2, 3] : [0, 1, 2, 3]; - let retArr = []; - - if (data.strat.includes("SingleMS")) { - let tempResult: simResult; - const ssInit = 40; - const ssCap = 60; - const ssStep = 0.1; - - result = await getResult(data, altOptions[0], ssInit); - for (let i = 1; i < altOptions.length; i++) { - result = getBestResult(result, await getResult(data, altOptions[i], ssInit)); - } - for (let ssDelta=ssInit+ssStep; ssDelta <= ssCap; ssDelta+=ssStep) { - if (result.pubRho < ssDelta) break; - tempResult = await getResult(data, altOptions[0], ssDelta) - for (let i = 1; i < altOptions.length; i++) { - tempResult = getBestResult(result, await getResult(data, altOptions[i], ssDelta)); - } - result = getBestResult(result, tempResult); - //if (result !== tempResult) break; - } - } - else { - result = await getResult(data, altOptions[0]) - for (let i = 0; i < altOptions.length; i++) { - result = getBestResult(result, await getResult(data, altOptions[i])); + let result: simResult = defaultResult(); + // MX and SingleMS + if (data.strat.includes("SingleMS")) { + const altOptions = (data.strat.includes("T8noC3d") + ? (data.rho < 50 ? [2, 3] : [0, 2]) // See getMilestonePriority() + : (data.strat.includes("T8noC35d") + ? [2] + : [1, 2, 3] + ) + ); + console.log(data.strat); + // Remove default MX option for SingleMS (equivalent to base strat) + for (const option of altOptions) { + // Only Swap points within e5 of recovery + for (const ssPoint of ssPoints[option].filter((num) => num > data.rho - 5)) { + const r = await getResult(data, option, ssPoint) + result = getBestResult(result, r); + if (result.pubRho < ssPoint) break; + if (result != r) break; } } + console.log(result); } else { result = await getResult(data); @@ -102,6 +94,7 @@ class t8Sim extends theoryClass { msTimer: number; ssPoint: number; milestoneVariant: number; + //isMX: boolean; getBuyingConditions(): conditionFunction[] { const idleStrat = new Array(5).fill(true); @@ -119,8 +112,23 @@ class t8Sim extends theoryClass { true, () => this.curMult < 2.3 ]; - const dBaseStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, true]; const noC3dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, true]; + const noC3dCoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + false, + true, + () => this.variables[4].shouldBuy + ]; + const noC5dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, false]; + const noC5dCoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + () => this.variables[4].shouldBuy, + true, + false + ]; + const noC35dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, false]; const playStrat = [ () => this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost), true, @@ -147,14 +155,16 @@ class t8Sim extends theoryClass { T8Coast: idleCoastStrat, T8SingleMSCoast: idleCoastStrat, T8noC3d: noC3dStrat, - T8noC3d2: noC3dStrat, + T8noC3dCoast: noC3dCoastStrat, T8noC3dSingleMS: noC3dStrat, - T8noC5d: [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, false], - T8noC35d: [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, false], - T8d: dBaseStrat, - T8dSingleMS: dBaseStrat, + T8noC3dSingleMSCoast: noC3dCoastStrat, + T8noC5d: noC5dStrat, + T8noC5dCoast: noC5dCoastStrat, + T8noC35d: noC35dStrat, T8Play: playStrat, + T8PlaySingleMS: playStrat, T8PlayCoast: playCoastStrat, + T8PlaySingleMSCoast: playCoastStrat, T8PlaySolarswap: playStrat, T8PlaySolarswapCoast: playCoastStrat }; @@ -165,29 +175,54 @@ class t8Sim extends theoryClass { return conditions; } getMilestonePriority(): number[] { + const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); + const maxRho = Math.max(this.maxRho, this.lastPub); switch (this.strat) { - case "T8noC3": return [0, 2, 3]; - case "T8noC3d": return this.milestoneVariant > 0 ? [this.milestoneVariant] : [0, 2, 3]; - case "T8noC5": return [0, 2, 1]; + case "T8Coast": + case "T8": + if (maxRho < 52) return [0]; + else if (maxRho < 80) return [3, 0]; + else if (maxRho < 160 && maxRho >= 220) return [2, 0, 3, 1]; + return [1, 0, 2, 3]; + // TODO: Split this strat into 2 seperate named strats for clarity + case "T8noC3": + case "T8noC3dCoast": + case "T8noC3d": return maxRho < 50 ? [0] : [3, 0, 2]; + case "T8noC3dSingleMSCoast": + case "T8noC3dSingleMS": + if (maxRho < 50) { + return this.maxRho < this.ssPoint ? [this.milestoneVariant] : [0]; + } + return this.maxRho < this.ssPoint ? [this.milestoneVariant, 0, 3, 2] : [3, 0, 2]; + case "T8noC5": + case "T8noC5dCoast": case "T8noC5d": return [0, 2, 1]; - case "T8noC35": return [0, 2]; - case "T8noC35d": return [0, 2]; + case "T8noC35": + case "T8noC35d": return [2, 0]; + case "T8Snax": + if (maxRho < 60) return [0]; + else if (maxRho < 80) return [3]; + else if (maxRho < 160) return [2, 0, 3]; + return [1, 0, 2, 3]; + case "T8Play": + case "T8PlayCoast": return milestoneCount < 4 ? [0, 3] : [2, 0, 3, 1]; + case "T8PlaySolarswap": + case "T8PlaySolarswapCoast": return milestoneCount < 4 ? [0, 3] : [0, 2, 3, 1]; } - const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); switch (milestoneCount) { - case 2: - if ( - - (this.strat.includes("SingleMS") && - this.maxRho >= this.ssPoint) - ) { - return [this.milestoneVariant]; - } case 0: - case 1: return [0]; - case 3: return [3]; - default: return [2, 0, 3, 1]; + case 1: + case 2: return (this.strat.includes("SingleMS") && this.maxRho < this.ssPoint) ? [0] : [this.milestoneVariant]; + case 3: + if (this.strat.includes("SingleMS")) { + return (this.maxRho < this.ssPoint + ? [0, this.milestoneVariant] + : [this.milestoneVariant] + ); + } + return [3]; + default: return (this.strat.includes("SingleMS") && this.maxRho < this.ssPoint) ? [this.milestoneVariant] : [2, 0, 3, 1]; } } updateMilestones(): void { @@ -219,7 +254,11 @@ class t8Sim extends theoryClass { this.dz = 500 * (0.1 + iz * (ix - 14)); } } - constructor(data: theoryData) { + constructor( + data: theoryData, + milestoneVariant: number = 0, + ssPoint: number = 0 + ) { super(data); //attractor stuff this.bounds = [ @@ -263,8 +302,9 @@ class t8Sim extends theoryClass { new Variable({ name: "c5", cost: new ExponentialCost(1e2, 1.15 * Math.log2(7), true), valueScaling: new ExponentialValue(7) }), ]; this.msTimer = 0; - this.ssPoint = 0; - this.milestoneVariant = this.strat.includes("MX") ? 3 : 0; + //this.isMX = isMX(this.strat, this.lastPub); + this.milestoneVariant = milestoneVariant; + this.ssPoint = ssPoint; this.updateMilestones(); } async simulate(): Promise { @@ -279,19 +319,21 @@ class t8Sim extends theoryClass { if(this.variables[4].shouldFork) await this.doForkVariable(4) } let stratExtra = ""; - if ( - this.strat.includes("SingleMS") - //&& this.maxRho >= this.ssPoint - ) { - stratExtra += ` ${logToExp(this.ssPoint)}`; + if (this.strat.includes("SingleMS")) { + stratExtra += ` ${logToExp(this.ssPoint,2)}`; } - if (this.strat.includes("SingleMS") || (isMX(this.strat, this.maxRho) && this.milestoneVariant > 0)) { + //this.isMX = isMX(this.strat, this.pubRho); + /*if (this.isMX) { stratExtra += ` M${this.milestoneVariant}`; - } + }*/ if (this.strat.includes("Coast")) { - stratExtra += this.variables[0].prepareExtraForCap(getLastLevel("c1", this.boughtVars)) + - this.variables[2].prepareExtraForCap(getLastLevel("c3", this.boughtVars)) + - this.variables[4].prepareExtraForCap(getLastLevel("c5", this.boughtVars)) + stratExtra += this.variables[0].prepareExtraForCap(getLastLevel("c1", this.boughtVars)); + if (!this.strat.includes("noC3") && !this.strat.includes("noC35")) { + stratExtra += this.variables[2].prepareExtraForCap(getLastLevel("c3", this.boughtVars)); + } + if (!this.strat.includes("noC5") && !this.strat.includes("noC35")) { + stratExtra += this.variables[4].prepareExtraForCap(getLastLevel("c5", this.boughtVars)); + } } this.trimBoughtVars(); return getBestResult(this.createResult(stratExtra), this.bestForkRes); @@ -344,9 +386,13 @@ class t8Sim extends theoryClass { const rhodot = l10(this.dt) + this.totMult + this.variables[0].value + this.variables[1].value + add(dx2Term, dy2Term, dz2Term) / 2 - 2; this.rho.add(rhodot); + //if (!this.isMX) this.isMX = isMX(this.strat, Math.max(this.rho.value, this.lastPub)); } copyFrom(other: this) { super.copyFrom(other); + this.bounds = other.bounds; + this.defaultStates = other.defaultStates; + this.dts = other.dts; this.x = other.x; this.y = other.y; this.z = other.z; @@ -354,6 +400,9 @@ class t8Sim extends theoryClass { this.dy = other.dy; this.dz = other.dz; this.msTimer = other.msTimer; + //this.isMX = other.isMX; + this.milestoneVariant = other.milestoneVariant; + this.ssPoint = other.ssPoint; } copy() { let copySim = new t8Sim(this.getDataForCopy()); diff --git a/tsconfig.json b/tsconfig.json index 943609e8..f5257824 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "es2023" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ From 7625a77cce1d6f96ff2e0304857505fb996cd276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Thu, 9 Jul 2026 17:41:41 -0500 Subject: [PATCH 03/10] re-enable coast strats --- src/Theories/T1-T8/T8.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index 11118a6a..7d70a292 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -30,7 +30,7 @@ export default async function t8(data: theoryData): Promise { res = await sim.simulate(); } else { - return defaultResult(); + //return defaultResult(); let data2: theoryData = JSON.parse(JSON.stringify(data)); data2.strat = data2.strat.replace("Coast", ""); const sim1 = new t8Sim(data2, MXVariant, ss); From f1f036da4305776f9629de9667508bcbea0f873a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Thu, 9 Jul 2026 21:22:51 -0500 Subject: [PATCH 04/10] Final Cleanup and Strat Splitting - Finalized ranges of strategy usage - Split necessary strategies - Removed unused strategies --- src/Data/data.json | 61 +++++++------ src/Theories/T1-T8/T8.ts | 180 ++++++++++++++++++++++----------------- 2 files changed, 138 insertions(+), 103 deletions(-) diff --git a/src/Data/data.json b/src/Data/data.json index 60a52fa5..ad83582d 100644 --- a/src/Data/data.json +++ b/src/Data/data.json @@ -407,31 +407,43 @@ "tauFactor": 1, "strats": { "T8": { - "stratFilterCondition": "Idle || (Semi-Idle && rho < 100)" + "stratFilterCondition": "Idle && (rho < 52 || rho >= 160)" }, - "T8SingleMS": { - "stratFilterCondition": "Semi-Idle && rho >= 20 && rho < 80" + "T8M1": { + "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 80 && rho < 160" + }, + "T8M3": { + "stratFilterCondition": "Idle && rho >= 52 && rho < 80" + }, + "T8Coast": { + "stratFilterCondition": "Semi-Idle && ((rho >= 20 && rho < 52) || rho >= 220)" + }, + "T8M1Coast": { + "stratFilterCondition": "Semi-Idle && rho >= 80 && rho < 160" + }, + "T8M3Coast": { + "stratFilterCondition": "Semi-Idle && rho >= 52 && rho < 80" }, "T8noC3": { - "stratFilterCondition": "(Idle || Semi-Idle) && ((rho < 40) || (rho >=50 && rho < 80) || (rho >= 155 && rho < 160))" + "stratFilterCondition": "Idle && ((rho < 40) || (rho >=50 && rho < 80) || (rho >= 160 && rho < 220))" + }, + "T8noC3Coast": { + "stratFilterCondition": "Semi-Idle && ((rho < 40) || (rho >=50 && rho < 80))" }, "T8noC5": { "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 160 && rho < 220" }, + "T8noC5Coast": { + "stratFilterCondition": "Semi-Idle && rho >= 160 && rho < 220" + }, "T8noC35": { "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 80 && rho < 160" }, - "T8Snax": { - "stratFilterCondition": "Semi-Idle" - }, - "T8SnaxSingleMS": { - "stratFilterCondition": "Semi-Idle && rho >= 50 && rho < 60" + "T8noC35Coast": { + "stratFilterCondition": "Semi-Idle && rho >= 80 && rho < 160" }, - "T8Coast": { - "stratFilterCondition": "Semi-Idle" - }, - "T8SingleMSCoast": { - "stratFilterCondition": "Semi-Idle && rho >= 20 && rho < 80" + "T8Snax": { + "stratFilterCondition": "Semi-Idle && (rho < 160 || rho >= 220)" }, "T8noC3d": { "stratFilterCondition": "(Active || Very-Active) && ((rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" @@ -440,10 +452,10 @@ "stratFilterCondition": "(Active || Very-Active) && ((rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" }, "T8noC3dSingleMS": { - "stratFilterCondition": "(Active || Very-Active) && ((rho >= 20 && rho < 40) || (rho >= 50 && rho < 80))" + "stratFilterCondition": "(Active || Very-Active) && (rho >= 50 && rho < 76)" }, "T8noC3dSingleMSCoast": { - "stratFilterCondition": "(Active || Very-Active) && ((rho >= 20 && rho < 40) || (rho >= 50 && rho < 80))" + "stratFilterCondition": "(Active || Very-Active) && (rho >= 50 && rho < 76)" }, "T8noC5d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" @@ -454,23 +466,20 @@ "T8noC35d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, - "T8Play": { - "stratFilterCondition": "Active && ((rho >= 20 && rho < 100) || (rho >= 220))" + "T8noC35dCoast": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, - "T8PlaySingleMS": { - "stratFilterCondition": "Active && rho >= 160 && rho <= 220" + "T8Play": { + "stratFilterCondition": "false" }, "T8PlayCoast": { - "stratFilterCondition": "Active && ((rho >= 20 && rho < 100) || (rho >= 220))" - }, - "T8PlaySingleMSCoast": { - "stratFilterCondition": "Active && rho >= 160 && rho <= 220" + "stratFilterCondition": "Active && ((rho >= 20 && rho < 52) || (rho >= 220))" }, "T8PlaySolarswap": { - "stratFilterCondition": "Very-Active && rho >= 40" + "stratFilterCondition": "Very-Active && ((rho >= 40 && rho < 52) || (rho >= 155))" }, "T8PlaySolarswapCoast": { - "stratFilterCondition": "Very-Active && rho >= 40" + "stratFilterCondition": "Very-Active && ((rho >= 40 && rho < 52) || (rho >= 155))" } } }, diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index 7d70a292..00e612fc 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -5,40 +5,36 @@ import { ExponentialValue, StepwisePowerSumValue } from "../../Utils/value"; import { ExponentialCost, FirstFreeCost, parseValue } from '../../Utils/cost'; import { add, l10, getR9multiplier, toCallables, getLastLevel, getBestResult, logToExp, defaultResult } from "../../Utils/helpers"; -//106-70, 73-48, 60-40 +// T8NoC3dSingleMS const ssPoints = [ - [ // For T8noC3d - ...Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), - ...Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) + [ + ...Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)), + ...Array.from({length: 86-44+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 44)) ].toSorted((a,b) => a - b), - Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(3))))) * (lvl + 1)), - Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), - Array.from({length: 400}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) + Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)) ]; -console.log(ssPoints); export default async function t8(data: theoryData): Promise { console.log(data); async function getResult ( data: theoryData, MXVariant: number = 0, - ss: number = 0 + ssPoint: number = 0 ): Promise { let res; if (!data.strat.includes("Coast")) { - const sim = new t8Sim(data, MXVariant, ss); + const sim = new t8Sim(data, MXVariant, ssPoint); res = await sim.simulate(); } else { - //return defaultResult(); let data2: theoryData = JSON.parse(JSON.stringify(data)); data2.strat = data2.strat.replace("Coast", ""); - const sim1 = new t8Sim(data2, MXVariant, ss); + const sim1 = new t8Sim(data2, MXVariant, ssPoint); const res1 = await sim1.simulate(); const lastC1 = getLastLevel("c1", res1.boughtVars); const lastC3 = getLastLevel("c3", res1.boughtVars); const lastC5 = getLastLevel("c5", res1.boughtVars); - const sim2 = new t8Sim(data, MXVariant, ss); + const sim2 = new t8Sim(data, MXVariant, ssPoint); sim2.variables[0].setOriginalCap(lastC1) sim2.variables[0].configureCap(13); sim2.variables[2].setOriginalCap(lastC3) @@ -51,27 +47,48 @@ export default async function t8(data: theoryData): Promise { } let result: simResult = defaultResult(); - // MX and SingleMS - if (data.strat.includes("SingleMS")) { - const altOptions = (data.strat.includes("T8noC3d") - ? (data.rho < 50 ? [2, 3] : [0, 2]) // See getMilestonePriority() - : (data.strat.includes("T8noC35d") - ? [2] - : [1, 2, 3] - ) - ); - console.log(data.strat); - // Remove default MX option for SingleMS (equivalent to base strat) - for (const option of altOptions) { - // Only Swap points within e5 of recovery - for (const ssPoint of ssPoints[option].filter((num) => num > data.rho - 5)) { - const r = await getResult(data, option, ssPoint) - result = getBestResult(result, r); - if (result.pubRho < ssPoint) break; - if (result != r) break; + // T8noC3dSingleMS + if (data.strat.includes("T8noC3dSingleMS")) { + if (data.rho < 50) { + const ssPoints = [ + Array.from({length: 66}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), + Array.from({length: 55}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) + ]; + const MXVariantOptions = data.rho > 40 ? [3] : [2, 3]; + for (const MXVariant of MXVariantOptions) { + // Only Swap points within e5 of recovery + for (const ssPoint of ssPoints[MXVariant-2].filter( + (num) => (num > data.rho - 5) && (num <= data.rho) + )) { + result = getBestResult(result, await getResult(data, MXVariant, ssPoint)); + } + } + } + else { + const ssPoints = [ + [ + ...Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)), + ...Array.from({length: 86-44+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 44)) + ].toSorted((a,b) => a - b), + Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)) + ]; + const MXVariantOptions = data.rho > 59 ? [2] : (data.rho < 55 ? [0] : [0, 2]); + for (const MXVariant of MXVariantOptions) { + // Only Swap points within e5 of recovery (except M2 before e57) + for (const ssPoint of ssPoints[MXVariant/2].filter( + (num) => { + return (num > data.rho - 5) + && ( + (num <= data.rho) + || ((data.rho <= 57) && (MXVariant === 2)) + ); + } + )) { + result = getBestResult(result, await getResult(data, MXVariant, ssPoint)); + if (result.pubRho < ssPoint) break; + } } } - console.log(result); } else { result = await getResult(data); @@ -105,6 +122,31 @@ class t8Sim extends theoryClass { true, () => this.variables[4].shouldBuy, ]; + + const noC3Strat = [true, true, false, true, true]; + const noC3CoastStrat = [ + () => this.variables[0].shouldBuy, + true, + false, + true, + () => this.variables[4].shouldBuy, + ]; + const noC5Strat = [true, true, true, true, false]; + const noC5CoastStrat = [ + () => this.variables[0].shouldBuy, + true, + () => this.variables[2].shouldBuy, + true, + false, + ]; + const noC35Strat = [true, true, false, true, false]; + const noC35CoastStrat = [ + () => this.variables[0].shouldBuy, + true, + false, + true, + false, + ]; const snaxStrat = [ () => this.curMult < 1.6, true, @@ -146,14 +188,18 @@ class t8Sim extends theoryClass { const conditions: Record = { T8: idleStrat, - T8SingleMS: idleStrat, - T8noC3: [true, true, false, true, true], - T8noC5: [true, true, true, true, false], - T8noC35: [true, true, false, true, false], + T8M1: idleStrat, + T8M3: idleStrat, + T8noC3: noC3Strat, + T8noC3Coast: noC3CoastStrat, + T8noC5: noC5Strat, + T8noC5Coast: noC5CoastStrat, + T8noC35: noC35Strat, + T8noC35Coast: noC35CoastStrat, T8Snax: snaxStrat, - T8SnaxSingleMS: snaxStrat, T8Coast: idleCoastStrat, - T8SingleMSCoast: idleCoastStrat, + T8M1Coast: idleCoastStrat, + T8M3Coast: idleCoastStrat, T8noC3d: noC3dStrat, T8noC3dCoast: noC3dCoastStrat, T8noC3dSingleMS: noC3dStrat, @@ -161,10 +207,9 @@ class t8Sim extends theoryClass { T8noC5d: noC5dStrat, T8noC5dCoast: noC5dCoastStrat, T8noC35d: noC35dStrat, + T8noC35dCoast: noC35dStrat, T8Play: playStrat, - T8PlaySingleMS: playStrat, T8PlayCoast: playCoastStrat, - T8PlaySingleMSCoast: playCoastStrat, T8PlaySolarswap: playStrat, T8PlaySolarswapCoast: playCoastStrat }; @@ -176,54 +221,38 @@ class t8Sim extends theoryClass { } getMilestonePriority(): number[] { const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); - const maxRho = Math.max(this.maxRho, this.lastPub); switch (this.strat) { - case "T8Coast": - case "T8": - if (maxRho < 52) return [0]; - else if (maxRho < 80) return [3, 0]; - else if (maxRho < 160 && maxRho >= 220) return [2, 0, 3, 1]; - return [1, 0, 2, 3]; - // TODO: Split this strat into 2 seperate named strats for clarity + case "T8M1Coast": + case "T8M1": return [1, 0, 2]; + case "T8M3Coast": + case "T8M3": return [3, 0]; case "T8noC3": + case "T8noC3Coast": case "T8noC3dCoast": - case "T8noC3d": return maxRho < 50 ? [0] : [3, 0, 2]; + case "T8noC3d": return Math.max(this.maxRho, this.lastPub) < 50 ? [0] : [3, 0, 2]; case "T8noC3dSingleMSCoast": case "T8noC3dSingleMS": - if (maxRho < 50) { + if (Math.max(this.maxRho, this.lastPub) < 50) { return this.maxRho < this.ssPoint ? [this.milestoneVariant] : [0]; } return this.maxRho < this.ssPoint ? [this.milestoneVariant, 0, 3, 2] : [3, 0, 2]; case "T8noC5": + case "T8noC5Coast": case "T8noC5dCoast": case "T8noC5d": return [0, 2, 1]; case "T8noC35": + case "T8noC35Coast": + case "T8noC35dCoast": case "T8noC35d": return [2, 0]; - case "T8Snax": - if (maxRho < 60) return [0]; - else if (maxRho < 80) return [3]; - else if (maxRho < 160) return [2, 0, 3]; - return [1, 0, 2, 3]; case "T8Play": case "T8PlayCoast": return milestoneCount < 4 ? [0, 3] : [2, 0, 3, 1]; case "T8PlaySolarswap": case "T8PlaySolarswapCoast": return milestoneCount < 4 ? [0, 3] : [0, 2, 3, 1]; } - switch (milestoneCount) { - case 0: - case 1: - case 2: return (this.strat.includes("SingleMS") && this.maxRho < this.ssPoint) ? [0] : [this.milestoneVariant]; - case 3: - if (this.strat.includes("SingleMS")) { - return (this.maxRho < this.ssPoint - ? [0, this.milestoneVariant] - : [this.milestoneVariant] - ); - } - return [3]; - default: return (this.strat.includes("SingleMS") && this.maxRho < this.ssPoint) ? [this.milestoneVariant] : [2, 0, 3, 1]; - } + if (milestoneCount < 3) return [0]; + else if (milestoneCount == 3) return [3]; + else return [2, 0, 3, 1]; } updateMilestones(): void { const prevAttractor = this.milestones[0]; @@ -302,7 +331,6 @@ class t8Sim extends theoryClass { new Variable({ name: "c5", cost: new ExponentialCost(1e2, 1.15 * Math.log2(7), true), valueScaling: new ExponentialValue(7) }), ]; this.msTimer = 0; - //this.isMX = isMX(this.strat, this.lastPub); this.milestoneVariant = milestoneVariant; this.ssPoint = ssPoint; this.updateMilestones(); @@ -322,10 +350,6 @@ class t8Sim extends theoryClass { if (this.strat.includes("SingleMS")) { stratExtra += ` ${logToExp(this.ssPoint,2)}`; } - //this.isMX = isMX(this.strat, this.pubRho); - /*if (this.isMX) { - stratExtra += ` M${this.milestoneVariant}`; - }*/ if (this.strat.includes("Coast")) { stratExtra += this.variables[0].prepareExtraForCap(getLastLevel("c1", this.boughtVars)); if (!this.strat.includes("noC3") && !this.strat.includes("noC35")) { @@ -336,7 +360,11 @@ class t8Sim extends theoryClass { } } this.trimBoughtVars(); - return getBestResult(this.createResult(stratExtra), this.bestForkRes); + const result = this.createResult(stratExtra); + if (this.strat.includes("SingleMS")) { //T8NoC3dSingleMS + result.strat = `T8M${this.milestoneVariant}${result.strat.slice(2)}`; + } + return getBestResult(result, this.bestForkRes); } tick() { this.dn(); @@ -386,7 +414,6 @@ class t8Sim extends theoryClass { const rhodot = l10(this.dt) + this.totMult + this.variables[0].value + this.variables[1].value + add(dx2Term, dy2Term, dz2Term) / 2 - 2; this.rho.add(rhodot); - //if (!this.isMX) this.isMX = isMX(this.strat, Math.max(this.rho.value, this.lastPub)); } copyFrom(other: this) { super.copyFrom(other); @@ -400,7 +427,6 @@ class t8Sim extends theoryClass { this.dy = other.dy; this.dz = other.dz; this.msTimer = other.msTimer; - //this.isMX = other.isMX; this.milestoneVariant = other.milestoneVariant; this.ssPoint = other.ssPoint; } From bed794556177cea88d190f0c64a9698300a80357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Thu, 9 Jul 2026 22:37:29 -0500 Subject: [PATCH 05/10] Removal of T8M1 and T8M3 strategies --- src/Data/data.json | 12 ------------ src/Theories/T1-T8/T8.ts | 13 ++----------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/Data/data.json b/src/Data/data.json index ad83582d..f5a28889 100644 --- a/src/Data/data.json +++ b/src/Data/data.json @@ -409,21 +409,9 @@ "T8": { "stratFilterCondition": "Idle && (rho < 52 || rho >= 160)" }, - "T8M1": { - "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 80 && rho < 160" - }, - "T8M3": { - "stratFilterCondition": "Idle && rho >= 52 && rho < 80" - }, "T8Coast": { "stratFilterCondition": "Semi-Idle && ((rho >= 20 && rho < 52) || rho >= 220)" }, - "T8M1Coast": { - "stratFilterCondition": "Semi-Idle && rho >= 80 && rho < 160" - }, - "T8M3Coast": { - "stratFilterCondition": "Semi-Idle && rho >= 52 && rho < 80" - }, "T8noC3": { "stratFilterCondition": "Idle && ((rho < 40) || (rho >=50 && rho < 80) || (rho >= 160 && rho < 220))" }, diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index 00e612fc..6439bacb 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -111,7 +111,6 @@ class t8Sim extends theoryClass { msTimer: number; ssPoint: number; milestoneVariant: number; - //isMX: boolean; getBuyingConditions(): conditionFunction[] { const idleStrat = new Array(5).fill(true); @@ -188,8 +187,7 @@ class t8Sim extends theoryClass { const conditions: Record = { T8: idleStrat, - T8M1: idleStrat, - T8M3: idleStrat, + T8Coast: idleCoastStrat, T8noC3: noC3Strat, T8noC3Coast: noC3CoastStrat, T8noC5: noC5Strat, @@ -197,9 +195,6 @@ class t8Sim extends theoryClass { T8noC35: noC35Strat, T8noC35Coast: noC35CoastStrat, T8Snax: snaxStrat, - T8Coast: idleCoastStrat, - T8M1Coast: idleCoastStrat, - T8M3Coast: idleCoastStrat, T8noC3d: noC3dStrat, T8noC3dCoast: noC3dCoastStrat, T8noC3dSingleMS: noC3dStrat, @@ -222,10 +217,6 @@ class t8Sim extends theoryClass { getMilestonePriority(): number[] { const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); switch (this.strat) { - case "T8M1Coast": - case "T8M1": return [1, 0, 2]; - case "T8M3Coast": - case "T8M3": return [3, 0]; case "T8noC3": case "T8noC3Coast": case "T8noC3dCoast": @@ -362,7 +353,7 @@ class t8Sim extends theoryClass { this.trimBoughtVars(); const result = this.createResult(stratExtra); if (this.strat.includes("SingleMS")) { //T8NoC3dSingleMS - result.strat = `T8M${this.milestoneVariant}${result.strat.slice(2)}`; + result.strat = result.strat.replace("SingleMS", `SingleMS${this.milestoneVariant}`); } return getBestResult(result, this.bestForkRes); } From 312a34a4a60642233f7c6df0ef154fea7bd5d6ed Mon Sep 17 00:00:00 2001 From: MathisSinet Date: Fri, 10 Jul 2026 10:50:57 +0200 Subject: [PATCH 06/10] Re-added different c5 ratio for solarswap + renamed identifiers --- src/Theories/T1-T8/T8.ts | 57 ++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index 6439bacb..03ca7f62 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -5,15 +5,6 @@ import { ExponentialValue, StepwisePowerSumValue } from "../../Utils/value"; import { ExponentialCost, FirstFreeCost, parseValue } from '../../Utils/cost'; import { add, l10, getR9multiplier, toCallables, getLastLevel, getBestResult, logToExp, defaultResult } from "../../Utils/helpers"; -// T8NoC3dSingleMS -const ssPoints = [ - [ - ...Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)), - ...Array.from({length: 86-44+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 44)) - ].toSorted((a,b) => a - b), - Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)) -]; - export default async function t8(data: theoryData): Promise { console.log(data); async function getResult ( @@ -50,22 +41,22 @@ export default async function t8(data: theoryData): Promise { // T8noC3dSingleMS if (data.strat.includes("T8noC3dSingleMS")) { if (data.rho < 50) { - const ssPoints = [ + const singleSwapPoints = [ Array.from({length: 66}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), Array.from({length: 55}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) ]; const MXVariantOptions = data.rho > 40 ? [3] : [2, 3]; for (const MXVariant of MXVariantOptions) { // Only Swap points within e5 of recovery - for (const ssPoint of ssPoints[MXVariant-2].filter( + for (const singleSwapPoint of singleSwapPoints[MXVariant-2].filter( (num) => (num > data.rho - 5) && (num <= data.rho) )) { - result = getBestResult(result, await getResult(data, MXVariant, ssPoint)); + result = getBestResult(result, await getResult(data, MXVariant, singleSwapPoint)); } } } else { - const ssPoints = [ + const singleSwapPoints = [ [ ...Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)), ...Array.from({length: 86-44+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 44)) @@ -75,7 +66,7 @@ export default async function t8(data: theoryData): Promise { const MXVariantOptions = data.rho > 59 ? [2] : (data.rho < 55 ? [0] : [0, 2]); for (const MXVariant of MXVariantOptions) { // Only Swap points within e5 of recovery (except M2 before e57) - for (const ssPoint of ssPoints[MXVariant/2].filter( + for (const singleSwapPoint of singleSwapPoints[MXVariant/2].filter( (num) => { return (num > data.rho - 5) && ( @@ -84,8 +75,8 @@ export default async function t8(data: theoryData): Promise { ); } )) { - result = getBestResult(result, await getResult(data, MXVariant, ssPoint)); - if (result.pubRho < ssPoint) break; + result = getBestResult(result, await getResult(data, MXVariant, singleSwapPoint)); + if (result.pubRho < singleSwapPoint) break; } } } @@ -109,7 +100,7 @@ class t8Sim extends theoryClass { dy: number; dz: number; msTimer: number; - ssPoint: number; + singleSwapPoint: number; milestoneVariant: number; getBuyingConditions(): conditionFunction[] { @@ -175,9 +166,23 @@ class t8Sim extends theoryClass { true, () => this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), true, - () => this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + () => this.variables[4].cost + l10(4) < Math.min(this.variables[1].cost, this.variables[3].cost), ]; const playCoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(4) < Math.min(this.variables[1].cost, this.variables[3].cost)), + ]; + const playSolarswapStrat = [ + () => this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost), + true, + () => this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + true, + () => this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + ]; + const playSolarswapCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), @@ -205,8 +210,8 @@ class t8Sim extends theoryClass { T8noC35dCoast: noC35dStrat, T8Play: playStrat, T8PlayCoast: playCoastStrat, - T8PlaySolarswap: playStrat, - T8PlaySolarswapCoast: playCoastStrat + T8PlaySolarswap: playSolarswapStrat, + T8PlaySolarswapCoast: playSolarswapCoastStrat }; return toCallables(conditions[this.strat]); } @@ -224,9 +229,9 @@ class t8Sim extends theoryClass { case "T8noC3dSingleMSCoast": case "T8noC3dSingleMS": if (Math.max(this.maxRho, this.lastPub) < 50) { - return this.maxRho < this.ssPoint ? [this.milestoneVariant] : [0]; + return this.maxRho < this.singleSwapPoint ? [this.milestoneVariant] : [0]; } - return this.maxRho < this.ssPoint ? [this.milestoneVariant, 0, 3, 2] : [3, 0, 2]; + return this.maxRho < this.singleSwapPoint ? [this.milestoneVariant, 0, 3, 2] : [3, 0, 2]; case "T8noC5": case "T8noC5Coast": case "T8noC5dCoast": @@ -277,7 +282,7 @@ class t8Sim extends theoryClass { constructor( data: theoryData, milestoneVariant: number = 0, - ssPoint: number = 0 + singleSwapPoint: number = 0 ) { super(data); //attractor stuff @@ -323,7 +328,7 @@ class t8Sim extends theoryClass { ]; this.msTimer = 0; this.milestoneVariant = milestoneVariant; - this.ssPoint = ssPoint; + this.singleSwapPoint = singleSwapPoint; this.updateMilestones(); } async simulate(): Promise { @@ -339,7 +344,7 @@ class t8Sim extends theoryClass { } let stratExtra = ""; if (this.strat.includes("SingleMS")) { - stratExtra += ` ${logToExp(this.ssPoint,2)}`; + stratExtra += ` ${logToExp(this.singleSwapPoint,2)}`; } if (this.strat.includes("Coast")) { stratExtra += this.variables[0].prepareExtraForCap(getLastLevel("c1", this.boughtVars)); @@ -419,7 +424,7 @@ class t8Sim extends theoryClass { this.dz = other.dz; this.msTimer = other.msTimer; this.milestoneVariant = other.milestoneVariant; - this.ssPoint = other.ssPoint; + this.singleSwapPoint = other.singleSwapPoint; } copy() { let copySim = new t8Sim(this.getDataForCopy()); From 86bc12339997ff2dc56be3decc9fd425ed013c6f Mon Sep 17 00:00:00 2001 From: MathisSinet Date: Fri, 10 Jul 2026 15:22:57 +0200 Subject: [PATCH 07/10] Removed pre-e50 singleMS --- src/Theories/T1-T8/T8.ts | 69 +++++++++++++++------------------------- 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index 03ca7f62..c0794656 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -10,22 +10,22 @@ export default async function t8(data: theoryData): Promise { async function getResult ( data: theoryData, MXVariant: number = 0, - ssPoint: number = 0 + singleSwapPoint: number = 0 ): Promise { let res; if (!data.strat.includes("Coast")) { - const sim = new t8Sim(data, MXVariant, ssPoint); + const sim = new t8Sim(data, MXVariant, singleSwapPoint); res = await sim.simulate(); } else { let data2: theoryData = JSON.parse(JSON.stringify(data)); data2.strat = data2.strat.replace("Coast", ""); - const sim1 = new t8Sim(data2, MXVariant, ssPoint); + const sim1 = new t8Sim(data2, MXVariant, singleSwapPoint); const res1 = await sim1.simulate(); const lastC1 = getLastLevel("c1", res1.boughtVars); const lastC3 = getLastLevel("c3", res1.boughtVars); const lastC5 = getLastLevel("c5", res1.boughtVars); - const sim2 = new t8Sim(data, MXVariant, ssPoint); + const sim2 = new t8Sim(data, MXVariant, singleSwapPoint); sim2.variables[0].setOriginalCap(lastC1) sim2.variables[0].configureCap(13); sim2.variables[2].setOriginalCap(lastC3) @@ -40,46 +40,30 @@ export default async function t8(data: theoryData): Promise { let result: simResult = defaultResult(); // T8noC3dSingleMS if (data.strat.includes("T8noC3dSingleMS")) { - if (data.rho < 50) { - const singleSwapPoints = [ - Array.from({length: 66}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 1)), - Array.from({length: 55}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 1)) - ]; - const MXVariantOptions = data.rho > 40 ? [3] : [2, 3]; - for (const MXVariant of MXVariantOptions) { - // Only Swap points within e5 of recovery - for (const singleSwapPoint of singleSwapPoints[MXVariant-2].filter( - (num) => (num > data.rho - 5) && (num <= data.rho) - )) { - result = getBestResult(result, await getResult(data, MXVariant, singleSwapPoint)); - } - } - } - else { - const singleSwapPoints = [ - [ - ...Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)), - ...Array.from({length: 86-44+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(7))))) * (lvl + 44)) - ].toSorted((a,b) => a - b), - Array.from({length: 104-53+1}, (_, lvl) => parseValue(String(1e2)) + (l10(2) * 10**parseValue(String((1.15 * Math.log2(5))))) * (lvl + 53)) - ]; - const MXVariantOptions = data.rho > 59 ? [2] : (data.rho < 55 ? [0] : [0, 2]); - for (const MXVariant of MXVariantOptions) { - // Only Swap points within e5 of recovery (except M2 before e57) - for (const singleSwapPoint of singleSwapPoints[MXVariant/2].filter( - (num) => { - return (num > data.rho - 5) - && ( - (num <= data.rho) - || ((data.rho <= 57) && (MXVariant === 2)) - ); - } - )) { - result = getBestResult(result, await getResult(data, MXVariant, singleSwapPoint)); - if (result.pubRho < singleSwapPoint) break; + const singleSwapPoints = [ + [ + ...Array.from({length: 104-53+1}, (_, lvl) => l10(1e2) + (l10(2) * (1.15 * Math.log2(5)) * (lvl + 53))), + ...Array.from({length: 86-44+1}, (_, lvl) => l10(1e2) + (l10(2) * (1.15 * Math.log2(7)) * (lvl + 44))) + ].toSorted((a,b) => a - b), + Array.from({length: 104-53+1}, (_, lvl) => l10(1e2) + (l10(2) * (1.15 * Math.log2(5))) * (lvl + 53)) + ]; + const MXVariantOptions = data.rho > 59 ? [2] : (data.rho < 55 ? [0] : [0, 2]); + for (const MXVariant of MXVariantOptions) { + // Only Swap points within e5 of recovery (except M2 before e57) + for (const singleSwapPoint of singleSwapPoints[MXVariant/2].filter( + (num) => { + return (num > data.rho - 5) + && ( + (num <= data.rho) + || ((data.rho <= 57) && (MXVariant === 2)) + ); } + )) { + result = getBestResult(result, await getResult(data, MXVariant, singleSwapPoint)); + if (result.pubRho < singleSwapPoint) break; } } + } else { result = await getResult(data); @@ -228,9 +212,6 @@ class t8Sim extends theoryClass { case "T8noC3d": return Math.max(this.maxRho, this.lastPub) < 50 ? [0] : [3, 0, 2]; case "T8noC3dSingleMSCoast": case "T8noC3dSingleMS": - if (Math.max(this.maxRho, this.lastPub) < 50) { - return this.maxRho < this.singleSwapPoint ? [this.milestoneVariant] : [0]; - } return this.maxRho < this.singleSwapPoint ? [this.milestoneVariant, 0, 3, 2] : [3, 0, 2]; case "T8noC5": case "T8noC5Coast": From 21927d8f1b698e609f6512912e59a02329e3bfb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Fri, 10 Jul 2026 19:01:58 -0500 Subject: [PATCH 08/10] Add additional Strats - Removed Strats - T8noC3dSingleMS0 - T8noC3dSingleMS2 - T8PlaySolarswap - Added Strats - T8noC3d2 - T8noC3d2Coast - T8NoC3d2SolarswapCoast - T8PlayNoC3SolarswapCoast - Renamed all `noCX` strats to `NoCX` --- src/Data/data.json | 53 ++++++++-------- src/Theories/T1-T8/T8.ts | 126 +++++++++++++++++++++++++-------------- 2 files changed, 108 insertions(+), 71 deletions(-) diff --git a/src/Data/data.json b/src/Data/data.json index e8969ff3..ce08a363 100644 --- a/src/Data/data.json +++ b/src/Data/data.json @@ -412,65 +412,68 @@ "T8Coast": { "stratFilterCondition": "Semi-Idle && ((rho >= 20 && rho < 52) || rho >= 220)" }, - "T8noC3": { + "T8NoC3": { "stratFilterCondition": "Idle && ((rho < 40) || (rho >=50 && rho < 80) || (rho >= 160 && rho < 220))" }, - "T8noC3Coast": { + "T8NoC3Coast": { "stratFilterCondition": "Semi-Idle && ((rho < 40) || (rho >=50 && rho < 80))" }, - "T8noC5": { + "T8NoC5": { "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 160 && rho < 220" }, - "T8noC5Coast": { + "T8NoC5Coast": { "stratFilterCondition": "Semi-Idle && rho >= 160 && rho < 220" }, - "T8noC35": { + "T8NoC35": { "stratFilterCondition": "(Idle || Semi-Idle) && rho >= 80 && rho < 160" }, - "T8noC35Coast": { + "T8NoC35Coast": { "stratFilterCondition": "Semi-Idle && rho >= 80 && rho < 160" }, "T8Snax": { "stratFilterCondition": "Semi-Idle && (rho < 160 || rho >= 220)" }, - "T8noC3d": { - "stratFilterCondition": "(Active || Very-Active) && ((rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" + "T8NoC3d": { + "stratFilterCondition": "(Active || Very-Active) && ((rho >= 8 && rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" }, - "T8noC3dCoast": { - "stratFilterCondition": "(Active || Very-Active) && ((rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" + "T8NoC3d2": { + "stratFilterCondition": "(Active || Very-Active) && ((rho < 8) || (rho >=20 && rho < 40) || (rho >= 160 && rho < 220))" }, - "T8noC3dSingleMS0": { - "stratFilterCondition": "(Active || Very-Active) && (rho >= 50 && rho < 59)" + "T8NoC3dCoast": { + "stratFilterCondition": "(Active || Very-Active) && ((rho >= 8 && rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" }, - "T8noC3dSingleMS2": { - "stratFilterCondition": "(Active || Very-Active) && (rho >= 55 && rho < 76)" + "T8NoC3d2Coast": { + "stratFilterCondition": "(Active || Very-Active) && ((rho < 8) || (rho >=20 && rho < 40) || (rho >= 160 && rho < 220))" }, - "T8noC3dSingleMS0Coast": { + "T8NoC3dSingleMS0Coast": { "stratFilterCondition": "(Active || Very-Active) && (rho >= 50 && rho < 59)" }, - "T8noC3dSingleMS2Coast": { + "T8NoC3dSingleMS2Coast": { "stratFilterCondition": "(Active || Very-Active) && (rho >= 55 && rho < 76)" }, - "T8noC5d": { + "T8NoC5d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" }, - "T8noC5dCoast": { + "T8NoC5dCoast": { "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" }, - "T8noC35d": { + "T8NoC35d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, - "T8noC35dCoast": { + "T8NoC35dCoast": { "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, "T8PlayCoast": { - "stratFilterCondition": "Active && ((rho >= 20 && rho < 52) || (rho >= 220))" - }, - "T8PlaySolarswap": { - "stratFilterCondition": "Very-Active && ((rho >= 40 && rho < 52) || (rho >= 155))" + "stratFilterCondition": "(Active && ((rho >= 20 && rho < 52) || (rho >= 220))) || (Very-Active && rho >=20 && rho < 40)" }, "T8PlaySolarswapCoast": { - "stratFilterCondition": "Very-Active && ((rho >= 40 && rho < 52) || (rho >= 155))" + "stratFilterCondition": "Very-Active && ((rho >= 40 && rho < 52) || (rho >= 220))" + }, + "T8NoC3d2SolarswapCoast": { + "stratFilterCondition": "Very-Active && rho >= 160 && rho < 220" + }, + "T8PlayNoC3SolarswapCoast": { + "stratFilterCondition": "Very-Active && rho >= 160 && rho < 220" } } }, diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index bd07a3cf..a9d2fda5 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -13,6 +13,14 @@ const singleMSPoints = [ ].toSorted((a,b) => a - b), Array.from({length: 104-53+1}, (_, lvl) => l10(1e2) + (l10(2) * (1.15 * Math.log2(5))) * (lvl + 53)) ]; +const orphanCoastStrats = [ + "T8NoC3dSingleMS0Coast", + "T8NoC3dSingleMS2Coast", + "T8PlayCoast", + "T8PlaySolarswapCoast", + "T8PlayNoC3SolarswapCoast", + "T8NoC3d2SolarswapCoast" +]; export default async function t8(data: theoryData): Promise { async function getResult ( @@ -26,7 +34,7 @@ export default async function t8(data: theoryData): Promise { } else { let data2: theoryData = JSON.parse(JSON.stringify(data)); - if (data2.strat !== "T8PlayCoast") data2.strat = data2.strat.replace("Coast", ""); + if (!orphanCoastStrats.includes(data2.strat)) data2.strat = data2.strat.replace("Coast", ""); const sim1 = new t8Sim(data2, singleMSPoint); const res1 = await sim1.simulate(); const lastC1 = getLastLevel("c1", res1.boughtVars); @@ -45,8 +53,8 @@ export default async function t8(data: theoryData): Promise { } let result: simResult = defaultResult(); - // T8noC3dSingleMS - if (data.strat.includes("T8noC3dSingleMS")) { + // T8NoC3dSingleMS + if (data.strat.includes("T8NoC3dSingleMS")) { const singleMSVariant = Number(data.strat.slice(data.strat.indexOf("SingleMS")+8).slice(0, 1)); // Only Swap points within e5 of recovery (except M2 before e57) for (const singleMSPoint of singleMSPoints[singleMSVariant/2].filter( @@ -61,6 +69,13 @@ export default async function t8(data: theoryData): Promise { result = getBestResult(result, await getResult(data, singleMSPoint)); if (result.pubRho < singleMSPoint) break; } + // If result is outside of the bounds of the SingleMS, then properly handle the blank output. + if (result === defaultResult()) { + result.theory = data.theory; + result.sigma = data.sigma; + result.lastPub = data.rho; + result.strat = data.strat; + } } else { result = await getResult(data); @@ -124,7 +139,15 @@ class t8Sim extends theoryClass { true, () => this.curMult < 2.3 ]; + const noC3dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, true]; + const noC3d2Strat = [ + () => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), + true, + false, + true, + () => this.variables[4].cost + l10(4) < Math.min(this.variables[1].cost, this.variables[3].cost) + ]; const noC3dCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost)), true, @@ -132,6 +155,14 @@ class t8Sim extends theoryClass { true, () => this.variables[4].shouldBuy ]; + const noC3d2CoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(8) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + false, + true, + () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), + ]; + const noC5dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, false]; const noC5dCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost)), @@ -141,6 +172,7 @@ class t8Sim extends theoryClass { false ]; const noC35dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, false]; + const playCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, @@ -148,17 +180,17 @@ class t8Sim extends theoryClass { true, () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(4) < Math.min(this.variables[1].cost, this.variables[3].cost)), ]; - const playSolarswapStrat = [ - () => this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost), + const playSolarswapCoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, - () => this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, - () => this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost), + () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), ]; - const playSolarswapCoastStrat = [ + const playNoC3SolarswapCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, - () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), + false, true, () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), ]; @@ -166,26 +198,27 @@ class t8Sim extends theoryClass { const conditions: Record = { T8: idleStrat, T8Coast: idleCoastStrat, - T8noC3: noC3Strat, - T8noC3Coast: noC3CoastStrat, - T8noC5: noC5Strat, - T8noC5Coast: noC5CoastStrat, - T8noC35: noC35Strat, - T8noC35Coast: noC35CoastStrat, + T8NoC3: noC3Strat, + T8NoC3Coast: noC3CoastStrat, + T8NoC5: noC5Strat, + T8NoC5Coast: noC5CoastStrat, + T8NoC35: noC35Strat, + T8NoC35Coast: noC35CoastStrat, T8Snax: snaxStrat, - T8noC3d: noC3dStrat, - T8noC3dCoast: noC3dCoastStrat, - T8noC3dSingleMS0: noC3dStrat, - T8noC3dSingleMS2: noC3dStrat, - T8noC3dSingleMS0Coast: noC3dCoastStrat, - T8noC3dSingleMS2Coast: noC3dCoastStrat, - T8noC5d: noC5dStrat, - T8noC5dCoast: noC5dCoastStrat, - T8noC35d: noC35dStrat, - T8noC35dCoast: noC35dStrat, + T8NoC3d: noC3dStrat, + T8NoC3d2: noC3d2Strat, + T8NoC3dCoast: noC3dCoastStrat, + T8NoC3d2Coast: noC3d2CoastStrat, + T8NoC3dSingleMS0Coast: noC3dCoastStrat, + T8NoC3dSingleMS2Coast: noC3dCoastStrat, + T8NoC5d: noC5dStrat, + T8NoC5dCoast: noC5dCoastStrat, + T8NoC35d: noC35dStrat, + T8NoC35dCoast: noC35dStrat, T8PlayCoast: playCoastStrat, - T8PlaySolarswap: playSolarswapStrat, - T8PlaySolarswapCoast: playSolarswapCoastStrat + T8NoC3d2SolarswapCoast: noC3d2CoastStrat, + T8PlaySolarswapCoast: playSolarswapCoastStrat, + T8PlayNoC3SolarswapCoast: playNoC3SolarswapCoastStrat, }; return toCallables(conditions[this.strat]); } @@ -196,25 +229,26 @@ class t8Sim extends theoryClass { getMilestonePriority(): number[] { const milestoneCount = Math.min(11, Math.floor(Math.max(this.lastPub, this.maxRho) / 20)); switch (this.strat) { - case "T8noC3": - case "T8noC3Coast": - case "T8noC3dCoast": - case "T8noC3d": return Math.max(this.maxRho, this.lastPub) < 50 ? [0] : [3, 0, 2]; - case "T8noC3dSingleMS0Coast": - case "T8noC3dSingleMS0": return this.maxRho < this.singleMSPoint ? [0, 3, 2] : [3, 0, 2]; - case "T8noC3dSingleMS2Coast": - case "T8noC3dSingleMS2": return this.maxRho < this.singleMSPoint ? [2, 0, 3] : [3, 0, 2]; - case "T8noC5": - case "T8noC5Coast": - case "T8noC5dCoast": - case "T8noC5d": return [0, 2, 1]; - case "T8noC35": - case "T8noC35Coast": - case "T8noC35dCoast": - case "T8noC35d": return [2, 0]; + case "T8NoC3": + case "T8NoC3Coast": + case "T8NoC3d2": + case "T8NoC3d2Coast": + case "T8NoC3d": + case "T8NoC3dCoast": return Math.max(this.maxRho, this.lastPub) < 50 ? [0] : [3, 0, 2]; + case "T8NoC3dSingleMS0Coast": return this.maxRho < this.singleMSPoint ? [0, 3, 2] : [3, 0, 2]; + case "T8NoC3dSingleMS2Coast": return this.maxRho < this.singleMSPoint ? [2, 0, 3] : [3, 0, 2]; + case "T8NoC5": + case "T8NoC5Coast": + case "T8NoC5dCoast": + case "T8NoC5d": return [0, 2, 1]; + case "T8NoC35": + case "T8NoC35Coast": + case "T8NoC35dCoast": + case "T8NoC35d": return [2, 0]; case "T8PlayCoast": return milestoneCount < 4 ? [0, 3] : [2, 0, 3, 1]; - case "T8PlaySolarswap": case "T8PlaySolarswapCoast": return milestoneCount < 4 ? [0, 3] : [0, 2, 3, 1]; + case "T8NoC3d2SolarswapCoast": + case "T8PlayNoC3SolarswapCoast": return milestoneCount < 4 ? [0, 3] : [0, 2, 3]; } if (milestoneCount < 3) return [0]; @@ -317,10 +351,10 @@ class t8Sim extends theoryClass { } if (this.strat.includes("Coast")) { stratExtra += this.variables[0].prepareExtraForCap(getLastLevel("c1", this.boughtVars)); - if (!this.strat.includes("noC3") && !this.strat.includes("noC35")) { + if (!this.strat.includes("NoC3") && !this.strat.includes("NoC35")) { stratExtra += this.variables[2].prepareExtraForCap(getLastLevel("c3", this.boughtVars)); } - if (!this.strat.includes("noC5") && !this.strat.includes("noC35")) { + if (!this.strat.includes("NoC5") && !this.strat.includes("NoC35")) { stratExtra += this.variables[4].prepareExtraForCap(getLastLevel("c5", this.boughtVars)); } } From 36cf2422c2d04784fd920780f279efab7705cc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Mon, 13 Jul 2026 13:23:23 -0500 Subject: [PATCH 09/10] Add additional Strats - Removed Strats - T8NoC5d - T8NoC3d2SolarswapCoast - Added Strats - T8PlayNoC35 - T8PlayNoC35Coast - T8PlayNoC5SolarSwapCoast - Adjusted filter condition of various T8 strats --- src/Data/data.json | 21 ++++++++------- src/Theories/T1-T8/T8.ts | 57 +++++++++++++++++++++++++++++++--------- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/src/Data/data.json b/src/Data/data.json index ce08a363..f744de2e 100644 --- a/src/Data/data.json +++ b/src/Data/data.json @@ -434,16 +434,16 @@ "stratFilterCondition": "Semi-Idle && (rho < 160 || rho >= 220)" }, "T8NoC3d": { - "stratFilterCondition": "(Active || Very-Active) && ((rho >= 8 && rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" + "stratFilterCondition": "(Active || Very-Active) && ((rho >= 8 && rho < 40) || (rho >= 50 && rho < 80))" }, "T8NoC3d2": { - "stratFilterCondition": "(Active || Very-Active) && ((rho < 8) || (rho >=20 && rho < 40) || (rho >= 160 && rho < 220))" + "stratFilterCondition": "((Active || Very-Active) && ((rho < 8) || (rho >=20 && rho < 40) || (rho >= 160 && rho < 180))) || (Active && rho >= 160 && rho < 220)" }, "T8NoC3dCoast": { - "stratFilterCondition": "(Active || Very-Active) && ((rho >= 8 && rho < 40) || (rho >= 50 && rho < 80) || (rho >= 160 && rho < 220))" + "stratFilterCondition": "((Active || Very-Active) && ((rho >= 8 && rho < 40) || (rho >= 50 && rho < 80))) || (Active && rho >= 160 && rho < 220)" }, "T8NoC3d2Coast": { - "stratFilterCondition": "(Active || Very-Active) && ((rho < 8) || (rho >=20 && rho < 40) || (rho >= 160 && rho < 220))" + "stratFilterCondition": "((Active || Very-Active) && ((rho < 8) || (rho >=20 && rho < 40) || (rho >= 160 && rho < 180))) || (Active && rho >= 160 && rho < 220)" }, "T8NoC3dSingleMS0Coast": { "stratFilterCondition": "(Active || Very-Active) && (rho >= 50 && rho < 59)" @@ -451,25 +451,28 @@ "T8NoC3dSingleMS2Coast": { "stratFilterCondition": "(Active || Very-Active) && (rho >= 55 && rho < 76)" }, - "T8NoC5d": { - "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" - }, "T8NoC5dCoast": { - "stratFilterCondition": "(Active || Very-Active) && rho >= 160 && rho < 220" + "stratFilterCondition": "(Active && rho >= 160 && rho < 220) || (Very-Active && rho >= 160 && rho < 180)" }, "T8NoC35d": { "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, + "T8PlayNoC35": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" + }, "T8NoC35dCoast": { "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" }, + "T8PlayNoC35Coast": { + "stratFilterCondition": "(Active || Very-Active) && rho >= 72 && rho < 160" + }, "T8PlayCoast": { "stratFilterCondition": "(Active && ((rho >= 20 && rho < 52) || (rho >= 220))) || (Very-Active && rho >=20 && rho < 40)" }, "T8PlaySolarswapCoast": { "stratFilterCondition": "Very-Active && ((rho >= 40 && rho < 52) || (rho >= 220))" }, - "T8NoC3d2SolarswapCoast": { + "T8PlayNoC5SolarswapCoast": { "stratFilterCondition": "Very-Active && rho >= 160 && rho < 220" }, "T8PlayNoC3SolarswapCoast": { diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index a9d2fda5..ff0a7031 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -19,7 +19,7 @@ const orphanCoastStrats = [ "T8PlayCoast", "T8PlaySolarswapCoast", "T8PlayNoC3SolarswapCoast", - "T8NoC3d2SolarswapCoast" + "T8NoC5dCoast" ]; export default async function t8(data: theoryData): Promise { @@ -70,7 +70,7 @@ export default async function t8(data: theoryData): Promise { if (result.pubRho < singleMSPoint) break; } // If result is outside of the bounds of the SingleMS, then properly handle the blank output. - if (result === defaultResult()) { + if (result.strat === "Result undefined") { result.theory = data.theory; result.sigma = data.sigma; result.lastPub = data.rho; @@ -163,15 +163,22 @@ class t8Sim extends theoryClass { () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), ]; - const noC5dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, true, true, false]; const noC5dCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost)), true, - () => this.variables[4].shouldBuy, + () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, false ]; + const noC35dStrat = [() => this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost), true, false, true, false]; + const noC35dCoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + 1 < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + false, + true, + false, + ]; const playCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), @@ -180,6 +187,28 @@ class t8Sim extends theoryClass { true, () => this.variables[4].shouldBuy && (this.variables[4].cost + l10(4) < Math.min(this.variables[1].cost, this.variables[3].cost)), ]; + const playNoC5CoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + () => this.variables[2].shouldBuy && (this.variables[2].cost + l10(2.5) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + false, + ]; + const playNoC35Strat = [ + () => this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost), + true, + false, + true, + false, + ]; + const playNoC35CoastStrat = [ + () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), + true, + false, + true, + false, + ]; + const playSolarswapCoastStrat = [ () => this.variables[0].shouldBuy && (this.variables[0].cost + l10(5 + 0.5 * (this.variables[0].level % 10)) < Math.min(this.variables[1].cost, this.variables[3].cost)), true, @@ -211,12 +240,13 @@ class t8Sim extends theoryClass { T8NoC3d2Coast: noC3d2CoastStrat, T8NoC3dSingleMS0Coast: noC3dCoastStrat, T8NoC3dSingleMS2Coast: noC3dCoastStrat, - T8NoC5d: noC5dStrat, T8NoC5dCoast: noC5dCoastStrat, T8NoC35d: noC35dStrat, - T8NoC35dCoast: noC35dStrat, + T8PlayNoC35: playNoC35Strat, + T8NoC35dCoast: noC35dCoastStrat, + T8PlayNoC35Coast: playNoC35CoastStrat, T8PlayCoast: playCoastStrat, - T8NoC3d2SolarswapCoast: noC3d2CoastStrat, + T8PlayNoC5SolarswapCoast: playNoC5CoastStrat, T8PlaySolarswapCoast: playSolarswapCoastStrat, T8PlayNoC3SolarswapCoast: playNoC3SolarswapCoastStrat, }; @@ -239,16 +269,17 @@ class t8Sim extends theoryClass { case "T8NoC3dSingleMS2Coast": return this.maxRho < this.singleMSPoint ? [2, 0, 3] : [3, 0, 2]; case "T8NoC5": case "T8NoC5Coast": - case "T8NoC5dCoast": - case "T8NoC5d": return [0, 2, 1]; + case "T8NoC5dCoast": return [0, 2, 1]; case "T8NoC35": case "T8NoC35Coast": - case "T8NoC35dCoast": - case "T8NoC35d": return [2, 0]; + case "T8NoC35d": + case "T8PlayNoC35": + case "T8PlayNoC35Coast": + case "T8NoC35dCoast": return [2, 0]; case "T8PlayCoast": return milestoneCount < 4 ? [0, 3] : [2, 0, 3, 1]; case "T8PlaySolarswapCoast": return milestoneCount < 4 ? [0, 3] : [0, 2, 3, 1]; - case "T8NoC3d2SolarswapCoast": - case "T8PlayNoC3SolarswapCoast": return milestoneCount < 4 ? [0, 3] : [0, 2, 3]; + case "T8PlayNoC3SolarswapCoast": return [0, 2, 3]; + case "T8PlayNoC5SolarswapCoast": return [0, 2, 1]; } if (milestoneCount < 3) return [0]; From 7dcc136a12f13929ce7d47f848992dd14ea28284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LE=E2=98=85Baldy?= Date: Mon, 13 Jul 2026 14:10:28 -0500 Subject: [PATCH 10/10] correct typo --- src/Theories/T1-T8/T8.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Theories/T1-T8/T8.ts b/src/Theories/T1-T8/T8.ts index ff0a7031..8060ed59 100644 --- a/src/Theories/T1-T8/T8.ts +++ b/src/Theories/T1-T8/T8.ts @@ -19,6 +19,7 @@ const orphanCoastStrats = [ "T8PlayCoast", "T8PlaySolarswapCoast", "T8PlayNoC3SolarswapCoast", + "T8PlayNoC5SolarswapCoast", "T8NoC5dCoast" ];