Exemple #1
0
    config.lwf = args.lwf

    config.lwf_loss = args.lwf_loss

    config.lwf_weight = args.lwf_weight

    config.num_old_actions = int(args.num_old_actions)

    return config

def print_config(config):
    print 'Current config:\n'
    variables = zip(vars(config).keys(), vars(config).values())
    for var, val in sorted(variables):
        print var + ' = ' + str(val)


if __name__ == '__main__':
    args = parse_args()
    my_config = modify_config(args)
    print_config(my_config)
    with tf.device('/gpu:' + str(args.gpu)):
        # make env
        env = gym.make(my_config.env_name)
        env = wrap_dqn(env)
        model = NatureQN(env, my_config)
        model.initialize_eval()
        model.evaluate()
        if my_config.record:
            model.record()
Exemple #2
0
If so, please report your hyperparameters.

You'll find the results, log and video recordings of your agent every 250k under
the corresponding file in the results folder. A good way to monitor the progress
of the training is to use Tensorboard. The starter code writes summaries of different
variables.

To launch tensorboard, open a Terminal window and run 
tensorboard --logdir=results/
Then, connect remotely to 
address-ip-of-the-server:6006 
6006 is the default port used by tensorboard.
"""
if __name__ == '__main__':
    # make env
    env = gym.make(config.env_name)
    env = MaxAndSkipEnv(env, skip=config.skip_frame)
    env = PreproWrapper(env,
                        prepro=greyscale,
                        shape=(80, 80, 1),
                        overwrite_render=config.overwrite_render)

    # load model
    model = NatureQN(env, config)
    model.initialize()
    loaded = load_model(model)
    assert loaded != False, "Loading failed"

    # evaluate one episode of data
    model.evaluate(env, 1)