How to use the openai.deepq.deepq.learn function in openai

To help you get started, we’ve selected a few openai examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github niksaz / dota2-expert-demo / openai / train.py View on Github external
dueling=True)
    alg_kwargs.update(extra_args)
    if args.network:
        alg_kwargs['network'] = args.network
    else:
        if alg_kwargs.get('network') is None:
            alg_kwargs['network'] = get_default_network(env_type)
    print('Training {} on {}:{} with arguments \n{}'.format(args.alg, env_type, env_id, alg_kwargs))

    with open(args.config, 'r') as finput:
        config = json.load(finput)
    config['max_timesteps_to_shape'] += alg_kwargs['total_timesteps']
    print('Algorithm config is {}'.format(config))

    seed = args.seed
    learn(seed=seed, config=config, **alg_kwargs)