Repository navigation
Add GoldenDirectiveTermination condition (harmonic relationship score) - #8410
Open
pauleisman-a11y wants to merge 1 commit into
Open
pauleisman-a11y wants to merge 1 commit into
pauleisman-a11y wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
1 similar comment
Author
|
@microsoft-github-policy-service agree |
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
GoldenDirectiveTerminationtermination condition toautogen_agentchat.conditions, implementing the Golden Directiverelationship score as a run-stopping condition:
A (agent health) and E (environment health) are supplied by
callables, following the pattern of
FunctionalTermination, so thecaller owns how A and E are measured. The condition terminates the
run when the current Y falls below a caller-set
min_score, andexposes the last computed score as
last_score.The Golden Directive (https://thegoldendirective.pages.dev/) is a
candidate training reward proposed by Paul Eisman: A is an agent's
net contribution-health score, floored at 0, designed to be grounded
in resource ledgers; E is the health of everything not-A, against a
healthy baseline. If either A or E reaches 0, Y reaches 0.
Scope, stated plainly:
run below a threshold. It does not measure A or E.
rule, its reversal (E = A Y / (2A - Y)), or its proposed
fence-patch guardrail.
training method; its results so far are pilot-scale toy
gridworld runs, reported on the site.
Tests
Added to
tests/test_termination_condition.py:(about 7.5); 2,3 -> 2.4; A=0 or E=0 -> 0; 1,10 -> 1.8182;
10,9 -> 9.4737 (A rising enough can still raise Y while E falls);
negative inputs floored at 0.
termination with a StopMessage when E drops to 0, reset clears
the state, async health providers are awaited.
Local run: the full
test_termination_condition.pyfile passes,15 tests (13 existing + 2 new).
Files changed
python/packages/autogen-agentchat/src/autogen_agentchat/conditions/_terminations.py(+119)python/packages/autogen-agentchat/src/autogen_agentchat/conditions/__init__.py(+2)python/packages/autogen-agentchat/tests/test_termination_condition.py(+58)