Merge branch 'v26'

This commit is contained in:
evanpelle
2025-10-30 19:28:17 -07:00
4 changed files with 64 additions and 6 deletions
+3 -2
View File
@@ -353,7 +353,7 @@ export class DefaultConfig implements Config {
trainSpawnRate(numPlayerFactories: number): number {
// hyperbolic decay, midpoint at 10 factories
// expected number of trains = numPlayerFactories / trainSpawnRate(numPlayerFactories)
return (numPlayerFactories + 10) * 20;
return (numPlayerFactories + 10) * 16;
}
trainGold(rel: "self" | "team" | "ally" | "other"): Gold {
switch (rel) {
@@ -378,7 +378,8 @@ export class DefaultConfig implements Config {
}
tradeShipGold(dist: number, numPorts: number): Gold {
const baseGold = Math.floor(100_000 + 100 * dist);
// Smooth anti-cheese formula: base reward scales with distance using rational function, heavily penalizing short trades while converging to original rewards at long distances
const baseGold = Math.floor(100_000 * (dist / (dist + 50)) + 100 * dist);
const numPortBonus = numPorts - 1;
// Hyperbolic decay, midpoint at 5 ports, 3x bonus max.
const bonus = 1 + 2 * (numPortBonus / (numPortBonus + 5));