Enum Class CoalitionFormation
- All Implemented Interfaces:
Serializable,Comparable<CoalitionFormation>,Constable
Strategy for forming coalitions.
CoalitionFormation determines how agents are selected or recruited for participation in a coalition.
Formation Types
- VOLUNTARY - Agents choose to participate
- CAPABILITY_BASED - Selection by required capabilities
- REPUTATION_BASED - Selection by past performance
- AUCTION - Agents bid for participation
- RANDOM - Random selection from pool
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAuction-based formation.Capability-based formation.Invitation-based formation.Merit-based formation.Random formation.Reputation-based formation.Voluntary formation. -
Method Summary
Modifier and TypeMethodDescriptionGets formation description.booleanChecks if this formation requires active selection.List<com.tnsai.agents.Agent> selectMembers(List<com.tnsai.agents.Agent> candidates, String goal, int minMembers, int maxMembers) Selects agents for coalition based on formation strategy.static CoalitionFormationReturns the enum constant of this class with the specified name.static CoalitionFormation[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
VOLUNTARY
Voluntary formation.Agents are presented with the goal and decide whether to participate. Coalition forms if minimum threshold is met.
-
CAPABILITY_BASED
Capability-based formation.Agents are selected based on their capabilities matching the goal requirements.
-
REPUTATION_BASED
Reputation-based formation.Agents with higher reputation/past success are preferred for coalition membership.
-
AUCTION
Auction-based formation.Agents bid for participation rights. Highest bidders (or lowest asking price) are selected.
-
RANDOM
Random formation.Agents are randomly selected from available pool. Simple but fair approach.
-
INVITATION
Invitation-based formation.Specific agents are invited by a coordinator. Invited agents can accept or decline.
-
MERIT_BASED
Merit-based formation.Combines capability and reputation scores for optimal team composition.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getDescription
Gets formation description.- Returns:
- description
-
requiresSelection
public boolean requiresSelection()Checks if this formation requires active selection.- Returns:
- true if selection-based
-
selectMembers
public List<com.tnsai.agents.Agent> selectMembers(List<com.tnsai.agents.Agent> candidates, String goal, int minMembers, int maxMembers) Selects agents for coalition based on formation strategy.- Parameters:
candidates- available agentsgoal- coalition goalminMembers- minimum requiredmaxMembers- maximum allowed- Returns:
- selected agents
-