1 Star 0 Fork 0

ysl/DQN-tensorflow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
config.py 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
Taehoon Kim 提交于 2016-06-29 08:57 . increase test step by 5
class AgentConfig(object):
scale = 10000
display = False
max_step = 5000 * scale
memory_size = 100 * scale
batch_size = 32
random_start = 30
cnn_format = 'NCHW'
discount = 0.99
target_q_update_step = 1 * scale
learning_rate = 0.00025
learning_rate_minimum = 0.00025
learning_rate_decay = 0.96
learning_rate_decay_step = 5 * scale
ep_end = 0.1
ep_start = 1.
ep_end_t = memory_size
history_length = 4
train_frequency = 4
learn_start = 5. * scale
min_delta = -1
max_delta = 1
double_q = False
dueling = False
_test_step = 5 * scale
_save_step = _test_step * 10
class EnvironmentConfig(object):
env_name = 'Breakout-v0'
screen_width = 84
screen_height = 84
max_reward = 1.
min_reward = -1.
class DQNConfig(AgentConfig, EnvironmentConfig):
model = ''
pass
class M1(DQNConfig):
backend = 'tf'
env_type = 'detail'
action_repeat = 1
def get_config(FLAGS):
if FLAGS.model == 'm1':
config = M1
elif FLAGS.model == 'm2':
config = M2
for k, v in FLAGS.__dict__['__flags'].items():
if k == 'gpu':
if v == False:
config.cnn_format = 'NHWC'
else:
config.cnn_format = 'NCHW'
if hasattr(config, k):
setattr(config, k, v)
return config
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/publiagent123/DQN-tensorflow.git
git@gitee.com:publiagent123/DQN-tensorflow.git
publiagent123
DQN-tensorflow
DQN-tensorflow
master

搜索帮助