@using System.Text.Json @using PlotLine.Services.Investigations @model PlotLine.Models.Investigations.InvestigationPage @{ViewData["Title"]="Investigation simulator";ViewData["ProjectSection"]="Writer";var e=Model.Evaluation!;var row=Model.Investigation!;}

Investigation simulator and replay

Private author-owned test @row.ID · catalogue @row.CatalogueVersion · @row.Answers.Count answers · state @e.Outcome

Select or revise answers · Machine-readable diagnostics

Hypotheses and completion requirements

@foreach(var h in e.Hypotheses){}
HypothesisPriorSupportOppositionScoreDimensions/groupsChallengedDestination eligibleMissing requirements/conflicts
@h.Id@h.Prior@h.Support@h.Opposition@h.Score@h.Dimensions / @h.Groups@h.Challenged@h.Eligible@string.Join(", ",h.Missing) @string.Join(", ",h.Conflicts)

Evidence and redundancy

@e.RedundantContributions contributions share a dimension/group. Strongest positive/negative per group and dimension caps apply; these are evidence scores, not probabilities.

@foreach(var v in e.Evidence){}
Question/answerHypothesisDimension/aspectGroupRaw contributionUncertain
@v.Question / @v.Option@v.Hypothesis@v.Dimension / @v.Aspect@v.Group@v.Raw@v.Uncertain

Next-question selection

Selected: @e.NextQuestion

    @foreach(var q in e.Candidates){
  1. @q.Id (@q.Rank) @q.Reason
  2. }

Destination mappings

Replay saved states

Each committed action contains the reproducible state and evaluation. Revisions replace live evidence while retaining these earlier events.

@foreach(var json in (string[]?)ViewData["Events"]??[]){using var doc=JsonDocument.Parse(json);var state=doc.RootElement.GetProperty("state").Deserialize(CatalogueValidator.Json)!;var recorded=doc.RootElement.GetProperty("evaluation").GetRawText();var old=JsonSerializer.Deserialize(recorded,CatalogueValidator.Json)!;var replay=InvestigationEngine.Evaluate(Model.Catalogue,state.Concern,state.Answers,old.AvailableCapabilities.ToHashSet(),state.ContinueUntil);var identical=JsonSerializer.Serialize(replay,CatalogueValidator.Json)==JsonSerializer.Serialize(JsonSerializer.Deserialize(recorded,CatalogueValidator.Json),CatalogueValidator.Json);
Version @state.Version · recomputation matches: @identical
@json
}

Decision trace: stop reasons, exclusions and thresholds

@JsonSerializer.Serialize(InvestigationDiagnostics.Trace(Model.Catalogue,row.Concern,row.Answers,e.AvailableCapabilities.ToHashSet(),row.ContinueUntil),CatalogueValidator.Json)