Class GroundedGameProtocol
java.lang.Object
org.tweetyproject.agents.AbstractProtocol
org.tweetyproject.agents.RigidProtocol
org.tweetyproject.agents.RoundRobinProtocol
org.tweetyproject.agents.dialogues.oppmodels.GroundedGameProtocol
- All Implemented Interfaces:
Protocol,GameProtocol
This class implements a round robin protocol for the grounded game.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorsConstructorDescriptionGroundedGameProtocol(GroundedGameSystem system)Creates a new grounded game protocol for the given grounded game systems. -
Method Summary
Modifier and TypeMethodDescriptiongetUtility(Agent agent)Returns the utility of the given agent for the final situation.If the game has a winner, this methods returns it.booleanReturns "true" if the game has finished and a winner is determined, otherwise it returns "false"toString()Methods inherited from class org.tweetyproject.agents.AbstractProtocol
addProtocolListener, removeProtocolListenerMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tweetyproject.agents.Protocol
addProtocolListener, removeProtocolListener
-
Constructor Details
-
GroundedGameProtocol
Creates a new grounded game protocol for the given grounded game systems.- Parameters:
system- a grounded game system.
-
-
Method Details
-
hasWinner
public boolean hasWinner()Description copied from interface:GameProtocolReturns "true" if the game has finished and a winner is determined, otherwise it returns "false"- Specified by:
hasWinnerin interfaceGameProtocol- Returns:
- "true" if the game has finished and a winner is determined, otherwise it returns "false"
-
getWinner
Description copied from interface:GameProtocolIf the game has a winner, this methods returns it. Otherwise it throws a RuntimeException.- Specified by:
getWinnerin interfaceGameProtocol- Returns:
- the winner of the game.
-
getUtility
Description copied from interface:GameProtocolReturns the utility of the given agent for the final situation.- Specified by:
getUtilityin interfaceGameProtocol- Parameters:
agent- some agent.- Returns:
- the utility of the agent for the final situation.
-
toString
-