Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
donghaiwang committed Aug 20, 2018
1 parent d196e07 commit c58e5c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DQN-tensorflow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AgentConfig(object):
memory_size = 60 * scale # 内存大小(原来是:100*scale)

batch_size = 32
random_start = 30
random_start = 30 # 0-29个游戏(随机选择)
cnn_format = 'NCHW' # GPU的输入图片格式
discount = 0.99 # 折扣因子
target_q_update_step = 1 * scale # 目标Q值更新的频率
Expand Down
2 changes: 1 addition & 1 deletion DQN-tensorflow/dqn/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _random_step(self):
action = self.env.action_space.sample()
self._step(action)

@ property
@ property # 该属性很可能不是直接暴露的,而是通过getter和setter方法来实现的
def screen(self):
return imresize(rgb2gray(self._screen)/255., self.dims) # utils.py里的工具函数
#return cv2.resize(cv2.cvtColor(self._screen, cv2.COLOR_BGR2YCR_CB)/255., self.dims)[:,:,0]
Expand Down

0 comments on commit c58e5c6

Please sign in to comment.