Learn aligned guidance lane outcomes upstream

This commit is contained in:
axiomlogicnexus 2026-04-29 22:00:29 +02:00
parent 5eaadce5ad
commit be5346e6c0
5 changed files with 236 additions and 1 deletions

View file

@ -358,6 +358,14 @@ namespace HyperTwistCoachDashboardWidgetInternal
{
return TEXT("accepted drill-driven recommended handoff history");
}
if (SourceLabel == TEXT("recommendation-history-aligned-tight-follow-up-outcome"))
{
return TEXT("aligned tight launched-plan follow-up outcome history");
}
if (SourceLabel == TEXT("recommendation-history-aligned-broad-recommended-outcome"))
{
return TEXT("aligned broad launched-plan recommended outcome history");
}
if (SourceLabel == TEXT("coach-memory-dashboard-method-drill-recovery-strong-queued"))
{
return TEXT("accepted strong drill-recovery-memory queued handoff history");
@ -10983,6 +10991,24 @@ void UHyperTwistCoachDashboardWidget::UpdateDashboardPresentation()
: TEXT(""))
);
}
if (CachedCoachPanelState.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount > 0
|| CachedCoachPanelState.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount > 0)
{
GuidancePreferenceDetailLine += FString::Printf(
TEXT(" | Aligned launched-plan lane outcomes: tight->follow-up %d (avg %.2f) | broad->recommended %d (avg %.2f)%s"),
CachedCoachPanelState.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount,
CachedCoachPanelState.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore,
CachedCoachPanelState.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount,
CachedCoachPanelState.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore,
CachedCoachPanelState.PreferredGuidanceSourceLabel
== TEXT("recommendation-history-aligned-tight-follow-up-outcome")
? TEXT(" | Follow-up is currently being reinforced by aligned tight launched-plan lane outcomes.")
: (CachedCoachPanelState.PreferredGuidanceSourceLabel
== TEXT("recommendation-history-aligned-broad-recommended-outcome")
? TEXT(" | Recommended is currently being reinforced by aligned broad launched-plan lane outcomes.")
: TEXT(""))
);
}
const bool bQueueRecoveryMemorySource =
HyperTwistCoachDashboardWidgetInternal::IsQueueRecoveryMemorySource(
CachedCoachPanelState.PreferredGuidanceSourceLabel);

View file

@ -380,6 +380,14 @@ namespace HyperTwistTrainingCoachLibraryInternal
{
return TEXT("accepted drill-driven recommended handoff history");
}
if (SourceLabel == TEXT("recommendation-history-aligned-tight-follow-up-outcome"))
{
return TEXT("aligned tight launched-plan follow-up outcome history");
}
if (SourceLabel == TEXT("recommendation-history-aligned-broad-recommended-outcome"))
{
return TEXT("aligned broad launched-plan recommended outcome history");
}
if (SourceLabel == TEXT("coach-memory-dashboard-method-drill-recovery-strong-queued"))
{
return TEXT("accepted strong drill-recovery-memory queued handoff history");

View file

@ -7605,6 +7605,14 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der
Snapshot.ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore =
RecommendationHistory
.ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore;
Snapshot.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount =
RecommendationHistory.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount;
Snapshot.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount =
RecommendationHistory.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount;
Snapshot.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore =
RecommendationHistory.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore;
Snapshot.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore =
RecommendationHistory.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore;
Snapshot.bHasRepeatRecommendationPressure = RecommendationHistory.bHasRepeatRecommendationPressure;
const int32 DeferredTightenedLaunchBias = FMath::Clamp(
RecommendationHistory.DeferredTightenedLaunchPlanCount,
@ -7781,6 +7789,95 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der
TEXT("coach-memory-method-drill-recovery-structure-plan-broad-trusted-reliable-aligned-outcome");
}
}
const int32 ReliableAlignedTrustedTightFollowUpGuidanceOutcomeBias =
(RecommendationHistory.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount >= 2
&& RecommendationHistory.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore >= 60.0f)
? FMath::Clamp(
RecommendationHistory.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount
- RecommendationHistory.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount
+ (RecommendationHistory
.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore
>= 80.0f
? 1
: 0),
1,
4)
: 0;
const int32 ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeBias =
(RecommendationHistory.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount >= 2
&& RecommendationHistory
.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore
>= 58.0f)
? FMath::Clamp(
RecommendationHistory.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount
- RecommendationHistory.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount
+ (RecommendationHistory
.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore
>= 78.0f
? 1
: 0),
1,
4)
: 0;
if (ReliableAlignedTrustedTightFollowUpGuidanceOutcomeBias
> ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeBias)
{
Snapshot.FollowUpGuidanceContinueBias += ReliableAlignedTrustedTightFollowUpGuidanceOutcomeBias;
Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max(
1,
ReliableAlignedTrustedTightFollowUpGuidanceOutcomeBias - 1
);
if (Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::None
|| Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::Recommended
|| Snapshot.PreferredGuidanceSourceLabel.StartsWith(TEXT("recommendation-history"))
|| Snapshot.PreferredGuidanceSourceLabel.StartsWith(
TEXT("coach-memory-method-drill-recovery-structure-plan")))
{
Snapshot.PreferredGuidanceLane = EHyperTwistTrainingCoachGuidanceLane::FollowUp;
Snapshot.PreferredGuidanceSourceLabel =
TEXT("recommendation-history-aligned-tight-follow-up-outcome");
}
if (Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::None
|| Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::Recommended
|| Snapshot.PreferredCoachHandoffSourceLabel.IsEmpty()
|| Snapshot.PreferredCoachHandoffSourceLabel.StartsWith(TEXT("recommendation-history"))
|| Snapshot.PreferredCoachHandoffSourceLabel.StartsWith(
TEXT("coach-memory-method-drill-recovery-structure-plan")))
{
Snapshot.PreferredCoachHandoffKind = EHyperTwistTrainingCoachHandoffKind::FollowUp;
Snapshot.PreferredCoachHandoffSourceLabel =
TEXT("recommendation-history-aligned-tight-follow-up-outcome");
}
}
else if (ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeBias
> ReliableAlignedTrustedTightFollowUpGuidanceOutcomeBias)
{
Snapshot.RecommendedGuidanceContinueBias +=
ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeBias;
Snapshot.SuppressedFollowUpQueuePressureCount +=
ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeBias;
if (Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::None
|| Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::FollowUp
|| Snapshot.PreferredGuidanceSourceLabel.StartsWith(TEXT("recommendation-history"))
|| Snapshot.PreferredGuidanceSourceLabel.StartsWith(
TEXT("coach-memory-method-drill-recovery-structure-plan")))
{
Snapshot.PreferredGuidanceLane = EHyperTwistTrainingCoachGuidanceLane::Recommended;
Snapshot.PreferredGuidanceSourceLabel =
TEXT("recommendation-history-aligned-broad-recommended-outcome");
}
if (Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::None
|| Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::FollowUp
|| Snapshot.PreferredCoachHandoffSourceLabel.IsEmpty()
|| Snapshot.PreferredCoachHandoffSourceLabel.StartsWith(TEXT("recommendation-history"))
|| Snapshot.PreferredCoachHandoffSourceLabel.StartsWith(
TEXT("coach-memory-method-drill-recovery-structure-plan")))
{
Snapshot.PreferredCoachHandoffKind = EHyperTwistTrainingCoachHandoffKind::Recommended;
Snapshot.PreferredCoachHandoffSourceLabel =
TEXT("recommendation-history-aligned-broad-recommended-outcome");
}
}
if (!RecommendationHistory.FocusDeckId.IsEmpty()
&& (Snapshot.FocusDeckId.IsEmpty()
@ -12848,6 +12945,8 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito
float DeferredFirstFollowUpPacketOutcomeAccumulator = 0.0f;
float ReliableAlignedTrustedTightPlanOutcomeAccumulator = 0.0f;
float ReliableAlignedTrustedBroadPlanOutcomeAccumulator = 0.0f;
float ReliableAlignedTrustedTightFollowUpLaneOutcomeAccumulator = 0.0f;
float ReliableAlignedTrustedBroadRecommendedLaneOutcomeAccumulator = 0.0f;
FString LatestPlanSortUtc;
for (const FHyperTwistTrainingCoachActionPlan& Plan : UserPlans)
@ -13024,17 +13123,39 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito
if (OutcomeSummary.IsStructurallyValid())
{
const EHyperTwistTrainingCoachGuidanceLane OutcomeGuidanceLane =
Pair.Value.PreferredGuidanceLane != EHyperTwistTrainingCoachGuidanceLane::None
? Pair.Value.PreferredGuidanceLane
: (Pair.Value.FollowUpDepth > 0 || !Pair.Value.ParentPlanId.IsEmpty()
? EHyperTwistTrainingCoachGuidanceLane::FollowUp
: (OutcomeSummary.PreferredCoachHandoffKind
== EHyperTwistTrainingCoachHandoffKind::FollowUp
? EHyperTwistTrainingCoachGuidanceLane::FollowUp
: (OutcomeSummary.PreferredCoachHandoffKind
== EHyperTwistTrainingCoachHandoffKind::Recommended
? EHyperTwistTrainingCoachGuidanceLane::Recommended
: EHyperTwistTrainingCoachGuidanceLane::Recommended)));
if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAlignedTrustedTightMethodDrillRecoveryStructurePlanCoachMemorySource(
OutcomeSummary.PreferredCoachHandoffSourceLabel))
{
Summary.ReliableAlignedTrustedTightMethodDrillRecoveryStructurePlanOutcomeHistoryCount += 1;
ReliableAlignedTrustedTightPlanOutcomeAccumulator += OutcomeSummary.OutcomeScore;
if (OutcomeGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::FollowUp)
{
Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount += 1;
ReliableAlignedTrustedTightFollowUpLaneOutcomeAccumulator += OutcomeSummary.OutcomeScore;
}
}
if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanCoachMemorySource(
OutcomeSummary.PreferredCoachHandoffSourceLabel))
{
Summary.ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeHistoryCount += 1;
ReliableAlignedTrustedBroadPlanOutcomeAccumulator += OutcomeSummary.OutcomeScore;
if (OutcomeGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::Recommended)
{
Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount += 1;
ReliableAlignedTrustedBroadRecommendedLaneOutcomeAccumulator += OutcomeSummary.OutcomeScore;
}
}
if (OutcomeSummary.PlannedLaunchCaseCount > 0)
{
@ -13196,6 +13317,19 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito
/ static_cast<float>(
Summary.ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeHistoryCount);
}
if (Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount > 0)
{
Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore =
ReliableAlignedTrustedTightFollowUpLaneOutcomeAccumulator
/ static_cast<float>(Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount);
}
if (Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount > 0)
{
Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore =
ReliableAlignedTrustedBroadRecommendedLaneOutcomeAccumulator
/ static_cast<float>(
Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount);
}
Summary.bHasRepeatRecommendationPressure =
Summary.RepeatRecommendationSequenceCount > 0
&& (Summary.RecurringCaseCount > 0
@ -13228,8 +13362,31 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito
+ static_cast<float>(Summary.DeferredFirstFollowUpPacketPlanCount) * 1.5f
+ FMath::Clamp(static_cast<float>(Summary.DeferredLaunchCaseCount) * 0.25f, 0.0f, 4.0f)
+ Summary.AverageFollowUpDepth;
const int32 ReliableAlignedTrustedTightFollowUpLaneSignal =
(Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount >= 2
&& Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore >= 60.0f)
? FMath::Clamp(
Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount
- Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount
+ (Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore >= 80.0f ? 1 : 0),
1,
4)
: 0;
const int32 ReliableAlignedTrustedBroadRecommendedLaneSignal =
(Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount >= 2
&& Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore >= 58.0f)
? FMath::Clamp(
Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount
- Summary.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount
+ (Summary.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore >= 78.0f ? 1 : 0),
1,
4)
: 0;
Summary.PreferredGuidanceLane =
bHasFollowUpLaneSignal && FollowUpLaneScore > RecommendedLaneScore
bHasFollowUpLaneSignal
&& (FollowUpLaneScore + static_cast<float>(ReliableAlignedTrustedTightFollowUpLaneSignal) * 1.5f)
> (RecommendedLaneScore
+ static_cast<float>(ReliableAlignedTrustedBroadRecommendedLaneSignal) * 1.5f)
? EHyperTwistTrainingCoachGuidanceLane::FollowUp
: EHyperTwistTrainingCoachGuidanceLane::Recommended;

View file

@ -815,6 +815,14 @@ FHyperTwistTrainingCoachPanelState UHyperTwistTrainingSubsystem::GetActiveCoachP
PanelState.ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore =
ActiveCoachMemorySnapshot
.ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore;
PanelState.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount =
ActiveCoachMemorySnapshot.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount;
PanelState.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount =
ActiveCoachMemorySnapshot.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount;
PanelState.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore =
ActiveCoachMemorySnapshot.ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore;
PanelState.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore =
ActiveCoachMemorySnapshot.ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore;
PanelState.bRepositoryVerificationPassed = ActiveRepositoryRoundTripVerification.bDidRoundTripPass;
PanelState.bRepositoryVerificationNeedsAttention = ActiveRepositoryRoundTripVerification.ResolvedPath.IsEmpty()
|| !ActiveRepositoryRoundTripVerification.bDidRoundTripPass;

View file

@ -2007,6 +2007,18 @@ struct FHyperTwistTrainingCoachMemorySnapshot
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
bool bNeedsCoachIntervention = false;
@ -4507,6 +4519,18 @@ struct FHyperTwistTrainingCoachRecommendationHistorySummary
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
TArray<FString> RecurringCaseIds;
@ -5146,6 +5170,18 @@ struct FHyperTwistTrainingCoachPanelState
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedBroadMethodDrillRecoveryStructurePlanOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 ReliableAlignedTrustedTightFollowUpGuidanceOutcomeHistoryCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeHistoryCount = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedTightFollowUpGuidanceOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
float ReliableAlignedTrustedBroadRecommendedGuidanceOutcomeAverageScore = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
int32 SignalCount = 0;