rebalance MIRV

This commit is contained in:
Evan
2025-02-10 19:59:37 -08:00
parent df8fc4208e
commit 150887d593
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ export class DefaultConfig implements Config {
};
case UnitType.MIRV:
return {
cost: () => 5_000_000,
cost: () => 10_000_000,
territoryBound: false,
};
case UnitType.MIRVWarhead:
+4 -4
View File
@@ -26,9 +26,8 @@ export class MirvExecution implements Execution {
private nuke: Unit;
private mirvRange = 500;
private warheadCount = 1000;
// private warheadRange = 5;
private mirvRange = 1500;
private warheadCount = 500;
private random: PseudoRandom;
@@ -92,7 +91,7 @@ export class MirvExecution implements Execution {
private separate() {
const dsts: TileRef[] = [this.dst];
let attempts = 1000;
let attempts = 10000;
while (attempts > 0 && dsts.length < this.warheadCount) {
attempts--;
const potential = this.randomLand(this.dst);
@@ -106,6 +105,7 @@ export class MirvExecution implements Execution {
(a, b) =>
this.mg.manhattanDist(b, this.dst) - this.mg.manhattanDist(a, this.dst)
);
console.log(`got ${dsts.length} dsts!!`);
for (const [i, dst] of dsts.entries()) {
this.mg.addExecution(
+1 -1
View File
@@ -104,7 +104,7 @@ export class NukeExecution implements Execution {
let magnitude;
switch (this.type) {
case UnitType.MIRVWarhead:
magnitude = { inner: 10, outer: 14 };
magnitude = { inner: 20, outer: 25 };
break;
case UnitType.AtomBomb:
magnitude = { inner: 15, outer: 40 };