Reinforce queue suppression through coach memory

This commit is contained in:
axiomlogicnexus 2026-04-27 19:59:29 +02:00
parent 4c0608f52f
commit 6df13d2d7a
3 changed files with 30 additions and 0 deletions

View file

@ -31,6 +31,7 @@ namespace HyperTwistTrainingCoachLibraryInternal
return FMath::Clamp(
4.0f
+ static_cast<float>(CoachMemorySnapshot.FollowUpGuidanceContinueBias)
+ (static_cast<float>(CoachMemorySnapshot.SuppressedPrimaryQueuePressureCount) * 1.5f)
+ (static_cast<float>(CoachMemorySnapshot.FollowUpReadyCoachSequenceCount) * 1.5f)
+ (static_cast<float>(CoachMemorySnapshot.ScheduleBlockedFollowUpEventCount) * 2.0f),
0.0f,
@ -41,6 +42,7 @@ namespace HyperTwistTrainingCoachLibraryInternal
return FMath::Clamp(
4.0f
+ static_cast<float>(CoachMemorySnapshot.RecommendedGuidanceContinueBias)
+ (static_cast<float>(CoachMemorySnapshot.SuppressedFollowUpQueuePressureCount) * 1.5f)
+ (static_cast<float>(CoachMemorySnapshot.RepeatRecommendationSequenceCount) * 1.5f)
+ (CoachMemorySnapshot.bHasRepeatRecommendationPressure ? 4.0f : 0.0f),
0.0f,
@ -220,6 +222,7 @@ namespace HyperTwistTrainingCoachLibraryInternal
const float FollowUpPressureScore =
FollowUpBrief.PriorityScore
+ static_cast<float>(CoachMemorySnapshot.FollowUpGuidanceContinueBias)
+ (static_cast<float>(CoachMemorySnapshot.SuppressedPrimaryQueuePressureCount) * 2.0f)
+ (FollowUpBrief.bNeedsCoachReview ? 8.0f : 0.0f);
const bool bShouldCreate = RecommendedRetentionScore >= FollowUpPressureScore + 8.0f;
if (!bShouldCreate && OutSuppressionReason != nullptr)
@ -262,6 +265,7 @@ namespace HyperTwistTrainingCoachLibraryInternal
const float RecommendedPressureScore =
CurrentBrief.PriorityScore
+ static_cast<float>(CoachMemorySnapshot.RecommendedGuidanceContinueBias)
+ (static_cast<float>(CoachMemorySnapshot.SuppressedFollowUpQueuePressureCount) * 2.0f)
+ (CoachMemorySnapshot.bHasRepeatRecommendationPressure ? 4.0f : 0.0f);
const float FollowUpRetentionScore =
FollowUpBrief.PriorityScore

View file

@ -5286,6 +5286,26 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der
- (QueueExecutionSummary.bHasBlockedFollowUpFriction ? 1 : 0)
);
}
if (bQueueHistoryPrefersFollowUp
&& Snapshot.PreferredQueueRecoveryAction == EHyperTwistTrainingQueueRecoveryAction::PromoteDeferred)
{
Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max(
1,
DeferredRecoverySignal
+ ExplicitFollowUpRecoverySignal
+ (QueueExecutionSummary.bHasBlockedFollowUpFriction ? 1 : 0)
);
}
if (bQueueHistoryPrefersRecommended
&& Snapshot.PreferredQueueRecoveryAction == EHyperTwistTrainingQueueRecoveryAction::LaunchRecovery)
{
Snapshot.SuppressedFollowUpQueuePressureCount += FMath::Max(
1,
PromotionRecoverySignal
+ ExplicitRecommendedRecoverySignal
+ (QueueExecutionSummary.bHasCompletionGap ? 1 : 0)
);
}
if (!QueueExecutionSummary.FocusDeckId.IsEmpty()
&& (Snapshot.FocusDeckId.IsEmpty() || Snapshot.bNeedsScheduleFrictionRecovery))

View file

@ -1864,6 +1864,12 @@ struct FHyperTwistTrainingCoachMemorySnapshot
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 FollowUpGuidanceContinueBias = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 SuppressedPrimaryQueuePressureCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 SuppressedFollowUpQueuePressureCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
bool bNeedsCoachIntervention = false;