Packages

  • package root

    For detailed documentation on using the framework please see the README.md file at the Github repository at https://github.com/markblokpoel/lanag-core.

    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.

    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package markblokpoel
    Definition Classes
    com
  • package lanag
    Definition Classes
    markblokpoel
  • package core

    Provides classes, objects and traits that specify the com.markblokpoel.lanag.core architecture of the simulation framework.

    Provides classes, objects and traits that specify the com.markblokpoel.lanag.core architecture of the simulation framework.

    Overview

    Most of the classes, objects and traits in this packages cannot be used on their own. Instead, they specify what minimally should be implemented in any Lanag agent-based simulation.

    Definition Classes
    lanag
    See also

    For an example implementation, see the source code of project ambiguity helps.

  • Agent
  • AgentPair
  • ContentSignal
  • ContentSignalPrototype
  • Data
  • Intention
  • IntentionPrototype
  • Interaction
  • Listener
  • NoData
  • PairGenerator
  • Parameters
  • ReferentialIntention
  • Repair
  • Signal
  • Speaker
  • package jupyterdisplayers

    This package contains a collection of Displayer classes for nice html formatted output in Jupyter notebooks.

    This package contains a collection of Displayer classes for nice html formatted output in Jupyter notebooks.

    Definition Classes
    lanag
  • package math

    A collection of com.markblokpoel.lanag.math utility functions, grouped by topic.

    A collection of com.markblokpoel.lanag.math utility functions, grouped by topic.

    Definition Classes
    lanag
  • package rsa

    This package contains the implementation for the mathematical foundations of Rational Speech Act theory (Frank & Goodman, 2012).

    This package contains the implementation for the mathematical foundations of Rational Speech Act theory (Frank & Goodman, 2012).

    Definition Classes
    lanag
  • package util

    Provides classes and objects for dealing with the simulation infrastructure.

    Provides classes and objects for dealing with the simulation infrastructure.

    Overview

    Spark simulations

    Use com.markblokpoel.lanag.util.SparkSimulation to create an instance of Spark running locally on your machine:

    import com.markblokpoel.lanag.com.markblokpoel.lanag.coreg.util.LocalSparkSimulation
    import LocalSparkSimulation.spark.implicits._
    
    val sequenceToBeParallelized = Seq(...)
    val rdd = LocalSparkSimulation.parallelize(sequenceToBeParallelized)

    You can now RDD functions like org.apache.spark.rdd.RDD.flatMap() and org.apache.spark.rdd.RDD.map() to apply transformations to the sequence.

    rdd.map(a => a +1)

    These will be executed lazily and in parallel. Until you write the results to file, or otherwise collect them, nothing will be executed. For a tutorial on Spark see the Apache Spark website https://spark.apache.org/docs/latest/quick-start.html.

    Global number generators

    The object com.markblokpoel.lanag.util.InteractionIdentifier is used in com.markblokpoel.lanag.core.Interaction to identify pairs of agents.

    The object com.markblokpoel.lanag.util.RNG specifies a global random number generator. Implementations of com.markblokpoel.lanag.core.Interaction that use this object exclusive will be repeatable for specific RNG seeds.

    Definition Classes
    lanag

package core

Provides classes, objects and traits that specify the com.markblokpoel.lanag.core architecture of the simulation framework.

Overview

Most of the classes, objects and traits in this packages cannot be used on their own. Instead, they specify what minimally should be implemented in any Lanag agent-based simulation.

See also

For an example implementation, see the source code of project ambiguity helps.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. core
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Agent[I <: Intention, S <: Signal] extends Serializable

    Defines the Agent class architecture.

    Defines the Agent class architecture.

    This is an immutable class. Agents are parameterized by the type of com.markblokpoel.lanag.core.Intention and com.markblokpoel.lanag.core.Signal they use.

    I

    The intention type must be a subtype of com.markblokpoel.lanag.core.Intention.

    S

    The signal type must be a subtype of com.markblokpoel.lanag.core.Signal.

    Annotations
    @SerialVersionUID()
  2. case class AgentPair[I <: Intention, S <: Signal, A <: Agent[I, S], D <: Data](agent1: A, agent2: A, originData: D) extends Product with Serializable

    Data structure for storing pairs of agents, their type and their origin.

  3. case class ContentSignal(content: Option[Int]) extends ContentSignalPrototype[Option[Int]] with Product with Serializable

    A basic content signal.

    A basic content signal.

    The content of this signal type is an index referring to a particular signal, for example, in a com.markblokpoel.lanag.rsa.Lexicon.

    content

    The optional signal index.

  4. abstract class ContentSignalPrototype[T] extends Signal with Serializable

    The prototype signal that has some content of type T.

    The prototype signal that has some content of type T.

    T

    The type of the content.

    Annotations
    @SerialVersionUID()
  5. trait Data extends AnyRef

    A prototype type for storing simulation data in case classes.

    A prototype type for storing simulation data in case classes. All data case classes are derivatives of this trait.

  6. trait Intention extends AnyRef

    The prototype intention type.

    The prototype intention type. All intention types are derivatives of this trait.

  7. abstract class IntentionPrototype[T] extends Intention with Serializable

    The prototype intention that has some content of type T.

    The prototype intention that has some content of type T.

    T

    The type of the content.

    Annotations
    @SerialVersionUID()
  8. abstract class Interaction[I <: Intention, S <: Signal, A <: Agent[I, S]] extends Serializable

    Defines agent interactions.

    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()
  9. trait Listener[I <: Intention, S <: Signal] extends Agent[I, S]

    A special case of Agent where it is in listener mode.

    A special case of Agent where it is in listener mode.

    This is an immutable class. Listeners are parameterized by the type of com.markblokpoel.lanag.core.Intention and com.markblokpoel.lanag.core.Signal they use.

    I

    The intention type must be a subtype of com.markblokpoel.lanag.core.Intention.

    S

    The signal type must be a subtype of com.markblokpoel.lanag.core.Signal.

  10. case class NoData() extends Data with Product with Serializable

    Use this class in your agent simulation implementation when you have no data to collect.

  11. abstract class PairGenerator[P <: Parameters, I <: Intention, S <: Signal, A <: Agent[I, S], D <: Data] extends Serializable

    Defines a pair generator.

    Defines a pair generator.

    Implementations of this specify a parameter space and how, for any value in the parameter space, a pair of agents can be randomly generated. This class is parameterized by the parameter type, intention type, signal type, agent type and data type.

    P

    Specifies the type of parameters in the parameter space, must be a subtype of com.markblokpoel.lanag.core.Parameters.

    I

    Specifies the type of intention the agents generated use, must be a subtype of com.markblokpoel.lanag.core.Intention.

    S

    Specifies the type of signal the agents generated use, must be a subtype of com.markblokpoel.lanag.core.Signal.

    A

    Specifies the type agents generated, must be a subtype of com.markblokpoel.lanag.core.Agent.

    D

    Specifies the data generated, must be a subtype of com.markblokpoel.lanag.core.Data.

    Annotations
    @SerialVersionUID()
  12. trait Parameters extends AnyRef

    Prototype type for parameters.

    Prototype type for parameters. All implementations of PairGenerator should also specify a case class that implements this.

  13. case class ReferentialIntention(content: Option[Int]) extends IntentionPrototype[Option[Int]] with Product with Serializable

    A basic referential intention.

    A basic referential intention.

    The content of this intention type is an index referring to a particular referent, for example, in a com.markblokpoel.lanag.rsa.Lexicon.

    content

    The optional referent index.

  14. trait Repair extends AnyRef

    Signals that implement this trait consist of repair information.

  15. trait Signal extends AnyRef

    The prototype signal type.

    The prototype signal type. All signal types are derivatives of this trait.

  16. trait Speaker[I <: Intention, S <: Signal] extends Agent[I, S]

    A special case of Agent where it is in speaker mode.

    A special case of Agent where it is in speaker mode.

    This is an immutable class. Speakers are parameterized by the type of com.markblokpoel.lanag.core.Intention and com.markblokpoel.lanag.core.Signal they use.

    I

    The intention type must be a subtype of com.markblokpoel.lanag.core.Intention.

    S

    The signal type must be a subtype of com.markblokpoel.lanag.core.Signal.

Value Members

  1. object ContentSignal extends Product with Serializable

    Helper object to create instance of ContentSignal.

  2. object ReferentialIntention extends Product with Serializable

    Helper object to create instance of ReferentialIntention.

Inherited from AnyRef

Inherited from Any

Ungrouped