Esempio n. 1
0
def train_double_dqn(env, num_actions):
    results_dir = './results/double_dqn/' + game

    training_epsilon = 0.01
    test_epsilon = 0.001

    frame_history = 1
    dqn = atari_dqn.AtariDQN(frame_history, num_actions)
    agent = dq_learner_pc.DQLearner(dqn,
                                    num_actions,
                                    frame_history=frame_history,
                                    epsilon_end=training_epsilon)

    train(agent, env, test_epsilon, results_dir)
Esempio n. 2
0
def train_dqn(env, num_actions):
    results_dir = './results/dqn/' + game

    training_epsilon = 0.1
    test_epsilon = 0.05

    frame_history = 1
    dqn = atari_dqn.AtariDQN(frame_history, num_actions, shared_bias=False)
    agent = dq_learner_pc.DQLearner(dqn,
                                    num_actions,
                                    target_copy_freq=10000,
                                    epsilon_end=training_epsilon,
                                    double=False,
                                    frame_history=frame_history)
    train(agent, env, test_epsilon, results_dir)
Esempio n. 3
0
def train_double_dqn(env, num_actions):
    results_dir = './results/double_dqn/' + game

    training_epsilon = 0.01
    test_epsilon = 0.001

    frame_history = 4
    cts_size = (42, 42, 8)
    enc_func = atari_encoder.encode_state

    dqn = atari_dqn.AtariDQN(frame_history, num_actions)
    agent = dq_learner_pc.DQLearner(dqn,
                                    num_actions,
                                    frame_history=frame_history,
                                    epsilon_end=training_epsilon,
                                    state_encoder=enc_func,
                                    cts_size=cts_size)

    train(agent, env, test_epsilon, results_dir, max_episode_steps=None)
Esempio n. 4
0
def train_dqn(env, num_actions):
    results_dir = './results/dqn/' + game

    training_epsilon = 0.1
    test_epsilon = 0.05

    frame_history = 4
    cts_size = (42, 42, 8)
    enc_func = atari_encoder.encode_state

    dqn = atari_dqn.AtariDQN(frame_history, num_actions, shared_bias=False)
    agent = dq_learner_pc.DQLearner(dqn,
                                    num_actions,
                                    target_copy_freq=10000,
                                    epsilon_end=training_epsilon,
                                    double=False,
                                    frame_history=frame_history,
                                    state_encoder=enc_func,
                                    cts_size=cts_size)
    train(agent, env, test_epsilon, results_dir, max_episode_steps=None)