def __init__(self, env_id, render=False, num_process=1, memory_size=1000000, explore_size=10000, step_per_iter=3000, lr_q=1e-3, gamma=0.99, polyak=0.995, batch_size=128, min_update_step=1000, epsilon=0.90, update_target_gap=50, seed=1, model_path=None): self.env_id = env_id self.render = render self.num_process = num_process self.memory = FixedMemory(size=memory_size) self.explore_size = explore_size self.step_per_iter = step_per_iter self.lr_q = lr_q self.gamma = gamma self.polyak = polyak self.batch_size = batch_size self.min_update_step = min_update_step self.update_target_gap = update_target_gap self.epsilon = epsilon self.seed = seed self.model_path = model_path self._init_model()
def __init__(self, env_id, render=False, num_process=1, memory_size=1000000, lr_p=1e-3, lr_v=1e-3, gamma=0.99, polyak=0.995, explore_size=10000, step_per_iter=3000, batch_size=100, min_update_step=1000, update_step=50, action_noise=0.1, seed=1, model_path=None): self.env_id = env_id self.gamma = gamma self.polyak = polyak self.memory = FixedMemory(memory_size) self.explore_size = explore_size self.step_per_iter = step_per_iter self.render = render self.num_process = num_process self.lr_p = lr_p self.lr_v = lr_v self.batch_size = batch_size self.min_update_step = min_update_step self.update_step = update_step self.action_noise = action_noise self.model_path = model_path self.seed = seed self._init_model()