abstract class Interaction[I <: Intention, S <: Signal, A <: Agent[I, S]] extends Serializable
Defines agent interactions.
Implementations of this class specify the agent types, including the intention and signal type they use.
- I
The intention type used by the agents, must be a subtype of com.markblokpoel.lanag.core.Intention.
- S
The signal type used by the agents, must be a subtype of com.markblokpoel.lanag.core.Signal.
- A
The type of agents, must be a subtype of com.markblokpoel.lanag.core.Agent.
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- Interaction
- Serializable
- Serializable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Interaction(agent1: A, agent2: A, originData: Data = NoData())
- agent1
One of two agents that is part of this interaction, must be a subtype of com.markblokpoel.lanag.core.Agent.
- agent2
One of two agents that is part of this interaction, must be a subtype of com.markblokpoel.lanag.core.Agent.
- originData
The data specifies the agents origin, must be a subtype of com.markblokpoel.lanag.core.Data. Default value is com.markblokpoel.lanag.core.NoData.
Type Members
-
abstract
type
ListenerType <: Listener[I, S] with A
Specifies what type of listeners this interaction uses.
Specifies what type of listeners this interaction uses. Must be a subtype of the base agent type.
-
abstract
type
SpeakerType <: Speaker[I, S] with A
Specifies what type of speakers this interaction uses.
Specifies what type of speakers this interaction uses. Must be a subtype of the base agent type.
Abstract Value Members
-
abstract
val
agent1AsListener: ListenerType
Specifies agent1 in listener mode.
-
abstract
val
agent1AsSpeaker: SpeakerType
Specifies agent1 in speaker mode.
-
abstract
val
agent2AsListener: ListenerType
Specifies agent2 in listener mode.
-
abstract
val
agent2AsSpeaker: SpeakerType
Specifies agent2 in speaker mode.
-
abstract
val
currentListener: ListenerType
The current listener.
The current listener.
- Attributes
- protected
-
abstract
val
currentSpeaker: SpeakerType
The current speaker.
The current speaker.
- Attributes
- protected
-
abstract
def
runAndCollectData: Data
Simulates all turns in the interaction and returns a collection (possibly a summary) of all the data gathered.
-
abstract
def
stoppingCriterion: Boolean
Specifies when the interaction is over.
Specifies when the interaction is over.
- returns
True when the interaction is finished.
-
abstract
def
turn: Data
Executes a turn in the interaction.
Executes a turn in the interaction.
- returns
Data reflecting the results of this turn.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to any2stringadd[Interaction[I, S, A]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (Interaction[I, S, A], B)
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to ArrowAssoc[Interaction[I, S, A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val agent1: A
- val agent2: A
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
ensuring(cond: (Interaction[I, S, A]) ⇒ Boolean, msg: ⇒ Any): Interaction[I, S, A]
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to Ensuring[Interaction[I, S, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (Interaction[I, S, A]) ⇒ Boolean): Interaction[I, S, A]
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to Ensuring[Interaction[I, S, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Interaction[I, S, A]
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to Ensuring[Interaction[I, S, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): Interaction[I, S, A]
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to Ensuring[Interaction[I, S, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to StringFormat[Interaction[I, S, A]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val originData: Data
-
val
pairId: Long
The unique ID number of this pair / interaction.
-
def
switchRoles(): Unit
Switches the roles of the agents.
Switches the roles of the agents. Speaker becomes listener and listener becomes speaker.
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
→[B](y: B): (Interaction[I, S, A], B)
- Implicit
- This member is added by an implicit conversion from Interaction[I, S, A] to ArrowAssoc[Interaction[I, S, A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Language Agents Simulation framework
For detailed documentation on using the framework please see the README.md file at the Github repository at https://github.com/markblokpoel/lanag-core.