Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 038f9f1

Browse files
committed
오타 수정
1 parent 7afca9a commit 038f9f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎10 - DQN/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
OBSERVE = 100
2222

2323
# action: 0: 좌, 1: 유지, 2: 우
24-
NUN_ACTION = 3
24+
NUM_ACTION = 3
2525
SCREEN_WIDTH = 6
2626
SCREEN_HEIGHT = 10
2727

@@ -31,7 +31,7 @@ def train():
3131
sess = tf.Session()
3232

3333
game = Game(SCREEN_WIDTH, SCREEN_HEIGHT, show_game=False)
34-
brain = DQN(sess, SCREEN_WIDTH, SCREEN_HEIGHT, NUN_ACTION)
34+
brain = DQN(sess, SCREEN_WIDTH, SCREEN_HEIGHT, NUM_ACTION)
3535

3636
rewards = tf.placeholder(tf.float32, [None])
3737
tf.summary.scalar('avg.reward/ep.', tf.reduce_mean(rewards))
@@ -68,7 +68,7 @@ def train():
6868
# 초반에는 거의 대부분 랜덤값을 사용하다가 점점 줄어들어
6969
# 나중에는 거의 사용하지 않게됩니다.
7070
if np.random.rand() < epsilon:
71-
action = random.randrange(NUN_ACTION)
71+
action = random.randrange(NUM_ACTION)
7272
else:
7373
action = brain.get_action()
7474

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /