diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp index 3e26513..97930be 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistCoachDashboardWidget.cpp @@ -7538,6 +7538,41 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: 1, 3) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 70.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 68.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 4) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { HandoffHistoryBias.FollowUpScore += AcceptedAlignedTightPacketOutcomeTrustBias * 4; @@ -7611,6 +7646,24 @@ FHyperTwistCoachDashboardQueueRecoveryWeighting UHyperTwistCoachDashboardWidget: ReliableAcceptedAlignedBroadPacketOutcomeAcceptedBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeBias) + { + HandoffHistoryBias.FollowUpScore += ReliableAcceptedAlignedTightPacketExactOutcomeBias * 4; + if (bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedTightPacketExactOutcomeBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeBias + > ReliableAcceptedAlignedTightPacketExactOutcomeBias) + { + HandoffHistoryBias.RecommendedScore += ReliableAcceptedAlignedBroadPacketExactOutcomeBias * 4; + if (bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactOutcomeBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -10447,6 +10500,41 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() 1, 3) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeBias = + (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + >= 2 + && CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 70.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeBias = + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount >= 2 + && CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 68.0f) + ? FMath::Clamp( + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + - CachedCoachPanelState + .AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + + (CachedCoachPanelState + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 4) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustBias > AcceptedAlignedBroadPacketOutcomeTrustBias) { @@ -10523,6 +10611,24 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() ReliableAcceptedAlignedBroadPacketOutcomeAcceptedBias * 2; } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeBias) + { + HandoffHistoryBias.FollowUpScore += ReliableAcceptedAlignedTightPacketExactOutcomeBias * 4; + if (bQueueReadyForHandoff && bQueueLooksFollowUpOrRecovery) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedTightPacketExactOutcomeBias * 2; + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeBias + > ReliableAcceptedAlignedTightPacketExactOutcomeBias) + { + HandoffHistoryBias.RecommendedScore += ReliableAcceptedAlignedBroadPacketExactOutcomeBias * 4; + if (bQueueReadyForHandoff && bQueueLooksRecommendedOrPrimary) + { + HandoffHistoryBias.QueueScore += ReliableAcceptedAlignedBroadPacketExactOutcomeBias * 2; + } + } { HandoffHistoryBias.PreferredKind = HyperTwistCoachDashboardWidgetInternal::EHandoffRecommendationKind::None; @@ -11615,6 +11721,13 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableOutcomeAcceptedAverageScore, CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAcceptedAverageScore ); + CoachHandoffRecommendationDetailLine += FString::Printf( + TEXT(" | reliable accepted packet exact lane outcomes tight/broad %d/%d avg %.1f/%.1f"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + ); CoachHandoffRecommendationDetailLine += FString::Printf( TEXT(" | reliable accepted aligned packet handoff history follow-up/recommended %d/%d"), HandoffHistoryBias.ReliableAcceptedAlignedTightFollowUpPacketAcceptedDeltaCount, @@ -11693,6 +11806,18 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CoachHandoffRecommendationDetailLine += TEXT(" | Reliable accepted aligned broad packet completion history is now reinforcing broader redirect."); } + if (ReliableAcceptedAlignedTightPacketExactOutcomeBias + > ReliableAcceptedAlignedBroadPacketExactOutcomeBias) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable accepted aligned tight packet exact launched-plan outcomes are now reinforcing narrow continuation."); + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeBias + > ReliableAcceptedAlignedTightPacketExactOutcomeBias) + { + CoachHandoffRecommendationDetailLine += + TEXT(" | Reliable accepted aligned broad packet exact launched-plan outcomes are now reinforcing broader redirect."); + } CoachHandoffRecommendationDetailLine += FString::Printf( TEXT(" | upstream drill recovery strong/weak/history %d/%d/%d avg %.1f"), CachedCoachPanelState.StrongMethodDrillRecoveryHistoryCount, @@ -12332,6 +12457,19 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation() CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAcceptedAverageScore ); } + if (CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + > 0 + || CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + > 0) + { + GuidancePreferenceDetailLine += FString::Printf( + TEXT(" | Reliable accepted aligned packet exact lane outcomes: tight follow-up-first %d (avg %.2f) | broad recommended-first %d (avg %.2f)"), + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount, + CachedCoachPanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount, + CachedCoachPanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + ); + } const bool bQueueRecoveryMemorySource = HyperTwistCoachDashboardWidgetInternal::IsQueueRecoveryMemorySource( CachedCoachPanelState.PreferredGuidanceSourceLabel); diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 6e1c3d0..951f476 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -7988,6 +7988,14 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableOutcomeAverageScore; Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAverageScore = RecommendationHistory.AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAverageScore; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount = + RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount = + RecommendationHistory.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount; + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore = + RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore; + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = + RecommendationHistory.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore; Snapshot.bHasRepeatRecommendationPressure = RecommendationHistory.bHasRepeatRecommendationPressure; const int32 DeferredTightenedLaunchBias = FMath::Clamp( RecommendationHistory.DeferredTightenedLaunchPlanCount, @@ -9816,6 +9824,40 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der 1, 3) : 0; + const int32 ReliableAcceptedAlignedTightPacketExactOutcomeSignal = + (Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount >= 2 + && Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 70.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + - Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + + (Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 ReliableAcceptedAlignedBroadPacketExactOutcomeSignal = + (Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + >= 2 + && Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 68.0f) + ? FMath::Clamp( + Snapshot.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + - Snapshot + .AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + + (Snapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 4) + : 0; if (AcceptedAlignedTightPacketOutcomeTrustSignal > AcceptedAlignedBroadPacketOutcomeTrustSignal) { @@ -10082,6 +10124,74 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-recommended"); } } + if (ReliableAcceptedAlignedTightPacketExactOutcomeSignal + > ReliableAcceptedAlignedBroadPacketExactOutcomeSignal) + { + Snapshot.FollowUpGuidanceContinueBias += + ReliableAcceptedAlignedTightPacketExactOutcomeSignal; + Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max( + 1, + ReliableAcceptedAlignedTightPacketExactOutcomeSignal - 1); + ExplicitFollowUpHandoffSignal = FMath::Clamp( + ExplicitFollowUpHandoffSignal + + (ReliableAcceptedAlignedTightPacketExactOutcomeSignal * 2), + 0, + 6); + if (QueueExecutionSummary.bHasOutstandingDeferredWork + || QueueExecutionSummary.StartedQueuedHandoffEventCount > 0) + { + ExplicitQueuedHandoffSignal = FMath::Clamp( + ExplicitQueuedHandoffSignal + + FMath::Min(2, ReliableAcceptedAlignedTightPacketExactOutcomeSignal), + 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-follow-up"); + } + } + else if (ReliableAcceptedAlignedBroadPacketExactOutcomeSignal + > ReliableAcceptedAlignedTightPacketExactOutcomeSignal) + { + Snapshot.RecommendedGuidanceContinueBias += + ReliableAcceptedAlignedBroadPacketExactOutcomeSignal; + Snapshot.SuppressedFollowUpQueuePressureCount += + ReliableAcceptedAlignedBroadPacketExactOutcomeSignal; + ExplicitRecommendedHandoffSignal = FMath::Clamp( + ExplicitRecommendedHandoffSignal + + (ReliableAcceptedAlignedBroadPacketExactOutcomeSignal * 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-recommended"); + } + } if (StrongMethodDrillFollowUpPacketStartedCount > 0 && StrongMethodDrillFollowUpPacketStartedCount >= WeakMethodDrillFollowUpPacketStartedCount) @@ -14379,6 +14489,8 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito float AcceptedAlignedBroadRecommendedPacketTrustOutcomeAccumulator = 0.0f; float AcceptedAlignedTightFollowUpPacketTrustReliableOutcomeAccumulator = 0.0f; float AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAccumulator = 0.0f; + float AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAccumulator = 0.0f; + float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAccumulator = 0.0f; FString LatestPlanSortUtc; for (const FHyperTwistTrainingCoachActionPlan& Plan : UserPlans) @@ -14632,6 +14744,13 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito AcceptedAlignedTightFollowUpPacketTrustReliableOutcomeAccumulator += OutcomeSummary.OutcomeScore; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketOutcomeAcceptedHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel)) + { + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount += 1; + AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAccumulator += + OutcomeSummary.OutcomeScore; + } if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketOutcomeTrustSource( OutcomeSummary.PreferredCoachHandoffSourceLabel)) { @@ -14639,6 +14758,13 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAccumulator += OutcomeSummary.OutcomeScore; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketOutcomeAcceptedHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel)) + { + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount += 1; + AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAccumulator += + OutcomeSummary.OutcomeScore; + } if (OutcomeSummary.PlannedLaunchCaseCount > 0) { PlannedLaunchCaseCountAccumulator += @@ -14863,6 +14989,20 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito / static_cast( Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeHistoryCount); } + if (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount > 0) + { + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore = + AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAccumulator + / static_cast( + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount); + } + if (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount > 0) + { + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = + AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAccumulator + / static_cast( + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount); + } const int32 AcceptedAlignedTightPacketOutcomeLaneSignal = (Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount >= 2 && Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 60.0f) @@ -14933,6 +15073,34 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito 1, 4) : 0; + const int32 AcceptedAlignedTightPacketReliableExactOutcomeLaneSignal = + (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount >= 2 + && Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 70.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + - Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + + (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 4) + : 0; + const int32 AcceptedAlignedBroadPacketReliableExactOutcomeLaneSignal = + (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount >= 2 + && Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 68.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount + - Summary.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount + + (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 4) + : 0; if (AcceptedAlignedTightPacketOutcomeLaneSignal > AcceptedAlignedBroadPacketOutcomeLaneSignal) { if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer @@ -15005,6 +15173,33 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito } Summary.RecommendedLaneContinueBias += AcceptedAlignedBroadPacketReliableOutcomeLaneSignal; } + if (AcceptedAlignedTightPacketReliableExactOutcomeLaneSignal + > AcceptedAlignedBroadPacketReliableExactOutcomeLaneSignal) + { + if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer + || Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::VirtualCube) + { + Summary.DominantSuggestedMode = EHyperTwistTrainingDeliveryMode::CoachReviewed; + } + Summary.DominantSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; + Summary.FollowUpLaneContinueBias += AcceptedAlignedTightPacketReliableExactOutcomeLaneSignal; + } + else if (AcceptedAlignedBroadPacketReliableExactOutcomeLaneSignal + > AcceptedAlignedTightPacketReliableExactOutcomeLaneSignal) + { + 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 += + AcceptedAlignedBroadPacketReliableExactOutcomeLaneSignal; + } 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 58cdae5..5386381 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -916,6 +916,16 @@ FHyperTwistTrainingCoachPanelState UHyperTwistTrainingSubsystem::GetActiveCoachP PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAcceptedAverageScore = ActiveCoachMemorySnapshot .AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAcceptedAverageScore; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount = + ActiveCoachMemorySnapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount; + PanelState.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore = + ActiveCoachMemorySnapshot.AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore; + PanelState.AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = + ActiveCoachMemorySnapshot + .AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore; PanelState.bRepositoryVerificationPassed = ActiveRepositoryRoundTripVerification.bDidRoundTripPass; PanelState.bRepositoryVerificationNeedsAttention = ActiveRepositoryRoundTripVerification.ResolvedPath.IsEmpty() || !ActiveRepositoryRoundTripVerification.bDidRoundTripPass; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h index 02b8460..369370e 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h @@ -2103,6 +2103,18 @@ struct FHyperTwistTrainingCoachMemorySnapshot UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") bool bNeedsCoachIntervention = false; @@ -4705,6 +4717,18 @@ struct FHyperTwistTrainingCoachRecommendationHistorySummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") TArray RecurringCaseIds; @@ -5440,6 +5464,18 @@ struct FHyperTwistTrainingCoachPanelState UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") float AcceptedAlignedBroadRecommendedPacketTrustReliableOutcomeAcceptedAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + int32 AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeHistoryCount = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedTightFollowUpPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAverageScore = 0.0f; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") int32 SignalCount = 0;