Package com.tnsai.coordination.decision
Class DefaultGroupDecisionFramework
java.lang.Object
com.tnsai.coordination.decision.DefaultGroupDecisionFramework
- All Implemented Interfaces:
GroupDecisionFramework
Default implementation of
GroupDecisionFramework.
Uses the existing voting infrastructure (ConsensusBuilder,
MajorityVoting) for vote collection and tallying. Adds:
- Decision tracing via
DecisionTraceStore - Leader fallback when consensus is not reached
- Belief synchronization by broadcasting results to members
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconverge(com.tnsai.agents.groups.AgentGroup group, List<Vote> votes, DecisionProposal proposal) Tallies votes, determines outcome, saves trace, and broadcasts result.propose(String topic, List<String> options, VotingMethod method) Creates a decision proposal.vote(com.tnsai.agents.groups.AgentGroup group, DecisionProposal proposal) Collects votes from all group members on a proposal.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.coordination.decision.GroupDecisionFramework
makeDecision
-
Constructor Details
-
DefaultGroupDecisionFramework
-
-
Method Details
-
propose
Description copied from interface:GroupDecisionFrameworkCreates a decision proposal.- Specified by:
proposein interfaceGroupDecisionFramework- Parameters:
topic- the question to decideoptions- available choices (at least 2)method- consensus algorithm- Returns:
- a new proposal
-
vote
Description copied from interface:GroupDecisionFrameworkCollects votes from all group members on a proposal.- Specified by:
votein interfaceGroupDecisionFramework- Parameters:
group- the agent group whose members will voteproposal- the proposal to vote on- Returns:
- collected votes
-
converge
public DecisionResult converge(com.tnsai.agents.groups.AgentGroup group, List<Vote> votes, DecisionProposal proposal) Description copied from interface:GroupDecisionFrameworkTallies votes, determines outcome, saves trace, and broadcasts result. If no consensus is reached and a leader exists, falls back to leader decision.- Specified by:
convergein interfaceGroupDecisionFramework- Parameters:
group- the agent group (for leader fallback and belief sync)votes- collected votesproposal- the original proposal- Returns:
- the decision result
-