condition#

class besser.agent.core.transition.condition.Condition(function)[source]#

Bases: object

The condition class.

A condition embeds a boolean function. An agent can define transitions from one state to another based on the fulfillment of a condition.

Parameters:

function (Callable[[Session], bool]) – the condition function. It takes the user session as parameter.

function#

the condition function. It takes the user session as parameter.

Type:

Callable[[Session], bool]

class besser.agent.core.transition.condition.Conjunction(cond1, cond2)[source]#

Bases: Condition

A conjunction is the union of 2 conditions. A conjunction condition is fulfilled when the 2 conditions are fulfilled.

Parameters:
  • cond1 (Condition) – the first condition of the conjunction

  • cond2 (Condition) – the second condition of the conjunction

log#

the log message of the conjunction condition

Type:

str