Class GroundedGameAgentGenerator
- java.lang.Object
-
- net.sf.tweety.agents.dialogues.oppmodels.sim.GroundedGameAgentGenerator
-
- All Implemented Interfaces:
AgentGenerator<ArguingAgent,GroundedGameSystem>
- Direct Known Subclasses:
GroundedGameT1AgentGenerator
,GroundedGameT2AgentGenerator
,GroundedGameT3AgentGenerator
public abstract class GroundedGameAgentGenerator extends java.lang.Object implements AgentGenerator<ArguingAgent,GroundedGameSystem>
Generates new arguing agents for a grounded game. Encapsulates common characteristics for specific models.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private GroundedGameSystem.AgentFaction
faction
The faction of the agents to be generatedprivate java.util.Random
random
Random numbers generator.
-
Constructor Summary
Constructors Constructor Description GroundedGameAgentGenerator(GroundedGameSystem.AgentFaction faction)
Creates a new agent generator.
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
ArguingAgent
generate(GroundedGameSystem mas, SimulationParameters params)
Generates a new agent for the given multi-agent system.protected abstract BeliefState
generateBeliefState(GroundedGameSystem mas, SimulationParameters params)
Generates a belief state for the agent wrt.GroundedGameSystem.AgentFaction
getFaction()
Returns the faction of the generated agents.protected java.util.Random
getRandom()
Returns the random number generator.int
hashCode()
void
setSeed(long seed)
Set the seed for the generation.java.lang.String
toString()
-
-
-
Field Detail
-
faction
private GroundedGameSystem.AgentFaction faction
The faction of the agents to be generated
-
random
private java.util.Random random
Random numbers generator.
-
-
Constructor Detail
-
GroundedGameAgentGenerator
public GroundedGameAgentGenerator(GroundedGameSystem.AgentFaction faction)
Creates a new agent generator.- Parameters:
faction
- the type of the agents to be generated.
-
-
Method Detail
-
getFaction
public GroundedGameSystem.AgentFaction getFaction()
Returns the faction of the generated agents.- Returns:
- the faction of the generated agents.
-
generate
public ArguingAgent generate(GroundedGameSystem mas, SimulationParameters params)
Description copied from interface:AgentGenerator
Generates a new agent for the given multi-agent system.- Specified by:
generate
in interfaceAgentGenerator<ArguingAgent,GroundedGameSystem>
- Parameters:
mas
- some multi-agent system.params
- this object can be used for sharing parameters across the generating components of a simulation.- Returns:
- an agent for type T
-
generateBeliefState
protected abstract BeliefState generateBeliefState(GroundedGameSystem mas, SimulationParameters params)
Generates a belief state for the agent wrt. the given MAS- Parameters:
mas
- a grounded game system.params
- shared simulation parameters.- Returns:
- a belief state
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setSeed
public void setSeed(long seed)
Description copied from interface:AgentGenerator
Set the seed for the generation. Every two runs of generations with the same seed are ensured to be identical.- Specified by:
setSeed
in interfaceAgentGenerator<ArguingAgent,GroundedGameSystem>
- Parameters:
seed
- some seed.
-
getRandom
protected java.util.Random getRandom()
Returns the random number generator.- Returns:
- the random number generator.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-