diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 9b64db1..dc92425 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -6676,6 +6676,40 @@ FString UHyperTwistCoachDashboardWidget::ResolveDashboardHandoffStartActionSourc const bool bUseReliableAcceptedAlignedBroadPacketExactHistoryLabel = bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedTightPacketExactOutcomeHistoryLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + const bool bUseReliableAcceptedAlignedBroadPacketExactOutcomeHistoryLabel = + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory + && DisplayedCoachHandoffRecommendationKind == HandoffKind; + if (bUseReliableAcceptedAlignedTightPacketExactOutcomeHistoryLabel) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-recommended"); + default: + return FString(); + } + } + if (bUseReliableAcceptedAlignedBroadPacketExactOutcomeHistoryLabel) + { + switch (HandoffKind) + { + case EHyperTwistTrainingCoachHandoffKind::Queue: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-queued"); + case EHyperTwistTrainingCoachHandoffKind::FollowUp: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-follow-up"); + case EHyperTwistTrainingCoachHandoffKind::Recommended: + return TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-recommended"); + default: + return FString(); + } + } if (bUseReliableAcceptedAlignedTightPacketExactHistoryLabel) { switch (HandoffKind) @@ -7664,6 +7698,42 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: 1, 4) : 0); + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 74.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 88.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 72.0f) + ? FMath::Clamp( + CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketOutcomeTrustBias * 4; @@ -7773,6 +7843,28 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactCompositeBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias) + { + HandoffHistoryBias.FollowUpScore += + ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias * 6; + if (bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias + > ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias) + { + HandoffHistoryBias.RecommendedScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias * 6; + if (bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -10439,6 +10531,8 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeHistory = false; bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory = false; bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory = false; + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory = false; DisplayedCoachHandoffMethodDrillRecoveryMemoryStartActionSourceLabel.Reset(); FString CoachHandoffRecommendationStatusLine; FString CoachHandoffRecommendationDetailLine; @@ -10703,6 +10797,42 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() 1, 4) : 0); + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 74.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 88.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 72.0f) + ? FMath::Clamp( + CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { @@ -10815,6 +10945,28 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactCompositeBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias) + { + HandoffHistoryBias.FollowUpScore += + ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias * 6; + if (bQueueReadyForHandoff && bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias + > ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias) + { + HandoffHistoryBias.RecommendedScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias * 6; + if (bQueueReadyForHandoff && bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += + ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -11684,6 +11836,22 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() || (DisplayedCoachHandoffRecommendationKind == EHyperTwistTrainingCoachHandoffKind::Queue && bQueueLooksRecommendedOrPrimary)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory = + ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::FollowUp + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksFollowUpOrRecovery)); + bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory = + ReliableAcceptedAlignedBroadPacketExactOutcomeHistoryBias + > ReliableAcceptedAlignedTightPacketExactOutcomeHistoryBias + && (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Recommended + || (DisplayedCoachHandoffRecommendationKind + == EHyperTwistTrainingCoachHandoffKind::Queue + && bQueueLooksRecommendedOrPrimary)); const bool bHandoffRecommendationUsedStrongMethodDrillFollowUpPacket = bHandoffRecommendationUsedMethodDrillWeighting && HandoffRecommendationKind @@ -11937,6 +12105,13 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactAcceptedAverageScore, CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore ); + CoachHandoffRecommendationDetailLine += FString::Printf( + TEXT(" | reliable accepted packet exact branch launched-plan outcomes tight/broad %d/%d avg %.1f/%.1f"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + ); CoachHandoffRecommendationDetailLine += FString::Printf( TEXT(" | reliable accepted aligned packet handoff history follow-up/recommended %d/%d"), HandoffHistoryBias.ReliableAcceptedAlignedTightFollowUpPacketAcceptedDeltaCount, @@ -12037,6 +12212,16 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CoachHandoffRecommendationDetailLine += TEXT(" | Reliable exact accepted aligned broad packet branch history is now hardening broader redirect."); } + if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable exact accepted aligned tight packet launched-plan outcomes are now promoting narrow continuation as a stronger retained branch."); + } + else if (bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable exact accepted aligned broad packet launched-plan outcomes are now promoting broader redirect as a stronger retained branch."); + } 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 c7372b5..342cc4c 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-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-"))) + { + return TEXT("reliable exact accepted aligned tight follow-up-packet launched-plan outcome history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-")) || SourceLabel.StartsWith( @@ -462,6 +469,13 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedBroadRecommendedGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-"))) + { + return TEXT("reliable exact accepted aligned broad recommended-packet launched-plan outcome history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-")) || SourceLabel.StartsWith( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 7a23ce3..5209b9f 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -557,6 +557,24 @@ namespace HyperTwistTrainingRepositoryLibraryInternal TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-")); } + bool IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeHistorySource( + const FString& SourceLabel) + { + return SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-")); + } + + bool IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeHistorySource( + const FString& SourceLabel) + { + return SourceLabel.StartsWith( + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-")) + || SourceLabel.StartsWith( + TEXT("dashboard-handoff-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-")); + } + FString ResolveMethodDrillFollowUpPacketStructureRecoverySourceLabel( const FString& PreferredCoachHandoffSourceLabel, const FString& PreferredGuidanceSourceLabel) @@ -8044,6 +8062,14 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore; Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = RecommendationHistory.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount = + RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount = + RecommendationHistory.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore = + RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = + RecommendationHistory.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore; Snapshot.bHasRepeatRecommendationPressure = RecommendationHistory.bHasRepeatRecommendationPressure; const int32 DeferredTightenedLaunchBias = FMath::Clamp( RecommendationHistory.DeferredTightenedLaunchPlanCount, @@ -9962,6 +9988,40 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der 1, 4) : 0); + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal = + (Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount >= 2 + && Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 74.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + - Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + + (Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 88.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeHistorySignal = + (Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + >= 2 + && Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 72.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + - Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + + (Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustSignal > AcceptedAlignedBroadPacketOutcomeTrustSignal) { @@ -10364,6 +10424,78 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-recommended"); } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal + > ReliableAcceptedAlignedBroadPacketExactOutcomeHistorySignal) + { + Snapshot.FollowUpGuidanceContinueBias += + ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal; + Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max( + 1, + ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal - 1); + ExplicitFollowUpHandoffSignal = FMath::Clamp( + ExplicitFollowUpHandoffSignal + + (ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal * 2), + 0, + 6); + if (QueueExecutionSummary.bHasOutstandingDeferredWork + || QueueExecutionSummary.StartedQueuedHandoffEventCount > 0) + { + ExplicitQueuedHandoffSignal = FMath::Clamp( + ExplicitQueuedHandoffSignal + + FMath::Min(2, ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal), + 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)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::FollowUp; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-follow-up"); + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeHistorySignal + > ReliableAcceptedAlignedTightPacketExactOutcomeHistorySignal) + { + Snapshot.RecommendedGuidanceContinueBias += + ReliableAcceptedAlignedBroadPacketExactOutcomeHistorySignal; + Snapshot.SuppressedFollowUpQueuePressureCount += + ReliableAcceptedAlignedBroadPacketExactOutcomeHistorySignal; + ExplicitRecommendedHandoffSignal = FMath::Clamp( + ExplicitRecommendedHandoffSignal + + (ReliableAcceptedAlignedBroadPacketExactOutcomeHistorySignal * 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)) + { + Snapshot.PreferredGuidanceLane = + EHyperTwistTrainingCoachGuidanceLane::Recommended; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-recommended"); + } + } if (StrongMethodDrillFollowUpPacketStartedCount > 0 && StrongMethodDrillFollowUpPacketStartedCount >= WeakMethodDrillFollowUpPacketStartedCount) @@ -14687,6 +14819,8 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito float AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAccumulator = 0.0f; float AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAccumulator = 0.0f; float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAccumulator = 0.0f; + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAccumulator = 0.0f; + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAccumulator = 0.0f; FString LatestPlanSortUtc; for (const FHyperTwistTrainingCoachActionPlan& Plan : UserPlans) @@ -14961,6 +15095,24 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAccumulator += OutcomeSummary.OutcomeScore; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactAcceptedHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel)) + { + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount += 1; + AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAccumulator += + OutcomeSummary.OutcomeScore; + } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactAcceptedHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel)) + { + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount += 1; + AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAccumulator += + OutcomeSummary.OutcomeScore; + } if (OutcomeSummary.PlannedLaunchCaseCount > 0) { PlannedLaunchCaseCountAccumulator += @@ -15199,6 +15351,20 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito / static_cast( Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount); } + if (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount > 0) + { + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore = + AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAccumulator + / static_cast( + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount); + } + if (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount > 0) + { + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = + AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAccumulator + / static_cast( + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount); + } const int32 AcceptedAlignedTightPacketOutcomeLaneSignal = (Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount >= 2 && Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 60.0f) @@ -15297,6 +15463,34 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito 1, 4) : 0; + const int32 AcceptedAlignedTightPacketReliableExactOutcomeHistorySignal = + (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount >= 2 + && Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 72.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + - Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + + (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore + >= 88.0f + ? 1 + : 0), + 1, + 5) + : 0; + const int32 AcceptedAlignedBroadPacketReliableExactOutcomeHistorySignal = + (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount >= 2 + && Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 70.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount + - Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount + + (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 5) + : 0; if (AcceptedAlignedTightPacketOutcomeLaneSignal > AcceptedAlignedBroadPacketOutcomeLaneSignal) { if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer @@ -15396,6 +15590,34 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito Summary.RecommendedLaneContinueBias += AcceptedAlignedBroadPacketReliableExactOutcomeLaneSignal; } + if (AcceptedAlignedTightPacketReliableExactOutcomeHistorySignal + > AcceptedAlignedBroadPacketReliableExactOutcomeHistorySignal) + { + if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer + || Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::VirtualCube) + { + Summary.DominantSuggestedMode = EHyperTwistTrainingDeliveryMode::CoachReviewed; + } + Summary.DominantSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; + Summary.FollowUpLaneContinueBias += + AcceptedAlignedTightPacketReliableExactOutcomeHistorySignal; + } + else if (AcceptedAlignedBroadPacketReliableExactOutcomeHistorySignal + > AcceptedAlignedTightPacketReliableExactOutcomeHistorySignal) + { + if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::CoachReviewed + && Summary.EscalatedSequenceCount == 0 + && Summary.FollowUpReadySequenceCount == 0) + { + Summary.DominantSuggestedMode = EHyperTwistTrainingDeliveryMode::Timer; + } + if (Summary.DominantSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Scripted) + { + Summary.DominantSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Weighted; + } + Summary.RecommendedLaneContinueBias += + AcceptedAlignedBroadPacketReliableExactOutcomeHistorySignal; + } Summary.bHasRepeatRecommendationPressure = Summary.RepeatRecommendationSequenceCount > 0 && (Summary.RecurringCaseCount > 0 diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp index 801ee43..f1ab365 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -938,6 +938,18 @@ FHyperTwistTrainingCoachPanelState UHyperTwistTrainingSubsystem::GetActiveCoachP PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = ActiveCoachMemorySnapshot .AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore; 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 3cb2162..f84157b 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistCoachDashboardWidget.h @@ -1630,6 +1630,8 @@ private: bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketOutcomeHistory = false; bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactHistory = false; bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactHistory = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedTightPacketExactOutcomeHistory = false; + bool bDisplayedCoachHandoffRecommendationUsedReliableAcceptedAlignedBroadPacketExactOutcomeHistory = 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 239eca4..3ea8baf 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h @@ -2127,6 +2127,18 @@ struct FHyperTwistTrainingCoachMemorySnapshot UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") bool bNeedsCoachIntervention = false; @@ -4753,6 +4765,18 @@ struct FHyperTwistTrainingCoachRecommendationHistorySummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") TArray RecurringCaseIds; @@ -5512,6 +5536,18 @@ struct FHyperTwistTrainingCoachPanelState UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableExactAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 SignalCount = 0;