def __init__(self, init_state_idx=None, init_state_idx_type='obs', policy_array=None, policy_idx_type='obs', p_diabetes=0.2):
    '\n        initialize the simulator\n        '
    assert ((p_diabetes >= 0) and (p_diabetes <= 1)), 'Invalid p_diabetes: {}'.format(p_diabetes)
    assert (policy_idx_type in ['obs', 'full', 'proj_obs'])
    if (policy_array is not None):
        assert (policy_array.shape[1] == Action.NUM_ACTIONS_TOTAL)
        if (policy_idx_type == 'obs'):
            assert (policy_array.shape[0] == State.NUM_OBS_STATES)
        elif (policy_idx_type == 'full'):
            assert (policy_array.shape[0] == (State.NUM_HID_STATES * State.NUM_OBS_STATES))
        elif (policy_idx_type == 'proj_obs'):
            assert (policy_array.shape[0] == State.NUM_PROJ_OBS_STATES)
    self.p_diabetes = p_diabetes
    self.state = None
    self.state = self.get_new_state(init_state_idx, init_state_idx_type)
    self.policy_array = policy_array
    self.policy_idx_type = policy_idx_type
initialize the simulator
def __init__(self, init_state_idx=None, init_state_idx_type='obs', policy_array=None, policy_idx_type='obs', p_diabetes=0.2):
    '\n        \n        '
    assert ((p_diabetes >= 0) and (p_diabetes <= 1)), 'Invalid p_diabetes: {}'.format(p_diabetes)
    assert (policy_idx_type in ['obs', 'full', 'proj_obs'])
    if (policy_array is not None):
        assert (policy_array.shape[1] == Action.NUM_ACTIONS_TOTAL)
        if (policy_idx_type == 'obs'):
            assert (policy_array.shape[0] == State.NUM_OBS_STATES)
        elif (policy_idx_type == 'full'):
            assert (policy_array.shape[0] == (State.NUM_HID_STATES * State.NUM_OBS_STATES))
        elif (policy_idx_type == 'proj_obs'):
            assert (policy_array.shape[0] == State.NUM_PROJ_OBS_STATES)
    self.p_diabetes = p_diabetes
    self.state = None
    self.state = self.get_new_state(init_state_idx, init_state_idx_type)
    self.policy_array = policy_array
    self.policy_idx_type = policy_idx_type