Class UtilityBasedLotteryAgent
java.lang.Object
org.tweetyproject.agents.Agent
org.tweetyproject.agents.dialogues.lotteries.AbstractLotteryAgent
org.tweetyproject.agents.dialogues.lotteries.UtilityBasedLotteryAgent
A lottery agent that selects actions based on a utility function.
The agent chooses the action that maximizes its utility according to the given semantics.
-
Constructor Summary
ConstructorDescriptionUtilityBasedLotteryAgent
(String name, DungTheory theory, UtilityFunction util, Semantics semantics) Constructs a newUtilityBasedLotteryAgent
with the given name, Dung theory, utility function, and semantics. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getUtility
(DungTheory theory, Semantics semantics) Returns the utility of a given Dung theory based on the agent's utility function and the specified semantics.next
(Collection<? extends Perceivable> percepts) Chooses the next action based on the utility of subgraphs in the agent's current theory.Methods inherited from class org.tweetyproject.agents.dialogues.lotteries.AbstractLotteryAgent
getSemantics, getTheory
-
Constructor Details
-
UtilityBasedLotteryAgent
public UtilityBasedLotteryAgent(String name, DungTheory theory, UtilityFunction util, Semantics semantics) Constructs a newUtilityBasedLotteryAgent
with the given name, Dung theory, utility function, and semantics.- Parameters:
name
- the name of the agenttheory
- the initial Dung theory of the agentutil
- the utility function used by the agent to evaluate actionssemantics
- the argumentation semantics used by the agent
-
-
Method Details
-
next
Chooses the next action based on the utility of subgraphs in the agent's current theory. The agent selects the subgraph that maximizes the utility according to its utility function.- Specified by:
next
in classAbstractLotteryAgent
- Parameters:
percepts
- the percepts received by the agent- Returns:
- the
ExecutableDungTheory
representing the action with the highest utility
-
getUtility
Returns the utility of a given Dung theory based on the agent's utility function and the specified semantics.- Specified by:
getUtility
in classAbstractLotteryAgent
- Parameters:
theory
- the Dung theory whose utility is to be evaluatedsemantics
- the argumentation semantics used for evaluation- Returns:
- the utility value of the theory according to the utility function
-