diff --git a/internal/api/api_test.go b/internal/api/api_test.go index 6eaedd7..c23f5b8 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -81,9 +81,9 @@ func TestComparisonEndpointMatchesGoldenValues(t *testing.T) { // The same golden values the engine tests pin; the API must not // change them in transit. wantReached := map[engine.Strategy]int{ - engine.StrategyNone: 99, - engine.StrategyRandom: 70, - engine.StrategyMostConnected: 7, + engine.StrategyNone: 100, + engine.StrategyRandom: 83, + engine.StrategyMostConnected: 21, } if len(comparison.Results) != len(wantReached) { t.Fatalf("got %d results, want %d", len(comparison.Results), len(wantReached)) diff --git a/internal/api/scenario_test.go b/internal/api/scenario_test.go index 546ab5d..65a9e07 100644 --- a/internal/api/scenario_test.go +++ b/internal/api/scenario_test.go @@ -29,8 +29,8 @@ func TestScenarioEndpointReturnsResultAndTopology(t *testing.T) { t.Fatal(err) } - if response.Result.NumReached != 7 { // the pinned golden value - t.Errorf("NumReached = %d, want 7", response.Result.NumReached) + if response.Result.NumReached != 21 { // the pinned golden value (tuned default world) + t.Errorf("NumReached = %d, want 21", response.Result.NumReached) } if response.Config != request.Config { t.Errorf("config not echoed: got %+v", response.Config) diff --git a/internal/engine/forwardchance_test.go b/internal/engine/forwardchance_test.go index 46cfd06..79150f1 100644 --- a/internal/engine/forwardchance_test.go +++ b/internal/engine/forwardchance_test.go @@ -7,7 +7,13 @@ import "testing" // the program scales an educated student) in terms of the weight constants, // so tuning the weights later does not silently break the relationships. func TestForwardChance(t *testing.T) { - base := DefaultConfig() // ForwardProb 0.38, novelty/harm 0, programEffect 1 + // A neutral baseline (the tuned DefaultConfig now carries novelty, harm + // awareness and a soft program); these assertions pin the formula's + // shape, not the default values. + base := DefaultConfig() + base.Novelty = 0 + base.HarmAwareness = 0 + base.ProgramEffect = 1 t.Run("default not educated is the baseline", func(t *testing.T) { if got := base.ForwardChance(false); got != base.ForwardProb { diff --git a/internal/engine/scenario.go b/internal/engine/scenario.go index f9cccb7..276ca22 100644 --- a/internal/engine/scenario.go +++ b/internal/engine/scenario.go @@ -50,10 +50,10 @@ func DefaultConfig() Config { EdgesPerNode: 3, TriangleProb: 0.45, ForwardProb: 0.38, - Novelty: 0, // behaviour-neutral until the model is tuned (slice 4) - HarmAwareness: 0, // " + Novelty: 0.3, // a moderately novel/shocking fake + HarmAwareness: 0.2, // some ambient AI-literacy / harm awareness in the year group NumEducated: 36, - ProgramEffect: 1.0, // a perfect program: today's hard block, softened in slice 4 + ProgramEffect: 0.8, // a strong but imperfect program: educated students mostly, not always, refuse Origin: 0, GraphSeed: 17, ThresholdSeed: 2, diff --git a/internal/engine/scenario_test.go b/internal/engine/scenario_test.go index c6fd5ba..42e5af9 100644 --- a/internal/engine/scenario_test.go +++ b/internal/engine/scenario_test.go @@ -23,13 +23,16 @@ func runAllStrategies(t *testing.T) map[Strategy]Result { } func TestRunScenarioGoldenReachValues(t *testing.T) { - // Pinned from the first verified run (2026-06-10). The prototype's - // figure showed 102/77/10 out of 120 (85%/64%/8%); ours is the same - // story with different dice. + // Pinned for the tuned default world (2026-06-18): a moderately novel + // fake, some ambient harm awareness, and a strong-but-imperfect program + // (programEffect 0.8), so educated students mostly refuse rather than + // never forwarding. The prototype's figure showed 102/77/10 (85/64/8); + // the story (no program >> random >> most-connected) is the same, the + // dice and the soft program differ. wantReached := map[Strategy]int{ - StrategyNone: 99, // 82% - StrategyRandom: 70, // 58% - StrategyMostConnected: 7, // 6% + StrategyNone: 100, // 83% + StrategyRandom: 83, // 69% + StrategyMostConnected: 21, // 18% } results := runAllStrategies(t) for strategy, result := range results { diff --git a/web/src/presets/deepfake-school.ts b/web/src/presets/deepfake-school.ts index 85136f6..89fddb8 100644 --- a/web/src/presets/deepfake-school.ts +++ b/web/src/presets/deepfake-school.ts @@ -28,9 +28,9 @@ export const deepfakeSchoolPreset: StudyPreset = { edgesPerNode: 3, triangleProb: 0.45, forwardProb: 0.38, - novelty: 0, - harmAwareness: 0, - programEffect: 1, + novelty: 0.3, + harmAwareness: 0.2, + programEffect: 0.8, numEducated: 36, origin: 0, graphSeed: 17,