Class BeliefState
- java.lang.Object
-
- net.sf.tweety.agents.dialogues.oppmodels.BeliefState
-
- Direct Known Subclasses:
T1BeliefState,T2BeliefState,T3BeliefState
public abstract class BeliefState extends java.lang.ObjectThis abstract class encapsulates the common characteristics of a belief state for arguing agents.- Author:
- Matthias Thimm, Tjitze Rienstra
-
-
Field Summary
Fields Modifier and Type Field Description private ExtensionknownArgumentsThe set of arguments known by the agent.private UtilityFunction<Argument,Extension>utilityFunctionThe utility function of the agent.
-
Constructor Summary
Constructors Constructor Description BeliefState(Extension knownArguments, UtilityFunction<Argument,Extension> utilityFunction)Creates a new belief-state with the given parameters.
-
Method Summary
Modifier and Type Method Description abstract java.lang.Objectclone()abstract java.lang.Stringdisplay()Pretty print of this belief state.protected abstract Pair<java.lang.Double,java.util.Set<ExecutableExtension>>doMove(ArgumentationEnvironment env, DialogueTrace<Argument,Extension> trace)Gives the set of all best next moves with their expected utility according to the belief state and the given trace.booleanequals(java.lang.Object obj)protected ExtensiongetKnownArguments()Returns the set of known arguments.protected java.util.Set<ExecutableExtension>getLegalMoves(ArgumentationEnvironment env, DialogueTrace<Argument,Extension> trace)Returns the set of possible moves in the given situation and the given trace.protected UtilityFunction<Argument,Extension>getUtilityFunction()Returns the utility function of this belief state.inthashCode()private booleanisLegal(ArgumentationEnvironment env, DialogueTrace<Argument,Extension> trace, java.util.Set<Argument> move)Given the theory from the environment and the dialogue trace, returns true if move is a valid move.ExecutableExtensionmove(ArgumentationEnvironment env)Gives the next best move according to the belief state and the given trace.abstract voidupdate(DialogueTrace<Argument,Extension> trace)Updates the current belief state accordingly to the given dialogue trace.
-
-
-
Field Detail
-
knownArguments
private Extension knownArguments
The set of arguments known by the agent.
-
utilityFunction
private UtilityFunction<Argument,Extension> utilityFunction
The utility function of the agent.
-
-
Constructor Detail
-
BeliefState
public BeliefState(Extension knownArguments, UtilityFunction<Argument,Extension> utilityFunction)
Creates a new belief-state with the given parameters.- Parameters:
knownArguments- the set of arguments known by the agent.utilityFunction- the utility function of the agent.
-
-
Method Detail
-
isLegal
private boolean isLegal(ArgumentationEnvironment env, DialogueTrace<Argument,Extension> trace, java.util.Set<Argument> move)
Given the theory from the environment and the dialogue trace, returns true if move is a valid move.- Parameters:
env- the environment (gives access to universal Dung theory)trace- the trace to be considered.move- a possible move- Returns:
- "true" if the given move is legal.
-
getLegalMoves
protected java.util.Set<ExecutableExtension> getLegalMoves(ArgumentationEnvironment env, DialogueTrace<Argument,Extension> trace)
Returns the set of possible moves in the given situation and the given trace.- Parameters:
env- the environment (gives access to universal Dung theory)trace- the trace to be considered.- Returns:
- the set of possible moves in the given situation.
-
getKnownArguments
protected Extension getKnownArguments()
Returns the set of known arguments.- Returns:
- the set of known arguments.
-
getUtilityFunction
protected UtilityFunction<Argument,Extension> getUtilityFunction()
Returns the utility function of this belief state.- Returns:
- the utility function of this belief state.
-
update
public abstract void update(DialogueTrace<Argument,Extension> trace)
Updates the current belief state accordingly to the given dialogue trace.- Parameters:
trace- a dialogue trace
-
doMove
protected abstract Pair<java.lang.Double,java.util.Set<ExecutableExtension>> doMove(ArgumentationEnvironment env, DialogueTrace<Argument,Extension> trace)
Gives the set of all best next moves with their expected utility according to the belief state and the given trace.- Parameters:
env- the environment (gives access to the current trace)trace- the dialogue trace.- Returns:
- the set of all best next moves with their expected utility
-
display
public abstract java.lang.String display()
Pretty print of this belief state.- Returns:
- a string representation of this state.
-
move
public ExecutableExtension move(ArgumentationEnvironment env)
Gives the next best move according to the belief state and the given trace.- Parameters:
env- the environment (gives access to the current trace)- Returns:
- a set of arguments.
-
clone
public abstract java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-