From 8cd4c4799204eaea4bb75b3cb15821f78633d936 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Tue, 28 Apr 2026 01:18:30 +0200 Subject: [PATCH] Weight dashboard outcomes by deferred overflow --- .../HyperTwistCoachDashboardWidget.cpp | 49 +++++++++++++++++-- .../HyperTwistCoachDashboardWidget.h | 3 ++ 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 2d63619..9547892 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -3728,6 +3728,17 @@ FHyperTwistCoachDashboardDecisionWeighting UHyperTwistCoachDashboardWidget::Buil ); Weighting.ClosureContinuationBias = ClosureBias.ContinuationBias; Weighting.ClosureSuppressionBias = ClosureBias.SuppressionBias; + const bool bDeferredOverflowMemoryActive = + CachedCoachPanelState.PreferredLaunchBudgetSourceLabel + == TEXT("recommendation-history-deferred-tightened-launch"); + if (bDeferredOverflowMemoryActive + && DisplayedGuidanceComparisonLane == EHyperTwistCoachDashboardGuidancePreviewLane::FollowUp) + { + Weighting.DeferredOverflowContinuationBias = + CachedCoachPanelState.DeferredTightenedLaunchHistoryCount; + Weighting.DeferredOverflowCaseCount = + CachedCoachPanelState.DeferredLaunchHistoryCaseCount; + } if (bDisplayedGuidanceComparisonSingleCase) { @@ -3823,6 +3834,27 @@ FHyperTwistCoachDashboardDecisionWeighting UHyperTwistCoachDashboardWidget::Buil } } + if (DisplayedGuidanceComparisonLane == EHyperTwistCoachDashboardGuidancePreviewLane::FollowUp + && Weighting.DeferredOverflowContinuationBias >= 2) + { + if (!bDisplayedGuidanceComparisonSingleCase + && BaseAction == EHyperTwistCoachDashboardOutcomeAction::RedirectCoachGuidance + && Weighting.AverageSuccessRate < 0.92f) + { + Weighting.WeightedAction = EHyperTwistCoachDashboardOutcomeAction::RepeatPreviewDeck; + Weighting.bHasOverride = true; + Weighting.bUsedDeferredOverflowSignal = true; + } + else if (bDisplayedGuidanceComparisonSingleCase + && BaseAction == EHyperTwistCoachDashboardOutcomeAction::BroadenPreviewDeck + && Weighting.AverageSuccessRate < 0.94f) + { + Weighting.WeightedAction = EHyperTwistCoachDashboardOutcomeAction::RepeatSelectedCase; + Weighting.bHasOverride = true; + Weighting.bUsedDeferredOverflowSignal = true; + } + } + return Weighting; } @@ -5740,6 +5772,11 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() { GuidanceOutcomeStatusLine += TEXT(" Closure-recovery history adjusted this recommendation."); } + if (GuidanceDecisionWeighting.bUsedDeferredOverflowSignal) + { + GuidanceOutcomeStatusLine += + TEXT(" Deferred-overflow continuation history adjusted this recommendation."); + } const bool bCanRedirectGuidanceOutcome = CachedCoachPanelState.bCanStartCoachFollowUpRun || CachedCoachPanelState.bCanStartQueuedRun @@ -5766,7 +5803,7 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() const FString GuidanceDecisionWeightingDetailLine = GuidanceDecisionWeighting.IsStructurallyValid() ? FString::Printf( - TEXT("Decision weighting for this lane/scope: repeat case %d | repeat deck %d | broaden %d | redirect %d | Avg success %.2f | Avg launch cases %.2f | broadened launches %d (avg %.2f) | tightened launches %d (avg %.2f) | Closure continue bias %d | Closure suppress bias %d | %s"), + TEXT("Decision weighting for this lane/scope: repeat case %d | repeat deck %d | broaden %d | redirect %d | Avg success %.2f | Avg launch cases %.2f | broadened launches %d (avg %.2f) | tightened launches %d (avg %.2f) | Closure continue bias %d | Closure suppress bias %d | Deferred overflow bias %d | Deferred overflow cases %d | %s"), GuidanceDecisionWeighting.RepeatSelectedCaseCount, GuidanceDecisionWeighting.RepeatPreviewDeckCount, GuidanceDecisionWeighting.BroadenPreviewDeckCount, @@ -5779,10 +5816,14 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() GuidanceDecisionWeighting.TightenedLaunchAverageSuccessRate, GuidanceDecisionWeighting.ClosureContinuationBias, GuidanceDecisionWeighting.ClosureSuppressionBias, + GuidanceDecisionWeighting.DeferredOverflowContinuationBias, + GuidanceDecisionWeighting.DeferredOverflowCaseCount, GuidanceDecisionWeighting.bHasOverride - ? (GuidanceDecisionWeighting.bUsedClosureHistorySignal - ? TEXT("Recent closure-recovery history and authored choices adjusted the current guidance-outcome action.") - : TEXT("Recent authored choices adjusted the current guidance-outcome action.")) + ? (GuidanceDecisionWeighting.bUsedDeferredOverflowSignal + ? TEXT("Deferred-overflow continuation history and authored choices adjusted the current guidance-outcome action.") + : (GuidanceDecisionWeighting.bUsedClosureHistorySignal + ? TEXT("Recent closure-recovery history and authored choices adjusted the current guidance-outcome action.") + : TEXT("Recent authored choices adjusted the current guidance-outcome action."))) : TEXT("Recent authored choices reinforced the recap-derived guidance-outcome action.") ) : TEXT("Weighting detail: apply outcome actions on the same guidance lane and scope to let the dashboard bias future recommendations."); diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h index 0e22920..270fc97 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h @@ -76,6 +76,8 @@ struct FHyperTwistCoachDashboardDecisionWeighting int32 TightenedLaunchCount = 0; int32 ClosureContinuationBias = 0; int32 ClosureSuppressionBias = 0; + int32 DeferredOverflowContinuationBias = 0; + int32 DeferredOverflowCaseCount = 0; EHyperTwistCoachDashboardOutcomeAction BaseAction = EHyperTwistCoachDashboardOutcomeAction::None; EHyperTwistCoachDashboardOutcomeAction WeightedAction = @@ -88,6 +90,7 @@ struct FHyperTwistCoachDashboardDecisionWeighting float TightenedLaunchAverageSuccessRate = 0.0f; bool bHasOverride = false; bool bUsedClosureHistorySignal = false; + bool bUsedDeferredOverflowSignal = false; bool IsStructurallyValid() const {