コード例 #1
0
ファイル: reinforce.py プロジェクト: UserAB1236872/abp
class ReinforceConfig(BaseConfig):
    """Configurations related to reinfocement learning"""
    def __init__(self, config=None):
        super(ReinforceConfig,
              self).__init__(config, default_config=default_reinforce_config)

    #TODO Can use python feature to generate these properties? Manual Labour for now -_-

    decay_steps = property(BaseConfig.get_property("decay_steps"),
                           BaseConfig.set_property("decay_steps"))

    starting_epsilon = property(BaseConfig.get_property("starting_epsilon"),
                                BaseConfig.set_property("starting_epsilon"))

    decay_rate = property(BaseConfig.get_property("decay_rate"),
                          BaseConfig.set_property("decay_rate"))

    discount_factor = property(BaseConfig.get_property("discount_factor"),
                               BaseConfig.set_property("discount_factor"))

    batch_size = property(BaseConfig.get_property("batch_size"),
                          BaseConfig.set_property("batch_size"))

    memory_size = property(BaseConfig.get_property("memory_size"),
                           BaseConfig.set_property("memory_size"))

    summaries_path = property(BaseConfig.get_property("summaries_path"),
                              BaseConfig.set_property("summaries_path"))

    update_frequency = property(BaseConfig.get_property("update_frequency"),
                                BaseConfig.set_property("update_frequency"))
コード例 #2
0
ファイル: evaluation.py プロジェクト: UserAB1236872/abp
class EvaluationConfig(BaseConfig):
    """ Everything related to evaluations """
    def __init__(self, config=None):
        super(EvaluationConfig,
              self).__init__(config=config,
                             default_config=default_evaluation_config)

    name = property(BaseConfig.get_property("name"),
                    BaseConfig.set_property("name"))

    env = property(BaseConfig.get_property("env"),
                   BaseConfig.set_property("env"))

    summaries_path = property(BaseConfig.get_property("summaries_path"),
                              BaseConfig.set_property("summaries_path"))

    training_episodes = property(BaseConfig.get_property("training_episodes"),
                                 BaseConfig.set_property("training_episodes"))

    test_episodes = property(BaseConfig.get_property("test_episodes"),
                             BaseConfig.set_property("test_episodes"))

    render = property(BaseConfig.get_property("render"),
                      BaseConfig.set_property("render"))

    contrastive = property(BaseConfig.get_property("contrastive"),
                           BaseConfig.set_property("contrastive"))

    sleep = property(BaseConfig.get_property("sleep"),
                     BaseConfig.set_property("sleep"))
コード例 #3
0
class ReinforceConfig(BaseConfig):
    """Configurations related to reinfocement learning"""
    def __init__(self, config=None):
        super(ReinforceConfig,
              self).__init__(config, default_config=default_reinforce_config)

    # TODO Can use python feature to generate these properties? Manual Labour for now -_-

    epsilon_timesteps = property(BaseConfig.get_property("epsilon_timesteps"),
                                 BaseConfig.set_property("epsilon_timesteps"))

    starting_epsilon = property(BaseConfig.get_property("starting_epsilon"),
                                BaseConfig.set_property("starting_epsilon"))

    final_epsilon = property(BaseConfig.get_property("final_epsilon"),
                             BaseConfig.set_property("final_epsilon"))

    discount_factor = property(BaseConfig.get_property("discount_factor"),
                               BaseConfig.set_property("discount_factor"))

    batch_size = property(BaseConfig.get_property("batch_size"),
                          BaseConfig.set_property("batch_size"))

    memory_size = property(BaseConfig.get_property("memory_size"),
                           BaseConfig.set_property("memory_size"))

    summaries_path = property(BaseConfig.get_property("summaries_path"),
                              BaseConfig.set_property("summaries_path"))

    replace_frequency = property(BaseConfig.get_property("replace_frequency"),
                                 BaseConfig.set_property("replace_frequency"))

    update_steps = property(BaseConfig.get_property("update_steps"),
                            BaseConfig.set_property("update_steps"))

    update_start = property(BaseConfig.get_property("update_start"),
                            BaseConfig.set_property("update_start"))

    beta_timesteps = property(BaseConfig.get_property("beta_timesteps"),
                              BaseConfig.set_property("beta_timesteps"))

    beta_initial = property(BaseConfig.get_property("beta_initial"),
                            BaseConfig.set_property("beta_initial"))

    beta_final = property(BaseConfig.get_property("beta_final"),
                          BaseConfig.set_property("beta_final"))

    decay_steps = property(BaseConfig.get_property("decay_steps"),
                           BaseConfig.set_property("decay_steps"))

    decay_rate = property(BaseConfig.get_property("decay_rate"),
                          BaseConfig.set_property("decay_rate"))

    use_prior_memory = property(BaseConfig.get_property("use_prior_memory"),
                                BaseConfig.set_property("use_prior_memory"))

    is_random_agent_1 = property(BaseConfig.get_property("is_random_agent_1"),
                                 BaseConfig.set_property("is_random_agent_1"))

    is_random_agent_2 = property(BaseConfig.get_property("is_random_agent_2"),
                                 BaseConfig.set_property("is_random_agent_2"))

    collecting_experience = property(
        BaseConfig.get_property("collecting_experience"),
        BaseConfig.set_property("collecting_experience"))

    is_use_sepcific_enemy = property(
        BaseConfig.get_property("is_use_sepcific_enemy"),
        BaseConfig.set_property("is_use_sepcific_enemy"))

    enemy_path = property(BaseConfig.get_property("enemy_path"),
                          BaseConfig.set_property("enemy_path"))
コード例 #4
0
class EvaluationConfig(BaseConfig):
    """ Everything related to evaluations """

    def __init__(self, config=None):
        super(EvaluationConfig, self).__init__(
            config=config, default_config=default_evaluation_config)

    name = property(BaseConfig.get_property("name"),
                    BaseConfig.set_property("name"))

    env = property(BaseConfig.get_property("env"),
                   BaseConfig.set_property("env"))

    summaries_path = property(BaseConfig.get_property("summaries_path"),
                              BaseConfig.set_property("summaries_path"))

    training_episodes = property(BaseConfig.get_property("training_episodes"),
                                 BaseConfig.set_property("training_episodes"))

    test_episodes = property(BaseConfig.get_property("test_episodes"),
                             BaseConfig.set_property("test_episodes"))

    render = property(BaseConfig.get_property("render"),
                      BaseConfig.set_property("render"))

    contrastive = property(BaseConfig.get_property("contrastive"),
                           BaseConfig.set_property("contrastive"))

    sleep = property(BaseConfig.get_property("sleep"),
                     BaseConfig.set_property("sleep"))

    generate_xai_replay = property(BaseConfig.get_property("generate_xai_replay"),
                     BaseConfig.set_property("generate_xai_replay"))

    xai_replay_dimension = property(BaseConfig.get_property("xai_replay_dimension"),
                     BaseConfig.set_property("xai_replay_dimension"))
    
    result_path = property(BaseConfig.get_property("result_path"),
                     BaseConfig.set_property("result_path"))
    
    explanation = property(BaseConfig.get_property("explanation"),
                     BaseConfig.set_property("explanation"))
    
    explanation_path = property(BaseConfig.get_property("explanation_path"),
                     BaseConfig.set_property("explanation_path"))

    is_state_pair_test_exp = property(BaseConfig.get_property("is_state_pair_test_exp"),
                     BaseConfig.set_property("is_state_pair_test_exp"))