diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 97930be..9b64db1 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -6670,6 +6670,40 @@ FString UHyperTwistCoachDashboardWidget::ResolveDashboardHandoffStartActionSourc const bool bUseReliableAcceptedAlignedBroadPacketOutcomeHistoryLabel = bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeHistory && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedTightPacketExactHistoryLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedBroadPacketExactHistoryLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + if (bUseReliableAcceptedAlignedTightPacketExactHistoryLabel) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-recommended"); + default: + return FString(); + } + } + if (bUseReliableAcceptedAlignedBroadPacketExactHistoryLabel) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-recommended"); + default: + return FString(); + } + } return HyperTwistCoachDashboardWidgetInternal::DashboardHandoffSourceLabel( HandoffKind, bUseDeferredFirstSuppressionLabel, @@ -7573,6 +7607,63 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: 1, 4) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactAcceptedBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore + >= 64.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore + >= 82.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactAcceptedBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + >= 62.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + >= 80.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedTightPacketExactCompositeBias = FMath::Max( + ReliableAcceptedAlignedTightPacketExactAcceptedBias, + (ReliableAcceptedAlignedTightPacketOutcomeAcceptedBias > 0 + && ReliableAcceptedAlignedTightPacketExactOutcomeBias > 0) + ? FMath::Clamp( + FMath::Min( + ReliableAcceptedAlignedTightPacketOutcomeAcceptedBias, + ReliableAcceptedAlignedTightPacketExactOutcomeBias) + 1, + 1, + 4) + : 0); + const int32 ReliableAcceptedAlignedBroadPacketExactCompositeBias = FMath::Max( + ReliableAcceptedAlignedBroadPacketExactAcceptedBias, + (ReliableAcceptedAlignedBroadPacketOutcomeAcceptedBias > 0 + && ReliableAcceptedAlignedBroadPacketExactOutcomeBias > 0) + ? FMath::Clamp( + FMath::Min( + ReliableAcceptedAlignedBroadPacketOutcomeAcceptedBias, + ReliableAcceptedAlignedBroadPacketExactOutcomeBias) + 1, + 1, + 4) + : 0); if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketOutcomeTrustBias * 4; @@ -7664,6 +7755,24 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactOutcomeBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactCompositeBias + > ReliableAcceptedAlignedBroadPacketExactCompositeBias) + { + HandoffHistoryBias.FollowUpScore += ReliableAcceptedAlignedTightPacketExactCompositeBias * 5; + if (bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedTightPacketExactCompositeBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactCompositeBias + > ReliableAcceptedAlignedTightPacketExactCompositeBias) + { + HandoffHistoryBias.RecommendedScore += ReliableAcceptedAlignedBroadPacketExactCompositeBias * 5; + if (bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactCompositeBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -10328,6 +10437,8 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust = false; bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeHistory = false; bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeHistory = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = false; DisplayedCoachHandoffMethodDrillRecoveryMemoryStartActionSourceLabel.Reset(); FString CoachHandoffRecommendationStatusLine; FString CoachHandoffRecommendationDetailLine; @@ -10535,6 +10646,63 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() 1, 4) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactAcceptedBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore + >= 64.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore + >= 82.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactAcceptedBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + >= 62.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + >= 80.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedTightPacketExactCompositeBias = FMath::Max( + ReliableAcceptedAlignedTightPacketExactAcceptedBias, + (ReliableAcceptedAlignedTightPacketOutcomeAcceptedBias > 0 + && ReliableAcceptedAlignedTightPacketExactOutcomeBias > 0) + ? FMath::Clamp( + FMath::Min( + ReliableAcceptedAlignedTightPacketOutcomeAcceptedBias, + ReliableAcceptedAlignedTightPacketExactOutcomeBias) + 1, + 1, + 4) + : 0); + const int32 ReliableAcceptedAlignedBroadPacketExactCompositeBias = FMath::Max( + ReliableAcceptedAlignedBroadPacketExactAcceptedBias, + (ReliableAcceptedAlignedBroadPacketOutcomeAcceptedBias > 0 + && ReliableAcceptedAlignedBroadPacketExactOutcomeBias > 0) + ? FMath::Clamp( + FMath::Min( + ReliableAcceptedAlignedBroadPacketOutcomeAcceptedBias, + ReliableAcceptedAlignedBroadPacketExactOutcomeBias) + 1, + 1, + 4) + : 0); if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { @@ -10629,6 +10797,24 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactOutcomeBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactCompositeBias + > ReliableAcceptedAlignedBroadPacketExactCompositeBias) + { + HandoffHistoryBias.FollowUpScore += ReliableAcceptedAlignedTightPacketExactCompositeBias * 5; + if (bQueueReadyForHandoff && bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedTightPacketExactCompositeBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactCompositeBias + > ReliableAcceptedAlignedTightPacketExactCompositeBias) + { + HandoffHistoryBias.RecommendedScore += ReliableAcceptedAlignedBroadPacketExactCompositeBias * 5; + if (bQueueReadyForHandoff && bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactCompositeBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -11477,6 +11663,22 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() > AcceptedAlignedTightPacketReliableOutcomeBias && AcceptedAlignedBroadPacketReliableOutcomeBias >= AcceptedAlignedBroadPacketReliableTrustBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Recommended + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksRecommendedOrPrimary)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory = + ReliableAcceptedAlignedTightPacketExactCompositeBias + > ReliableAcceptedAlignedBroadPacketExactCompositeBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::FollowUp + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksFollowUpOrRecovery)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = + ReliableAcceptedAlignedBroadPacketExactCompositeBias + > ReliableAcceptedAlignedTightPacketExactCompositeBias && (DisplayedCoachHandoffRecommendationKind == EHyperTwistTrainingCoachHandoffKind::Recommended || (DisplayedCoachHandoffRecommendationKind @@ -11728,6 +11930,13 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore, CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore ); + CoachHandoffRecommendationDetailLine += FString::Printf( + TEXT(" | reliable accepted packet exact branch tight/broad %d/%d avg %.1f/%.1f"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + ); CoachHandoffRecommendationDetailLine += FString::Printf( TEXT(" | reliable accepted aligned packet handoff history follow-up/recommended %d/%d"), HandoffHistoryBias.ReliableAcceptedAlignedTightFollowUpPacketAcceptedDeltaCount, @@ -11818,6 +12027,16 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CoachHandoffRecommendationDetailLine += TEXT(" | Reliable accepted aligned broad packet exact launched-plan outcomes are now reinforcing broader redirect."); } + if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable exact accepted aligned tight packet branch history is now hardening narrow continuation."); + } + else if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable exact accepted aligned broad packet branch history is now hardening broader redirect."); + } 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 cf8e0d2..c7372b5 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-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-"))) + { + return TEXT("reliable exact accepted aligned tight follow-up-packet branch history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-")) || SourceLabel.StartsWith( @@ -455,6 +462,13 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedBroadRecommendedGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-"))) + { + return TEXT("reliable exact accepted aligned broad recommended-packet branch history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-")) || SourceLabel.StartsWith( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 951f476..7a23ce3 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -539,6 +539,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-")); } + bool IsReliableAcceptedAlignedTightFollowUpPacketExactAcceptedHistorySource( + const FString& SourceLabel) + { + return SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-")); + } + + bool IsReliableAcceptedAlignedBroadRecommendedPacketExactAcceptedHistorySource( + const FString& SourceLabel) + { + return SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-")); + } + FString ResolveMethodDrillFollowUpPacketStructureRecoverySourceLabel( const FString& PreferredCoachHandoffSourceLabel, const FString& PreferredGuidanceSourceLabel) @@ -1475,12 +1493,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal const int32 AcceptedAlignedTightPacketTrustReliableOutcomeCompletedCount = QueueExecutionSummary .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableOutcomeHandoffEventCount; + const int32 AcceptedAlignedTightPacketTrustReliableExactStartedCount = + QueueExecutionSummary + .StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount; + const int32 AcceptedAlignedTightPacketTrustReliableExactCompletedCount = + QueueExecutionSummary + .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount; const int32 AcceptedAlignedBroadPacketTrustReliableOutcomeStartedCount = QueueExecutionSummary .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHandoffEventCount; const int32 AcceptedAlignedBroadPacketTrustReliableOutcomeCompletedCount = QueueExecutionSummary .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHandoffEventCount; + const int32 AcceptedAlignedBroadPacketTrustReliableExactStartedCount = + QueueExecutionSummary + .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount; + const int32 AcceptedAlignedBroadPacketTrustReliableExactCompletedCount = + QueueExecutionSummary + .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount; if (MethodDrillRecoveryStartedCount > 0) { Snapshot.MethodDrillRecoveryHistoryCount += MethodDrillRecoveryStartedCount; @@ -1630,6 +1660,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal * 100.0f) / static_cast(AcceptedAlignedBroadPacketTrustReliableOutcomeStartedCount); } + if (AcceptedAlignedTightPacketTrustReliableExactStartedCount > 0) + { + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount += + AcceptedAlignedTightPacketTrustReliableExactStartedCount; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore = + (static_cast(AcceptedAlignedTightPacketTrustReliableExactCompletedCount) + * 100.0f) + / static_cast(AcceptedAlignedTightPacketTrustReliableExactStartedCount); + } + if (AcceptedAlignedBroadPacketTrustReliableExactStartedCount > 0) + { + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount += + AcceptedAlignedBroadPacketTrustReliableExactStartedCount; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = + (static_cast(AcceptedAlignedBroadPacketTrustReliableExactCompletedCount) + * 100.0f) + / static_cast(AcceptedAlignedBroadPacketTrustReliableExactStartedCount); + } const bool bStrongMethodDrillRecoveryHistory = MethodDrillRecoveryStartedCount >= 2 && MethodDrillRecoveryCompletedCount >= MethodDrillRecoveryOutstandingCount @@ -9858,6 +9906,62 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der 1, 4) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactAcceptedSignal = + (Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount >= 2 + && Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore + >= 64.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + - Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + + (Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore + >= 82.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactAcceptedSignal = + (Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + >= 2 + && Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + >= 62.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount + - Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount + + (Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore + >= 80.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedTightPacketExactCompositeSignal = FMath::Max( + ReliableAcceptedAlignedTightPacketExactAcceptedSignal, + (ReliableAcceptedAlignedTightPacketAcceptedSignal > 0 + && ReliableAcceptedAlignedTightPacketExactOutcomeSignal > 0) + ? FMath::Clamp( + FMath::Min( + ReliableAcceptedAlignedTightPacketAcceptedSignal, + ReliableAcceptedAlignedTightPacketExactOutcomeSignal) + 1, + 1, + 4) + : 0); + const int32 ReliableAcceptedAlignedBroadPacketExactCompositeSignal = FMath::Max( + ReliableAcceptedAlignedBroadPacketExactAcceptedSignal, + (ReliableAcceptedAlignedBroadPacketAcceptedSignal > 0 + && ReliableAcceptedAlignedBroadPacketExactOutcomeSignal > 0) + ? FMath::Clamp( + FMath::Min( + ReliableAcceptedAlignedBroadPacketAcceptedSignal, + ReliableAcceptedAlignedBroadPacketExactOutcomeSignal) + 1, + 1, + 4) + : 0); if (AcceptedAlignedTightPacketOutcomeTrustSignal > AcceptedAlignedBroadPacketOutcomeTrustSignal) { @@ -10192,6 +10296,74 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-recommended"); } } + if (ReliableAcceptedAlignedTightPacketExactCompositeSignal + > ReliableAcceptedAlignedBroadPacketExactCompositeSignal) + { + Snapshot.FollowUpGuidanceContinueBias += + ReliableAcceptedAlignedTightPacketExactCompositeSignal; + Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max( + 1, + ReliableAcceptedAlignedTightPacketExactCompositeSignal - 1); + ExplicitFollowUpHandoffSignal = FMath::Clamp( + ExplicitFollowUpHandoffSignal + + (ReliableAcceptedAlignedTightPacketExactCompositeSignal * 2), + 0, + 6); + if (QueueExecutionSummary.bHasOutstandingDeferredWork + || QueueExecutionSummary.StartedQueuedHandoffEventCount > 0) + { + ExplicitQueuedHandoffSignal = FMath::Clamp( + ExplicitQueuedHandoffSignal + + FMath::Min(2, ReliableAcceptedAlignedTightPacketExactCompositeSignal), + 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)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::FollowUp; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-follow-up"); + } + } + else if (ReliableAcceptedAlignedBroadPacketExactCompositeSignal + > ReliableAcceptedAlignedTightPacketExactCompositeSignal) + { + Snapshot.RecommendedGuidanceContinueBias += + ReliableAcceptedAlignedBroadPacketExactCompositeSignal; + Snapshot.SuppressedFollowUpQueuePressureCount += + ReliableAcceptedAlignedBroadPacketExactCompositeSignal; + ExplicitRecommendedHandoffSignal = FMath::Clamp( + ExplicitRecommendedHandoffSignal + + (ReliableAcceptedAlignedBroadPacketExactCompositeSignal * 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)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::Recommended; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-recommended"); + } + } if (StrongMethodDrillFollowUpPacketStartedCount > 0 && StrongMethodDrillFollowUpPacketStartedCount >= WeakMethodDrillFollowUpPacketStartedCount) @@ -13075,6 +13247,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .StartedAcceptedAlignedTightFollowUpPacketTrustReliableOutcomeHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactAcceptedHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount += 1; + } if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( HistoryEntry.StartActionSourceLabel)) { @@ -13086,6 +13264,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactAcceptedHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount += 1; + } if (Summary.LastStartedAtUtc.IsEmpty() || HyperTwistTrainingRepositoryLibraryInternal::CompareUtcStrings( HistoryEntry.EventAtUtc, @@ -13307,6 +13491,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableOutcomeHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactAcceptedHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount += 1; + } if (HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( HistoryEntry.StartActionSourceLabel)) { @@ -13318,6 +13508,12 @@ FHyperTwistTrainingCoachSessionQueueExecutionSummary UHyperTwistTrainingReposito Summary .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHandoffEventCount += 1; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactAcceptedHistorySource( + HistoryEntry.StartActionSourceLabel)) + { + Summary + .CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount += 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 5386381..801ee43 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -926,6 +926,18 @@ FHyperTwistTrainingCoachPanelState UHyperTwistTrainingSubsystem::GetActiveCoachP PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = ActiveCoachMemorySnapshot .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore; 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 2dacdea..3cb2162 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h @@ -1628,6 +1628,8 @@ private: bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeTrust = false; bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketOutcomeHistory = false; bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeHistory = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = 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 369370e..239eca4 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h @@ -2115,6 +2115,18 @@ struct FHyperTwistTrainingCoachMemorySnapshot UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") bool bNeedsCoachIntervention = false; @@ -3897,6 +3909,18 @@ struct FHyperTwistTrainingCoachSessionQueueExecutionSummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHandoffEventCount = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 StartedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 CompletedAcceptedAlignedTightFollowUpPacketTrustReliableExactHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 StartedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 CompletedAcceptedAlignedBroadRecommendedPacketTrustReliableExactHandoffEventCount = 0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 StartedStrongMethodDrillRecoveryPacketQueuedHandoffEventCount = 0; @@ -5476,6 +5500,18 @@ struct FHyperTwistTrainingCoachPanelState UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 SignalCount = 0;