From 7e4cd4d5a3cfb9b10821549076697bce8eafadcf Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Thu, 30 Apr 2026 01:39:50 +0200 Subject: [PATCH] Learn accepted packet trust reliability upstream --- .../HyperTwistCoachDashboardWidget.cpp | 239 ++++++++++++++-- .../HyperTwistTrainingCoachLibrary.cpp | 46 ++- .../HyperTwistTrainingRepositoryLibrary.cpp | 265 ++++++++++++++---- .../HyperTwistTrainingSubsystem.cpp | 8 + .../HyperTwistCoachDashboardWidget.h | 2 + .../HyperTwistTrainingTypes.h | 36 +++ 6 files changed, 498 insertions(+), 98 deletions(-) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 0aadf69..9b8b5b0 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -344,9 +344,8 @@ namespace HyperTwistCoachDashboardWidgetInternal || SourceLabel.StartsWith(TEXT("coach-memory-dashboard-aligned-follow-up-packet-tight-")) || SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-")) - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")); } bool IsAlignedBroadRecommendedPacketSourceLabel(const FString& SourceLabel) @@ -357,9 +356,8 @@ namespace HyperTwistCoachDashboardWidgetInternal || SourceLabel.StartsWith(TEXT("coach-memory-dashboard-aligned-follow-up-packet-broad-")) || SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-")) - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")); } bool IsAlignedTightFollowUpGuidanceSourceLabel(const FString& SourceLabel) @@ -414,13 +412,17 @@ namespace HyperTwistCoachDashboardWidgetInternal } if (IsAlignedTightFollowUpGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-"))) + { + return TEXT("reliable accepted aligned tight follow-up-packet trust"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-")) - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-"))) { return TEXT("accepted aligned tight follow-up-packet outcome trust"); } @@ -440,13 +442,17 @@ namespace HyperTwistCoachDashboardWidgetInternal } if (IsAlignedBroadRecommendedGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-"))) + { + return TEXT("reliable accepted aligned broad recommended-packet trust"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-")) - || SourceLabel == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-"))) { return TEXT("accepted aligned broad recommended-packet outcome trust"); } @@ -1052,8 +1058,38 @@ namespace HyperTwistCoachDashboardWidgetInternal const bool bAlignedTightFollowUpPacketAcceptedDriven = false, const bool bAlignedBroadRecommendedPacketAcceptedDriven = false, const bool bAcceptedAlignedTightFollowUpPacketOutcomeDriven = false, - const bool bAcceptedAlignedBroadRecommendedPacketOutcomeDriven = false) + const bool bAcceptedAlignedBroadRecommendedPacketOutcomeDriven = false, + const bool bReliableAcceptedAlignedTightFollowUpPacketOutcomeDriven = false, + const bool bReliableAcceptedAlignedBroadRecommendedPacketOutcomeDriven = false) { + if (bReliableAcceptedAlignedTightFollowUpPacketOutcomeDriven) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-recommended"); + default: + return FString(); + } + } + if (bReliableAcceptedAlignedBroadRecommendedPacketOutcomeDriven) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-recommended"); + default: + return FString(); + } + } if (bAcceptedAlignedTightFollowUpPacketOutcomeDriven) { switch (HandoffKind) @@ -6544,6 +6580,12 @@ FString UHyperTwistCoachDashboardWidget::ResolveDashboardHandoffStartActionSourc const bool bUseAcceptedAlignedBroadPacketOutcomeLabel = bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedBroadPacketOutcomeTrust && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedTightPacketOutcomeLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeTrust + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedBroadPacketOutcomeLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust + && DisplayedCoachHandoffRecommendationKind == HandoffKind; return HyperTwistCoachDashboardWidgetInternal::DashboardHandoffSourceLabel( HandoffKind, bUseDeferredFirstSuppressionLabel, @@ -6560,7 +6602,9 @@ FString UHyperTwistCoachDashboardWidget::ResolveDashboardHandoffStartActionSourc bUseAlignedTightPacketAcceptedLabel, bUseAlignedBroadPacketAcceptedLabel, bUseAcceptedAlignedTightPacketOutcomeLabel, - bUseAcceptedAlignedBroadPacketOutcomeLabel + bUseAcceptedAlignedBroadPacketOutcomeLabel, + bUseReliableAcceptedAlignedTightPacketOutcomeLabel, + bUseReliableAcceptedAlignedBroadPacketOutcomeLabel ); } @@ -7301,6 +7345,34 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: 1, 3) : 0; + const int32 AcceptedAlignedTightPacketReliableTrustBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore + >= 62.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount + - CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount + + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore + >= 80.0f + ? 1 + : 0), + 1, + 3) + : 0; + const int32 AcceptedAlignedBroadPacketReliableTrustBias = + (CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount >= 2 + && CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + >= 60.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount + - CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount + + (CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + >= 78.0f + ? 1 + : 0), + 1, + 3) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketOutcomeTrustBias * 4; @@ -7334,6 +7406,23 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: HandoffHistoryBias.QueueScore += AcceptedAlignedBroadPacketRetainedTrustBias; } } + if (AcceptedAlignedTightPacketReliableTrustBias > AcceptedAlignedBroadPacketReliableTrustBias) + { + HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketReliableTrustBias * 4; + if (bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += AcceptedAlignedTightPacketReliableTrustBias * 2; + } + } + else if (AcceptedAlignedBroadPacketReliableTrustBias + > AcceptedAlignedTightPacketReliableTrustBias) + { + HandoffHistoryBias.RecommendedScore += AcceptedAlignedBroadPacketReliableTrustBias * 4; + if (bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += AcceptedAlignedBroadPacketReliableTrustBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -7367,13 +7456,15 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: HandoffHistoryBias.FollowUpScore, HandoffHistoryBias.FollowUpAcceptedDeltaCount + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount - + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustOutcomeHistoryCount); + + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustOutcomeHistoryCount + + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount); ConsiderKind( HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::Recommended, HandoffHistoryBias.RecommendedScore, HandoffHistoryBias.RecommendedAcceptedDeltaCount + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount - + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustOutcomeHistoryCount); + + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustOutcomeHistoryCount + + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount); } const HyperTwistCoachDashboardWidgetInternal::FMethodDrillRecoveryPacketDashboardBias MethodDrillRecoveryPacketBias = @@ -9970,6 +10061,8 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() bDisplayedCoachHandoffRecommendationUsedAlignedBroadPacketAcceptedHistory = false; bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedTightPacketOutcomeTrust = false; bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedBroadPacketOutcomeTrust = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeTrust = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust = false; DisplayedCoachHandoffMethodDrillRecoveryMemoryStartActionSourceLabel.Reset(); FString CoachHandoffRecommendationStatusLine; FString CoachHandoffRecommendationDetailLine; @@ -10035,6 +10128,34 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() 1, 3) : 0; + const int32 AcceptedAlignedTightPacketReliableTrustBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore + >= 62.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount + - CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount + + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore + >= 80.0f + ? 1 + : 0), + 1, + 3) + : 0; + const int32 AcceptedAlignedBroadPacketReliableTrustBias = + (CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount >= 2 + && CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + >= 60.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount + - CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount + + (CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + >= 78.0f + ? 1 + : 0), + 1, + 3) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { @@ -10071,6 +10192,24 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() HandoffHistoryBias.QueueScore += AcceptedAlignedBroadPacketRetainedTrustBias; } } + if (AcceptedAlignedTightPacketReliableTrustBias + > AcceptedAlignedBroadPacketReliableTrustBias) + { + HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketReliableTrustBias * 4; + if (bQueueReadyForHandoff && bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += AcceptedAlignedTightPacketReliableTrustBias * 2; + } + } + else if (AcceptedAlignedBroadPacketReliableTrustBias + > AcceptedAlignedTightPacketReliableTrustBias) + { + HandoffHistoryBias.RecommendedScore += AcceptedAlignedBroadPacketReliableTrustBias * 4; + if (bQueueReadyForHandoff && bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += AcceptedAlignedBroadPacketReliableTrustBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -10104,13 +10243,15 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() HandoffHistoryBias.FollowUpScore, HandoffHistoryBias.FollowUpAcceptedDeltaCount + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount - + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustOutcomeHistoryCount); + + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustOutcomeHistoryCount + + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount); ConsiderKind( HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::Recommended, HandoffHistoryBias.RecommendedScore, HandoffHistoryBias.RecommendedAcceptedDeltaCount + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount - + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustOutcomeHistoryCount); + + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustOutcomeHistoryCount + + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount); } bool bHandoffRecommendationUsedHistory = false; bool bHandoffRecommendationUsedDeferredOverflowHistory = false; @@ -10884,6 +11025,22 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() || (DisplayedCoachHandoffRecommendationKind == EHyperTwistTrainingCoachHandoffKind::Queue && bQueueLooksRecommendedOrPrimary)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeTrust = + AcceptedAlignedTightPacketReliableTrustBias + > AcceptedAlignedBroadPacketReliableTrustBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::FollowUp + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksFollowUpOrRecovery)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust = + AcceptedAlignedBroadPacketReliableTrustBias + > AcceptedAlignedTightPacketReliableTrustBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Recommended + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksRecommendedOrPrimary)); const bool bHandoffRecommendationUsedStrongMethodDrillFollowUpPacket = bHandoffRecommendationUsedMethodDrillWeighting && HandoffRecommendationKind @@ -11102,6 +11259,13 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustOutcomeAverageScore, CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustOutcomeAverageScore ); + CoachHandoffRecommendationDetailLine += FString::Printf( + TEXT(" | reliable accepted packet trust tight/broad %d/%d avg %.1f/%.1f"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + ); if (HandoffHistoryBias.AlignedTightFollowUpOutcomeAcceptedDeltaCount > 0 && HandoffHistoryBias.PreferredKind == HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::FollowUp) @@ -11130,7 +11294,18 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CoachHandoffRecommendationDetailLine += TEXT(" | Accepted aligned broad packet recommended-first handoffs are reinforcing the retained broad branch."); } - if (bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedTightPacketOutcomeTrust) + if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeTrust) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable accepted aligned tight packet trust is now directly reinforcing narrow continuation."); + } + else if ( + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable accepted aligned broad packet trust is now directly reinforcing broader redirect."); + } + else if (bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedTightPacketOutcomeTrust) { CoachHandoffRecommendationDetailLine += TEXT(" | Accepted aligned tight packet outcome trust is tipping this handoff toward narrow continuation."); @@ -11733,6 +11908,24 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() : TEXT("")) ); } + if (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount > 0 + || CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount > 0) + { + GuidancePreferenceDetailLine += FString::Printf( + TEXT(" | Reliable accepted aligned packet trust: tight follow-up-first %d (avg %.2f) | broad recommended-first %d (avg %.2f)%s"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore, + CachedCoachPanelState.PreferredGuidanceSourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-")) + ? TEXT(" | Follow-up is currently being reinforced by reliable accepted aligned tight packet trust.") + : (CachedCoachPanelState.PreferredGuidanceSourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-")) + ? TEXT(" | Recommended is currently being reinforced by reliable accepted aligned broad packet trust.") + : TEXT("")) + ); + } const bool bQueueRecoveryMemorySource = HyperTwistCoachDashboardWidgetInternal::IsQueueRecoveryMemorySource( CachedCoachPanelState.PreferredGuidanceSourceLabel); diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp index 88ab1d2..cd8c653 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp @@ -342,12 +342,8 @@ namespace HyperTwistTrainingCoachLibraryInternal || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-queued") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-follow-up") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-recommended") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")); } bool IsAlignedBroadRecommendedGuidanceSourceLabel(const FString& SourceLabel) @@ -363,12 +359,8 @@ namespace HyperTwistTrainingCoachLibraryInternal || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-queued") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-follow-up") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-recommended") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")); } FString DescribeCoachMemorySourceLabel(const FString& SourceLabel) @@ -423,14 +415,17 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedTightFollowUpGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-"))) + { + return TEXT("reliable accepted aligned tight follow-up-packet trust"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-")) - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-"))) { return TEXT("accepted aligned tight follow-up-packet outcome trust"); } @@ -453,14 +448,17 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedBroadRecommendedGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-"))) + { + return TEXT("reliable accepted aligned broad recommended-packet trust"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-")) - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-"))) { return TEXT("accepted aligned broad recommended-packet outcome trust"); } diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 2794f66..93878f5 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -470,12 +470,8 @@ namespace HyperTwistTrainingRepositoryLibraryInternal || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-queued") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-follow-up") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-recommended") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")); } bool IsAcceptedAlignedBroadRecommendedPacketOutcomeSource(const FString& SourceLabel) @@ -488,36 +484,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-queued") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-follow-up") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-recommended") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")); } bool IsAcceptedAlignedTightFollowUpPacketOutcomeTrustSource(const FString& SourceLabel) { return SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-")) - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")); } bool IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource(const FString& SourceLabel) { return SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-")) - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended"); + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")); } FString ResolveMethodDrillFollowUpPacketStructureRecoverySourceLabel( @@ -631,10 +615,12 @@ namespace HyperTwistTrainingRepositoryLibraryInternal || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-packet-weak-queued") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-queued") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-queued") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-queued") + || (SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")) + && SourceLabel.EndsWith(TEXT("-queued"))) + || (SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")) + && SourceLabel.EndsWith(TEXT("-queued"))) || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-posture-strong-queued") || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-posture-weak-queued")) { @@ -660,10 +646,12 @@ namespace HyperTwistTrainingRepositoryLibraryInternal || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-packet-weak-follow-up") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-follow-up") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-follow-up") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-follow-up") + || (SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")) + && SourceLabel.EndsWith(TEXT("-follow-up"))) + || (SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")) + && SourceLabel.EndsWith(TEXT("-follow-up"))) || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-posture-strong-follow-up") || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-posture-weak-follow-up")) { @@ -689,10 +677,12 @@ namespace HyperTwistTrainingRepositoryLibraryInternal || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-packet-weak-recommended") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-tight-recommended") || SourceLabel == TEXT("dashboard-handoff-aligned-follow-up-packet-broad-recommended") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-recommended") - || SourceLabel - == TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-recommended") + || (SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-")) + && SourceLabel.EndsWith(TEXT("-recommended"))) + || (SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-")) + && SourceLabel.EndsWith(TEXT("-recommended"))) || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-posture-strong-recommended") || SourceLabel == TEXT("dashboard-handoff-method-drill-recovery-posture-weak-recommended")) { @@ -844,21 +834,40 @@ namespace HyperTwistTrainingRepositoryLibraryInternal FString AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( const EHyperTwistTrainingCoachHandoffKind HandoffKind, - const bool bTightFollowUpOutcomeTrust) + const bool bTightFollowUpOutcomeTrust, + const bool bReliableOutcomeTrust = false) { switch (HandoffKind) { case EHyperTwistTrainingCoachHandoffKind::Queue: - return bTightFollowUpOutcomeTrust - ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-queued") + if (bTightFollowUpOutcomeTrust) + { + return bReliableOutcomeTrust + ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-queued") + : TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-queued"); + } + return bReliableOutcomeTrust + ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-queued") : TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-queued"); case EHyperTwistTrainingCoachHandoffKind::FollowUp: - return bTightFollowUpOutcomeTrust - ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-follow-up") + if (bTightFollowUpOutcomeTrust) + { + return bReliableOutcomeTrust + ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-follow-up") + : TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-follow-up"); + } + return bReliableOutcomeTrust + ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-follow-up") : TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-follow-up"); case EHyperTwistTrainingCoachHandoffKind::Recommended: - return bTightFollowUpOutcomeTrust - ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-recommended") + if (bTightFollowUpOutcomeTrust) + { + return bReliableOutcomeTrust + ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-recommended") + : TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-recommended"); + } + return bReliableOutcomeTrust + ? TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-recommended") : TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-recommended"); default: return FString(); @@ -1417,6 +1426,14 @@ namespace HyperTwistTrainingRepositoryLibraryInternal ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanStartedCount - ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanCompletedCount ); + const int32 AcceptedAlignedTightPacketTrustStartedCount = + QueueExecutionSummary.StartedAcceptedAlignedTightFollowUpPacketTrustHandoffEventCount; + const int32 AcceptedAlignedTightPacketTrustCompletedCount = + QueueExecutionSummary.CompletedAcceptedAlignedTightFollowUpPacketTrustHandoffEventCount; + const int32 AcceptedAlignedBroadPacketTrustStartedCount = + QueueExecutionSummary.StartedAcceptedAlignedBroadRecommendedPacketTrustHandoffEventCount; + const int32 AcceptedAlignedBroadPacketTrustCompletedCount = + QueueExecutionSummary.CompletedAcceptedAlignedBroadRecommendedPacketTrustHandoffEventCount; if (MethodDrillRecoveryStartedCount > 0) { Snapshot.MethodDrillRecoveryHistoryCount += MethodDrillRecoveryStartedCount; @@ -1532,6 +1549,22 @@ namespace HyperTwistTrainingRepositoryLibraryInternal * 100.0f) / static_cast(ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanEventCount); } + if (AcceptedAlignedTightPacketTrustStartedCount > 0) + { + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount += + AcceptedAlignedTightPacketTrustStartedCount; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore = + (static_cast(AcceptedAlignedTightPacketTrustCompletedCount) * 100.0f) + / static_cast(AcceptedAlignedTightPacketTrustStartedCount); + } + if (AcceptedAlignedBroadPacketTrustStartedCount > 0) + { + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount += + AcceptedAlignedBroadPacketTrustStartedCount; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore = + (static_cast(AcceptedAlignedBroadPacketTrustCompletedCount) * 100.0f) + / static_cast(AcceptedAlignedBroadPacketTrustStartedCount); + } const bool bStrongMethodDrillRecoveryHistory = MethodDrillRecoveryStartedCount >= 2 && MethodDrillRecoveryCompletedCount >= MethodDrillRecoveryOutstandingCount @@ -9605,6 +9638,34 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der 1, 3) : 0; + const int32 AcceptedAlignedTightPacketReliableTrustSignal = + (Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount >= 2 + && Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore + >= 62.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount + - Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount + + (Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore + >= 80.0f + ? 1 + : 0), + 1, + 3) + : 0; + const int32 AcceptedAlignedBroadPacketReliableTrustSignal = + (Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount >= 2 + && Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + >= 60.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount + - Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount + + (Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore + >= 78.0f + ? 1 + : 0), + 1, + 3) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustSignal > AcceptedAlignedBroadPacketOutcomeTrustSignal) { @@ -9737,6 +9798,72 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-recommended"); } } + if (AcceptedAlignedTightPacketReliableTrustSignal + > AcceptedAlignedBroadPacketReliableTrustSignal) + { + Snapshot.FollowUpGuidanceContinueBias += AcceptedAlignedTightPacketReliableTrustSignal; + Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max( + 1, + AcceptedAlignedTightPacketReliableTrustSignal - 1); + ExplicitFollowUpHandoffSignal = FMath::Clamp( + ExplicitFollowUpHandoffSignal + (AcceptedAlignedTightPacketReliableTrustSignal * 2), + 0, + 6); + if (QueueExecutionSummary.bHasOutstandingDeferredWork + || QueueExecutionSummary.StartedQueuedHandoffEventCount > 0) + { + ExplicitQueuedHandoffSignal = FMath::Clamp( + ExplicitQueuedHandoffSignal + 1, + 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)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::FollowUp; + Snapshot.PreferredGuidanceSourceLabel = + HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( + EHyperTwistTrainingCoachHandoffKind::FollowUp, + true, + true); + } + } + else if (AcceptedAlignedBroadPacketReliableTrustSignal + > AcceptedAlignedTightPacketReliableTrustSignal) + { + Snapshot.RecommendedGuidanceContinueBias += AcceptedAlignedBroadPacketReliableTrustSignal; + Snapshot.SuppressedFollowUpQueuePressureCount += + AcceptedAlignedBroadPacketReliableTrustSignal; + ExplicitRecommendedHandoffSignal = FMath::Clamp( + ExplicitRecommendedHandoffSignal + + (AcceptedAlignedBroadPacketReliableTrustSignal * 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)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::Recommended; + Snapshot.PreferredGuidanceSourceLabel = + HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( + EHyperTwistTrainingCoachHandoffKind::Recommended, + false, + true); + } + } if (StrongMethodDrillFollowUpPacketStartedCount > 0 && StrongMethodDrillFollowUpPacketStartedCount >= WeakMethodDrillFollowUpPacketStartedCount) @@ -9916,7 +10043,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der Snapshot.PreferredCoachHandoffSourceLabel = HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::Queue, - true); + true, + AcceptedAlignedTightPacketReliableTrustSignal + > AcceptedAlignedBroadPacketReliableTrustSignal); } else if (AcceptedAlignedBroadPacketOutcomeTrustSignal > AcceptedAlignedTightPacketOutcomeTrustSignal) @@ -9924,7 +10053,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der Snapshot.PreferredCoachHandoffSourceLabel = HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::Queue, - false); + false, + AcceptedAlignedBroadPacketReliableTrustSignal + > AcceptedAlignedTightPacketReliableTrustSignal); } else if (bAlignedTightFollowUpPacketQueuedHandoff) { @@ -10003,7 +10134,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der Snapshot.PreferredCoachHandoffSourceLabel = HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::FollowUp, - true); + true, + AcceptedAlignedTightPacketReliableTrustSignal + > AcceptedAlignedBroadPacketReliableTrustSignal); } else if (AcceptedAlignedBroadPacketOutcomeTrustSignal > AcceptedAlignedTightPacketOutcomeTrustSignal) @@ -10011,7 +10144,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der Snapshot.PreferredCoachHandoffSourceLabel = HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::FollowUp, - false); + false, + AcceptedAlignedBroadPacketReliableTrustSignal + > AcceptedAlignedTightPacketReliableTrustSignal); } else if (bAlignedTightFollowUpPacketFollowUpHandoff) { @@ -10090,7 +10225,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der Snapshot.PreferredCoachHandoffSourceLabel = HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::Recommended, - true); + true, + AcceptedAlignedTightPacketReliableTrustSignal + > AcceptedAlignedBroadPacketReliableTrustSignal); } else if (AcceptedAlignedBroadPacketOutcomeTrustSignal > AcceptedAlignedTightPacketOutcomeTrustSignal) @@ -10098,7 +10235,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der Snapshot.PreferredCoachHandoffSourceLabel = HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::Recommended, - false); + false, + AcceptedAlignedBroadPacketReliableTrustSignal + > AcceptedAlignedTightPacketReliableTrustSignal); } else if (bAlignedTightFollowUpPacketRecommendedHandoff) { @@ -10610,7 +10749,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der > AcceptedAlignedBroadPacketOutcomeTrustSignal ? HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::FollowUp, - true) + true, + AcceptedAlignedTightPacketReliableTrustSignal + > AcceptedAlignedBroadPacketReliableTrustSignal) : HyperTwistTrainingRepositoryLibraryInternal::CoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::FollowUp, ExplicitDeferredOverflowFollowUpHandoffSignal > 0, @@ -10630,7 +10771,9 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der > AcceptedAlignedTightPacketOutcomeTrustSignal ? HyperTwistTrainingRepositoryLibraryInternal::AcceptedAlignedPacketOutcomeCoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::Recommended, - false) + false, + AcceptedAlignedBroadPacketReliableTrustSignal + > AcceptedAlignedTightPacketReliableTrustSignal) : HyperTwistTrainingRepositoryLibraryInternal::CoachMemoryDashboardSourceLabel( EHyperTwistTrainingCoachHandoffKind::Recommended, ExplicitDeferredOverflowRecommendedHandoffSignal > 0 @@ -12593,6 +12736,16 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito { Summary.StartedWeakRetainedMethodDrillRecoveryPostureHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeTrustSource( + HistoryEntry.StartActionSourceLabel)) + { + Summary.StartedAcceptedAlignedTightFollowUpPacketTrustHandoffEventCount += 1; + } + if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( + HistoryEntry.StartActionSourceLabel)) + { + Summary.StartedAcceptedAlignedBroadRecommendedPacketTrustHandoffEventCount += 1; + } if (Summary.LastStartedAtUtc.IsEmpty() || HyperTwistTrainingRepositoryLibraryInternal::CompareUtcStrings( HistoryEntry.EventAtUtc, @@ -12803,6 +12956,16 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary.CompletedWeakRetainedMethodDrillRecoveryPostureHandoffEventCount += 1; } } + if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeTrustSource( + HistoryEntry.StartActionSourceLabel)) + { + Summary.CompletedAcceptedAlignedTightFollowUpPacketTrustHandoffEventCount += 1; + } + if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( + HistoryEntry.StartActionSourceLabel)) + { + Summary.CompletedAcceptedAlignedBroadRecommendedPacketTrustHandoffEventCount += 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 b76d026..2d26f71 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -888,6 +888,14 @@ FHyperTwistTrainingCoachPanelState UHyperTwistTrainingSubsystem::GetActiveCoachP ActiveCoachMemorySnapshot.AcceptedAlignedTightFollowUpPacketTrustOutcomeAverageScore; PanelState.AcceptedAlignedBroadRecommendedPacketTrustOutcomeAverageScore = ActiveCoachMemorySnapshot.AcceptedAlignedBroadRecommendedPacketTrustOutcomeAverageScore; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount = + ActiveCoachMemorySnapshot.AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount = + ActiveCoachMemorySnapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore = + ActiveCoachMemorySnapshot.AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore = + ActiveCoachMemorySnapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore; 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 de4bd2a..8ef92e7 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h @@ -1620,6 +1620,8 @@ private: bool bDisplayedCoachHandoffRecommendationUsedAlignedBroadPacketAcceptedHistory = false; bool bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedTightPacketOutcomeTrust = false; bool bDisplayedCoachHandoffRecommendationUsedAcceptedAlignedBroadPacketOutcomeTrust = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeTrust = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust = 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 a66c4cb..ab5d26d 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h @@ -2067,6 +2067,18 @@ struct FHyperTwistTrainingCoachMemorySnapshot UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") bool bNeedsCoachIntervention = false; @@ -3825,6 +3837,18 @@ struct FHyperTwistTrainingCoachSessionQueueExecutionSummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 StartedAlignedBroadRecommendedPacketRecommendedHandoffEventCount = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 StartedAcceptedAlignedTightFollowUpPacketTrustHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 CompletedAcceptedAlignedTightFollowUpPacketTrustHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 StartedAcceptedAlignedBroadRecommendedPacketTrustHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 CompletedAcceptedAlignedBroadRecommendedPacketTrustHandoffEventCount = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 StartedStrongMethodDrillRecoveryPacketQueuedHandoffEventCount = 0; @@ -5332,6 +5356,18 @@ struct FHyperTwistTrainingCoachPanelState UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableAverageOutcomeScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableAverageOutcomeScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 SignalCount = 0;