<reponame>linklab/link_rl
import math

from codes.a_config._rl_parameters.off_policy.parameter_ddpg import PARAMETERS_DDPG
from codes.e_utils.names import *
from codes.a_config.parameters_general import PARAMETERS_GENERAL


class PARAMETERS_QUANSER_RIP_DDPG(PARAMETERS_GENERAL, PARAMETERS_DDPG):
    ENVIRONMENT_ID = EnvironmentName.QUANSER_SERVO_2
    RL_ALGORITHM = RLAlgorithmName.DDPG_V0
    DEEP_LEARNING_MODEL = DeepLearningModelName.CONTINUOUS_DETERMINISTIC_ACTOR_CRITIC_MLP

    VELOCITY_STATE_DENOMINATOR = 100.0

    TRAIN_STOP_EPISODE_REWARD = 7000  # MAX: 3.14 * 10000 = 31400
    TRAIN_STOP_EPISODE_REWARD_STD = 50.0
    STOP_PATIENCE_COUNT = 10
    REPLAY_BUFFER_SIZE = 1000000

    MAX_EPISODE_STEP_AT_PLAY = 10000000000
    MAX_EPISODE_STEP = 10000
    MAX_GLOBAL_STEP = 10000000
    LEARNING_RATE = 0.001
    ACTOR_LEARNING_RATE = 0.0002
    TRAIN_STEP_FREQ = 1
    GAMMA = 0.99

    BATCH_SIZE = 128
    AVG_EPISODE_SIZE_FOR_STAT = 50

    N_STEP = 2
    OMEGA = False
    PER_PROPORTIONAL = False
    PER_RANK_BASED = False

    ACTION_SCALE = 250.0

    TEST_NUM_EPISODES = 3

    NUM_TRAIN_ONLY_AFTER_EPISODE = 100

    UNIT_TIME = 0.006

    VERBOSE_TO_LOG = False




import math

from codes.a_config._rl_parameters.off_policy.parameter_ddpg import PARAMETERS_DDPG
from codes.e_utils.names import *
from codes.a_config.parameters_general import PARAMETERS_GENERAL


class PARAMETERS_QUANSER_RIP_DDPG(PARAMETERS_GENERAL, PARAMETERS_DDPG):
    ENVIRONMENT_ID = EnvironmentName.QUANSER_SERVO_2
    RL_ALGORITHM = RLAlgorithmName.DDPG_V0
    DEEP_LEARNING_MODEL = DeepLearningModelName.CONTINUOUS_DETERMINISTIC_ACTOR_CRITIC_MLP

    VELOCITY_STATE_DENOMINATOR = 100.0

    TRAIN_STOP_EPISODE_REWARD = 7000  # MAX: 3.14 * 10000 = 31400
    TRAIN_STOP_EPISODE_REWARD_STD = 50.0
    STOP_PATIENCE_COUNT = 10
    REPLAY_BUFFER_SIZE = 1000000

    MAX_EPISODE_STEP_AT_PLAY = 10000000000
    MAX_EPISODE_STEP = 10000
    MAX_GLOBAL_STEP = 10000000
    LEARNING_RATE = 0.001
    ACTOR_LEARNING_RATE = 0.0002
    TRAIN_STEP_FREQ = 1
    GAMMA = 0.99

    BATCH_SIZE = 128
    AVG_EPISODE_SIZE_FOR_STAT = 50

    N_STEP = 2
    OMEGA = False
    PER_PROPORTIONAL = False
    PER_RANK_BASED = False

    ACTION_SCALE = 250.0

    TEST_NUM_EPISODES = 3

    NUM_TRAIN_ONLY_AFTER_EPISODE = 100

    UNIT_TIME = 0.006

    VERBOSE_TO_LOG = False
# MAX: 3.14 * 10000 = 31400