org.aiddl.common.scala.execution.simulation.SimulationEvent.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aiddl-common-scala Show documentation
Show all versions of aiddl-common-scala Show documentation
Provides common types and algorithm implementations for the fast prototyping integrative AI systems with the AIDDL framework.
The newest version!
package org.aiddl.common.scala.execution.simulation
import org.aiddl.core.scala.representation.{Num, Term}
/**
* An event that can fire during simulation
*/
trait SimulationEvent {
/**
* Check if the event is still possible. Used for events that can only occur a limited number of times.
* @return true
if the event can still occur, false
otherwise
*/
def possible: Boolean
/**
* Probability of the event occurring if it is applicable.
* @return probability 0 <= p <= 1
*/
def probability: Num
/**
* Check if the event can occur in the current state.
* @param state
* @return true
if the event conditions are met, false
otherwise
*/
def applicable(state: Term): Boolean
/**
* Apply the event to a state
* @param state the current state
* @return the new state
*/
def apply(state: Term): Term
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy