DecisionManager

model.managers.DecisionManager
case class DecisionManager[A <: Bankroll[A] & BoredomFrustration[A] & CustomerState[A] & HasBetStrategy[A] & Entity & StatusProfile](games: List[Game]) extends BaseManager[Seq[A]]

Manages the decision-making process for customer entities within the casino simulation.

This manager utilizes a configurable Decision Tree to determine customer actions based on their current state, risk profile, and game outcomes. It aims to provide realistic and complex AI behavior.

Type parameters

A

The type of customer entity this manager processes. It must possess Bankroll, BoredomFrustration, CustomerState, HasBetStrategy, Entity, and StatusProfile capabilities.

Value parameters

games

A list of all available games in the casino, used to access game states.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait BaseManager[Seq[A]]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

case class ChangeStrategy(newStrategy: BettingStrategy[A]) extends CustomerDecision

Decision: Change the current betting strategy to a new one.

Decision: Change the current betting strategy to a new one.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ConfigLoader

Object responsible for loading the configuration rules. Currently loads from DefaultConfig but can be extended to load from external sources.

Object responsible for loading the configuration rules. Currently loads from DefaultConfig but can be extended to load from external sources.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class ContinuePlaying() extends CustomerDecision

Decision: Continue playing the current game.

Decision: Continue playing the current game.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait CustomerDecision

Sealed trait defining the possible decisions a customer can make.

Sealed trait defining the possible decisions a customer can make.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class LeaveCasino
class Stay
class StopPlaying
class WaitForGame
Show all
object DefaultConfig

Object containing the default predefined set of SwitchRules. This is the base configuration for customer decision logic.

Object containing the default predefined set of SwitchRules. This is the base configuration for customer decision logic.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class LeaveCasino() extends CustomerDecision

Decision: Leave the casino entirely.

Decision: Leave the casino entirely.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Stay() extends CustomerDecision

Decision: Stay idle in the casino (e.g., wait for a game).

Decision: Stay idle in the casino (e.g., wait for a game).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class StopPlaying() extends CustomerDecision

Decision: Stop playing the current game (transition to Idle).

Decision: Stop playing the current game (transition to Idle).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SwitchRule(profile: RiskProfile, game: GameType, strategy: BetStratType, trigger: Trigger[A], nextStrategy: BetStratType, betPercentage: Double)

Defines a single rule for switching betting strategies or influencing customer decisions. These rules are evaluated by the Decision Tree.

Defines a single rule for switching betting strategies or influencing customer decisions. These rules are evaluated by the Decision Tree.

Value parameters

betPercentage

The percentage of the customer's bankroll to use for the new bet amount.

game

The specific GameType to which this rule applies.

nextStrategy

The BetStratType to switch to if the rule activates.

profile

The RiskProfile to which this rule applies.

strategy

The current BetStratType of the customer for this rule to be active.

trigger

A TriggerDSL condition that must be met for the rule to activate.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class WaitForGame() extends CustomerDecision

Decision: Wait for a game ( when a game is not yet ready to play).

Decision: Wait for a game ( when a game is not yet ready to play).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

override def update(customers: Seq[A]): Seq[A]

Updates a sequence of customer entities based on their individual decisions. For each customer, a decision tree is evaluated, and the customer's state is updated accordingly. This method returns a new sequence of customers, potentially with some customers filtered out if they decide to leave the casino.

Updates a sequence of customer entities based on their individual decisions. For each customer, a decision tree is evaluated, and the customer's state is updated accordingly. This method returns a new sequence of customers, potentially with some customers filtered out if they decide to leave the casino.

Value parameters

customers

The sequence of customer entities to update.

Attributes

Returns

A new sequence of updated customer entities.

Definition Classes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val rulesByProfile: Map[RiskProfile, List[SwitchRule]]

Lazily evaluated map of rules, grouped by RiskProfile for efficient lookup.

Lazily evaluated map of rules, grouped by RiskProfile for efficient lookup.

Attributes