colosseum.agent.mdp_models.bayesian_models

The module containing some implementations of Bayesian models.

 1"""
 2The module containing some implementations of Bayesian models.
 3"""
 4
 5from enum import IntEnum
 6
 7import gin
 8
 9from colosseum.agent.mdp_models.bayesian_models.base_conjugate import ConjugateModel
10from colosseum.agent.mdp_models.bayesian_models.conjugate_rewards import N_N, N_NIG
11from colosseum.agent.mdp_models.bayesian_models.conjugate_transitions import M_DIR
12
13
14@gin.constants_from_enum
15class RewardsConjugateModel(IntEnum):
16    """
17    An enumeration of the available rewards conjugate models.
18    """
19
20    N_NIG = 0
21    N_N = 1
22
23    def get_class(self):
24        if self == self.N_NIG:
25            return N_NIG
26        if self == self.N_N:
27            return N_N
28
29
30@gin.constants_from_enum
31class TransitionsConjugateModel(IntEnum):
32    """
33    An enumeration of the available transition conjugate models.
34    """
35
36    M_DIR = 0
37
38    def get_class(self):
39        if self == self.M_DIR:
40            return M_DIR
@gin.constants_from_enum
class RewardsConjugateModel(enum.IntEnum):
15@gin.constants_from_enum
16class RewardsConjugateModel(IntEnum):
17    """
18    An enumeration of the available rewards conjugate models.
19    """
20
21    N_NIG = 0
22    N_N = 1
23
24    def get_class(self):
25        if self == self.N_NIG:
26            return N_NIG
27        if self == self.N_N:
28            return N_N

An enumeration of the available rewards conjugate models.

def get_class(self):
24    def get_class(self):
25        if self == self.N_NIG:
26            return N_NIG
27        if self == self.N_N:
28            return N_N
Inherited Members
enum.Enum
name
value
builtins.int
conjugate
bit_length
to_bytes
from_bytes
as_integer_ratio
real
imag
numerator
denominator
@gin.constants_from_enum
class TransitionsConjugateModel(enum.IntEnum):
31@gin.constants_from_enum
32class TransitionsConjugateModel(IntEnum):
33    """
34    An enumeration of the available transition conjugate models.
35    """
36
37    M_DIR = 0
38
39    def get_class(self):
40        if self == self.M_DIR:
41            return M_DIR

An enumeration of the available transition conjugate models.

def get_class(self):
39    def get_class(self):
40        if self == self.M_DIR:
41            return M_DIR
Inherited Members
enum.Enum
name
value
builtins.int
conjugate
bit_length
to_bytes
from_bytes
as_integer_ratio
real
imag
numerator
denominator