Package net.sf.tweety.agents.sim
Interface GameProtocol
-
- All Superinterfaces:
Protocol
- All Known Implementing Classes:
DirectGameProtocol
,GroundedGameProtocol
public interface GameProtocol extends Protocol
Classes implementing this interface represent protocols for games in the game theoretic meaning.- Author:
- Matthias Thimm
-
-
Method Summary
Modifier and Type Method Description java.lang.Double
getUtility(Agent agent)
Returns the utility of the given agent for the final situation.Agent
getWinner()
If the game has a winner, this methods returns it.boolean
hasWinner()
Returns "true" if the game has finished and a winner is determined, otherwise it returns "false"-
Methods inherited from interface net.sf.tweety.agents.Protocol
addProtocolListener, removeProtocolListener
-
-
-
-
Method Detail
-
hasWinner
boolean hasWinner()
Returns "true" if the game has finished and a winner is determined, otherwise it returns "false"- Returns:
- "true" if the game has finished and a winner is determined, otherwise it returns "false"
-
getWinner
Agent getWinner()
If the game has a winner, this methods returns it. Otherwise it throws a RuntimeException.- Returns:
- the winner of the game.
-
getUtility
java.lang.Double getUtility(Agent agent)
Returns the utility of the given agent for the final situation.- Parameters:
agent
- some agent.- Returns:
- the utility of the agent for the final situation.
-
-