From 4420dba93e11ae68e37832906e20492ac02c28b1 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Wed, 29 Apr 2026 17:48:16 +0200 Subject: [PATCH] Shape coach plans by drill recovery structure --- .../HyperTwistTrainingRepositoryLibrary.cpp | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index e3abd65..49f0646 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -1399,6 +1399,18 @@ namespace HyperTwistTrainingRepositoryLibraryInternal HyperTwistTrainingRepositoryLibraryInternal::IsDeferredOverflowDashboardHandoffSource( CoachMemorySnapshot.PreferredCoachHandoffSourceLabel ); + const bool bNarrowMethodDrillRecoveryStructureHandoffSource = + HyperTwistTrainingRepositoryLibraryInternal::IsNarrowMethodDrillRecoveryStructureDashboardHandoffSource( + CoachMemorySnapshot.PreferredCoachHandoffSourceLabel + ) + || CoachMemorySnapshot.PreferredQueueRecoveryActionSourceLabel + == TEXT("coach-memory-method-drill-recovery-structure-narrow"); + const bool bBroadMethodDrillRecoveryStructureHandoffSource = + HyperTwistTrainingRepositoryLibraryInternal::IsBroadMethodDrillRecoveryStructureDashboardHandoffSource( + CoachMemorySnapshot.PreferredCoachHandoffSourceLabel + ) + || CoachMemorySnapshot.PreferredQueueRecoveryActionSourceLabel + == TEXT("coach-memory-method-drill-recovery-structure-broad"); const bool bStrongMethodDrillRecoveryMemoryHandoffSource = CoachMemorySnapshot.PreferredCoachHandoffSourceLabel.StartsWith( TEXT("coach-memory-dashboard-method-drill-recovery-strong-")) @@ -1409,11 +1421,17 @@ namespace HyperTwistTrainingRepositoryLibraryInternal TEXT("coach-memory-dashboard-method-drill-recovery-weak-")) || CoachMemorySnapshot.PreferredQueueRecoveryActionSourceLabel == TEXT("coach-memory-method-drill-recovery-memory-weak"); + const bool bTightMethodDrillRecoveryPlanSource = + bStrongMethodDrillRecoveryMemoryHandoffSource + || bNarrowMethodDrillRecoveryStructureHandoffSource; + const bool bBroadMethodDrillRecoveryPlanSource = + bWeakMethodDrillRecoveryMemoryHandoffSource + || bBroadMethodDrillRecoveryStructureHandoffSource; if (CoachMemorySnapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::Queue && !CoachBrief.bNeedsCoachReview && CoachBrief.FollowUpDepth <= 0) { - if (bDeferredOverflowHandoffSource || bStrongMethodDrillRecoveryMemoryHandoffSource) + if (bDeferredOverflowHandoffSource || bTightMethodDrillRecoveryPlanSource) { if (CoachBrief.bPreferRecognitionReplayReview && CoachMemorySnapshot.DominantCoachSuggestedMode @@ -1427,7 +1445,12 @@ namespace HyperTwistTrainingRepositoryLibraryInternal InOutMode = EHyperTwistTrainingDeliveryMode::CoachReviewed; } - if (InOutSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Weighted) + if (bNarrowMethodDrillRecoveryStructureHandoffSource + && InOutSelectionPolicy != EHyperTwistTrainingSelectionPolicy::Scripted) + { + InOutSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; + } + else if (InOutSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Weighted) { InOutSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; } @@ -1462,7 +1485,7 @@ namespace HyperTwistTrainingRepositoryLibraryInternal || CoachBrief.bNeedsCoachReview || CoachMemorySnapshot.FollowUpReadyCoachSequenceCount > 0 || CoachMemorySnapshot.ScheduleBlockedFollowUpEventCount > 0 - || bStrongMethodDrillRecoveryMemoryHandoffSource; + || bTightMethodDrillRecoveryPlanSource; if (bShouldBiasFollowUpHandoff) { if (CoachBrief.bPreferRecognitionReplayReview @@ -1480,7 +1503,7 @@ namespace HyperTwistTrainingRepositoryLibraryInternal { InOutSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; } - if ((bDeferredOverflowHandoffSource || bStrongMethodDrillRecoveryMemoryHandoffSource) + if ((bDeferredOverflowHandoffSource || bTightMethodDrillRecoveryPlanSource) && InOutSelectionPolicy != EHyperTwistTrainingSelectionPolicy::Scripted) { InOutSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; @@ -1513,7 +1536,7 @@ namespace HyperTwistTrainingRepositoryLibraryInternal } return; } - if (bWeakMethodDrillRecoveryMemoryHandoffSource) + if (bBroadMethodDrillRecoveryPlanSource) { if (CoachBrief.bPreferRecognitionReplayReview && CoachMemorySnapshot.DominantCoachSuggestedMode @@ -1528,7 +1551,18 @@ namespace HyperTwistTrainingRepositoryLibraryInternal InOutMode = CoachMemorySnapshot.DominantCoachSuggestedMode; } - if (InOutSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Scripted) + if (bBroadMethodDrillRecoveryStructureHandoffSource) + { + if (InOutSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Scripted) + { + InOutSelectionPolicy = + CoachMemorySnapshot.DominantCoachSelectionPolicy + != EHyperTwistTrainingSelectionPolicy::Scripted + ? CoachMemorySnapshot.DominantCoachSelectionPolicy + : EHyperTwistTrainingSelectionPolicy::Weighted; + } + } + else if (InOutSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Scripted) { InOutSelectionPolicy = CoachMemorySnapshot.DominantCoachSelectionPolicy