From d0f6042d072d923e8e22fd4af9853120f42d7452 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Thu, 30 Apr 2026 03:47:23 +0200 Subject: [PATCH] Learn exact reliable packet acceptance history upstream --- .../HyperTwistCoachDashboardWidget.cpp | 191 ++++++++++++++++++ .../HyperTwistTrainingCoachLibrary.cpp | 14 ++ .../HyperTwistTrainingRepositoryLibrary.cpp | 186 +++++++++++++++++ .../HyperTwistTrainingSubsystem.cpp | 12 ++ .../HyperTwistCoachDashboardWidget.h | 2 + .../HyperTwistTrainingTypes.h | 48 +++++ 6 files changed, 453 insertions(+) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index dc92425..819c8cc 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -6682,6 +6682,40 @@ FString UHyperTwistCoachDashboardWidget::ResolveDashboardHandoffStartActionSourc const bool bUseReliableAcceptedAlignedBroadPacketExactOutcomeHistoryLabel = bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistory + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistory + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + if (bUseReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryLabel) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-recommended"); + default: + return FString(); + } + } + if (bUseReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryLabel) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-recommended"); + default: + return FString(); + } + } if (bUseReliableAcceptedAlignedTightPacketExactOutcomeHistoryLabel) { switch (HandoffKind) @@ -7734,6 +7768,45 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: 1, 5) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias = + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 66.0f) + ? FMath::Clamp( + CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 64.0f) + ? FMath::Clamp( + CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 82.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketOutcomeTrustBias * 4; @@ -7865,6 +7938,28 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias) + { + HandoffHistoryBias.FollowUpScore += + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias * 7; + if (bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias + > ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias) + { + HandoffHistoryBias.RecommendedScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias * 7; + if (bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -10533,6 +10628,8 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = false; bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory = false; bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistory = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistory = false; DisplayedCoachHandoffMethodDrillRecoveryMemoryStartActionSourceLabel.Reset(); FString CoachHandoffRecommendationStatusLine; FString CoachHandoffRecommendationDetailLine; @@ -10833,6 +10930,45 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() 1, 5) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias = + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 66.0f) + ? FMath::Clamp( + CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 64.0f) + ? FMath::Clamp( + CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 82.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { @@ -10967,6 +11103,28 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias) + { + HandoffHistoryBias.FollowUpScore += + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias * 7; + if (bQueueReadyForHandoff && bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias + > ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias) + { + HandoffHistoryBias.RecommendedScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias * 7; + if (bQueueReadyForHandoff && bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -11852,6 +12010,22 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() || (DisplayedCoachHandoffRecommendationKind == EHyperTwistTrainingCoachHandoffKind::Queue && bQueueLooksRecommendedOrPrimary)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistory = + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::FollowUp + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksFollowUpOrRecovery)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistory = + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistoryBias + > ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistoryBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Recommended + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksRecommendedOrPrimary)); const bool bHandoffRecommendationUsedStrongMethodDrillFollowUpPacket = bHandoffRecommendationUsedMethodDrillWeighting && HandoffRecommendationKind @@ -12112,6 +12286,13 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore, CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore ); + CoachHandoffRecommendationDetailLine += FString::Printf( + TEXT(" | reliable accepted packet exact branch acceptance tight/broad %d/%d avg %.1f/%.1f"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + ); CoachHandoffRecommendationDetailLine += FString::Printf( TEXT(" | reliable accepted aligned packet handoff history follow-up/recommended %d/%d"), HandoffHistoryBias.ReliableAcceptedAlignedTightFollowUpPacketAcceptedDeltaCount, @@ -12222,6 +12403,16 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CoachHandoffRecommendationDetailLine += TEXT(" | Reliable exact accepted aligned broad packet launched-plan outcomes are now promoting broader redirect as a stronger retained branch."); } + if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistory) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable exact accepted aligned tight packet branch acceptance is now hardening narrow continuation beyond raw launched-plan outcomes."); + } + else if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistory) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable exact accepted aligned broad packet branch acceptance is now hardening broader redirect beyond raw launched-plan outcomes."); + } CoachHandoffRecommendationDetailLine += FString::Printf( TEXT(" | upstream drill recovery strong/weak/history %d/%d/%d avg %.1f"), CachedCoachPanelState.StrongMethodDrillRecoveryHistoryCount, diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp index 342cc4c..de6793b 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp @@ -415,6 +415,13 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedTightFollowUpGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-"))) + { + return TEXT("reliable exact accepted aligned tight follow-up-packet branch acceptance history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-")) || SourceLabel.StartsWith( @@ -469,6 +476,13 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedBroadRecommendedGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-"))) + { + return TEXT("reliable exact accepted aligned broad recommended-packet branch acceptance history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-")) || SourceLabel.StartsWith( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 5209b9f..5723b97 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -575,6 +575,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-")); } + bool IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeAcceptedHistorySource( + const FString& SourceLabel) + { + return SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-")); + } + + bool IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeAcceptedHistorySource( + const FString& SourceLabel) + { + return SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-")); + } + FString ResolveMethodDrillFollowUpPacketStructureRecoverySourceLabel( const FString& PreferredCoachHandoffSourceLabel, const FString& PreferredGuidanceSourceLabel) @@ -1517,6 +1535,12 @@ namespace HyperTwistTrainingRepositoryLibraryInternal const int32 AcceptedAlignedTightPacketTrustReliableExactCompletedCount = QueueExecutionSummary .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount; + const int32 AcceptedAlignedTightPacketTrustReliableExactOutcomeStartedCount = + QueueExecutionSummary + .StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHandoffEventCount; + const int32 AcceptedAlignedTightPacketTrustReliableExactOutcomeCompletedCount = + QueueExecutionSummary + .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHandoffEventCount; const int32 AcceptedAlignedBroadPacketTrustReliableOutcomeStartedCount = QueueExecutionSummary .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHandoffEventCount; @@ -1529,6 +1553,12 @@ namespace HyperTwistTrainingRepositoryLibraryInternal const int32 AcceptedAlignedBroadPacketTrustReliableExactCompletedCount = QueueExecutionSummary .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount; + const int32 AcceptedAlignedBroadPacketTrustReliableExactOutcomeStartedCount = + QueueExecutionSummary + .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHandoffEventCount; + const int32 AcceptedAlignedBroadPacketTrustReliableExactOutcomeCompletedCount = + QueueExecutionSummary + .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHandoffEventCount; if (MethodDrillRecoveryStartedCount > 0) { Snapshot.MethodDrillRecoveryHistoryCount += MethodDrillRecoveryStartedCount; @@ -1696,6 +1726,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal * 100.0f) / static_cast(AcceptedAlignedBroadPacketTrustReliableExactStartedCount); } + if (AcceptedAlignedTightPacketTrustReliableExactOutcomeStartedCount > 0) + { + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount += + AcceptedAlignedTightPacketTrustReliableExactOutcomeStartedCount; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore = + (static_cast(AcceptedAlignedTightPacketTrustReliableExactOutcomeCompletedCount) + * 100.0f) + / static_cast(AcceptedAlignedTightPacketTrustReliableExactOutcomeStartedCount); + } + if (AcceptedAlignedBroadPacketTrustReliableExactOutcomeStartedCount > 0) + { + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount += + AcceptedAlignedBroadPacketTrustReliableExactOutcomeStartedCount; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore = + (static_cast(AcceptedAlignedBroadPacketTrustReliableExactOutcomeCompletedCount) + * 100.0f) + / static_cast(AcceptedAlignedBroadPacketTrustReliableExactOutcomeStartedCount); + } const bool bStrongMethodDrillRecoveryHistory = MethodDrillRecoveryStartedCount >= 2 && MethodDrillRecoveryCompletedCount >= MethodDrillRecoveryOutstandingCount @@ -10022,6 +10070,44 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der 1, 5) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal = + (Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + >= 2 + && Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 66.0f) + ? FMath::Clamp( + Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + - Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + + (Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedSignal = + (Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + >= 2 + && Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 64.0f) + ? FMath::Clamp( + Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount + - Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount + + (Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore + >= 82.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustSignal > AcceptedAlignedBroadPacketOutcomeTrustSignal) { @@ -10496,6 +10582,82 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-recommended"); } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal + > ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedSignal) + { + Snapshot.FollowUpGuidanceContinueBias += + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal; + Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max( + 1, + ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal - 1); + ExplicitFollowUpHandoffSignal = FMath::Clamp( + ExplicitFollowUpHandoffSignal + + (ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal * 2), + 0, + 6); + if (QueueExecutionSummary.bHasOutstandingDeferredWork + || QueueExecutionSummary.StartedQueuedHandoffEventCount > 0) + { + ExplicitQueuedHandoffSignal = FMath::Clamp( + ExplicitQueuedHandoffSignal + + FMath::Min(2, ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal), + 0, + 5); + } + if (Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::None + || Snapshot.PreferredGuidanceLane + == EHyperTwistTrainingCoachGuidanceLane::Recommended + || Snapshot.PreferredGuidanceSourceLabel.StartsWith(TEXT("recommendation-history")) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeTrustSource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketOutcomeAcceptedHistorySource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactAcceptedHistorySource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeHistorySource( + Snapshot.PreferredGuidanceSourceLabel)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::FollowUp; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-follow-up"); + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedSignal + > ReliableAcceptedAlignedTightPacketExactOutcomeAcceptedSignal) + { + Snapshot.RecommendedGuidanceContinueBias += + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedSignal; + Snapshot.SuppressedFollowUpQueuePressureCount += + ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedSignal; + ExplicitRecommendedHandoffSignal = FMath::Clamp( + ExplicitRecommendedHandoffSignal + + (ReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedSignal * 2), + 0, + 6); + if (Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::None + || Snapshot.PreferredGuidanceLane + == EHyperTwistTrainingCoachGuidanceLane::FollowUp + || Snapshot.PreferredGuidanceSourceLabel.StartsWith(TEXT("recommendation-history")) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeTrustSource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketOutcomeAcceptedHistorySource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactAcceptedHistorySource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeHistorySource( + Snapshot.PreferredGuidanceSourceLabel)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::Recommended; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-recommended"); + } + } if (StrongMethodDrillFollowUpPacketStartedCount > 0 && StrongMethodDrillFollowUpPacketStartedCount >= WeakMethodDrillFollowUpPacketStartedCount) @@ -13385,6 +13547,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHandoffEventCount += 1; + } if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( HistoryEntry.StartActionSourceLabel)) { @@ -13402,6 +13570,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHandoffEventCount += 1; + } if (Summary.LastStartedAtUtc.IsEmpty() || HyperTwistTrainingRepositoryLibraryInternal::CompareUtcStrings( HistoryEntry.EventAtUtc, @@ -13629,6 +13803,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHandoffEventCount += 1; + } if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( HistoryEntry.StartActionSourceLabel)) { @@ -13646,6 +13826,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHandoffEventCount += 1; + } CompletedCountsByEntryId.FindOrAdd(HistoryEntry.EntryId) += 1; if (Summary.LastCompletedAtUtc.IsEmpty() || HyperTwistTrainingRepositoryLibraryInternal::CompareUtcStrings( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp index f1ab365..33139bc 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -950,6 +950,18 @@ FHyperTwistTrainingCoachPanelState UHyperTwistTrainingSubsystem::GetActiveCoachP PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = ActiveCoachMemorySnapshot .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore; PanelState.bRepositoryVerificationPassed = ActiveRepositoryRoundTripVerification.bDidRoundTripPass; PanelState.bRepositoryVerificationNeedsAttention = ActiveRepositoryRoundTripVerification.ResolvedPath.IsEmpty() || !ActiveRepositoryRoundTripVerification.bDidRoundTripPass; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h index f84157b..b53ea4c 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h @@ -1632,6 +1632,8 @@ private: bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = false; bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory = false; bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeAcceptedHistory = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeAcceptedHistory = false; FString DisplayedCoachHandoffMethodDrillRecoveryMemoryStartActionSourceLabel; EHyperTwistCoachDashboardGuidancePreviewLane ActiveGuidancePreviewLane = EHyperTwistCoachDashboardGuidancePreviewLane::None; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h index 3ea8baf..d9a5449 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h @@ -2139,6 +2139,18 @@ struct FHyperTwistTrainingCoachMemorySnapshot UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") bool bNeedsCoachIntervention = false; @@ -3933,6 +3945,18 @@ struct FHyperTwistTrainingCoachSessionQueueExecutionSummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHandoffEventCount = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 StartedStrongMethodDrillRecoveryPacketQueuedHandoffEventCount = 0; @@ -4777,6 +4801,18 @@ struct FHyperTwistTrainingCoachRecommendationHistorySummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") TArray RecurringCaseIds; @@ -5548,6 +5584,18 @@ struct FHyperTwistTrainingCoachPanelState UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAcceptedAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 SignalCount = 0;