Stage 7 numeric pass and market legibility (price moves, history, insider exits)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Opus 5.5 committed 2026-11-04 08:36:17 +08:00
1 parent 6c5db17758
commit 7b5080984a
9 files changed
+152 -21

No files matched your search

+7 -3
View File
@@ -12,7 +12,7 @@ namespace Decentralized
public static class PredictGame
{
public static readonly string[] Factions = { "FACTION_SECURITY", "FACTION_REVOLUTION", "FACTION_LOWER_LEVEL", "FACTION_UPPER_LEVEL", "FACTION_BLACK_MARKET" };
private static readonly double[] GutterCuts = { 8200, 8400, 8600, 8800 }, RustCuts = { 9030, 9060, 9090, 9120 };
private static readonly double[] GutterCuts = { 8300, 8700 }, RustCuts = { 9050, 9100 };
private static readonly double[] PriceMult = { 0.9, 0.95, 1.0, 1.05, 1.1 };
private static readonly double[] GasCuts = { 0.8, 1.0, 1.2, 1.4 };
@@ -117,7 +117,7 @@ namespace Decentralized
foreach (var t in GasCuts)
{
double thr = t;
list.Add(new PredictCandidate { Kind = PredictKind.Gas, Key = "gas", Title = "Gas", Param = thr, Tomorrow = true, Prob = (a, b) => PredictMath.GasFlat(day + 1, thr) });
list.Add(new PredictCandidate { Kind = PredictKind.Gas, Key = "gas", Title = "Gas", Param = thr, Tomorrow = true, Prob = (a, b) => GasPublic(d, day + 1, thr) });
}
if (d.Stable.CraWarnDay < 0 && d.Stable.CraSpiralDay < 0)
list.Add(new PredictCandidate { Kind = PredictKind.Cra, Key = "cra", Title = "CRA", Prob = (from, to) => PredictMath.CraWarnProb(d.Stable.CraSubsidy, CraDrain(d), day, from, to, CraHazard) });
@@ -126,6 +126,10 @@ namespace Decentralized
return list;
}
/// <summary>gas 盘的公开价:一半按真实相位、一半按不知道相位——七天周期是链上公开的,但盘口里的 NPC 只有一半在看;自己数清周期的人还有一点优势。</summary>
private static double GasPublic(SaveData d, int day, double thr) =>
d.GasPhase < 0 ? PredictMath.GasFlat(day, thr) : 0.5 * PredictMath.GasAtLeast(day, d.GasPhase, thr) + 0.5 * PredictMath.GasFlat(day, thr);
private static double CraHazard => 1 - Math.Pow(1 - Tuning.CraSpiralWeekly, 1.0 / 7);
private static double CraDrain(SaveData d) => (Tuning.CraNpcStake + d.Staking.Earning) * d.Stable.CraRate;
@@ -191,7 +195,7 @@ namespace Decentralized
case PredictKind.Price:
return PredictMath.PriceAtLeast(d.Market.Price, d.Market.Anchor(d.ActiveEvents), Tuning.PscVol, Tuning.Revert, Math.Max(1, m.ToDay - day), m.Param);
case PredictKind.Gas:
return d.GasPhase < 0 ? (double?)null : PredictMath.GasAtLeast(m.ToDay, d.GasPhase, m.Param);
return d.GasPhase < 0 ? (double?)null : GasPublic(d, m.ToDay, m.Param);
case PredictKind.Cra:
if (d.Stable.CraWarnDay >= 0 || d.Stable.CraSpiralDay >= 0) return 0.02;
return PredictMath.CraWarnProb(d.Stable.CraSubsidy, CraDrain(d), day + 1, m.FromDay, m.ToDay, CraHazard);