Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
d0cb0ede
Commit
d0cb0ede
authored
Nov 15, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DQN] better dqn params
parent
b7f10ccf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/DeepQNetwork/DQN.py
examples/DeepQNetwork/DQN.py
+1
-1
examples/DeepQNetwork/common.py
examples/DeepQNetwork/common.py
+1
-1
No files found.
examples/DeepQNetwork/DQN.py
View file @
d0cb0ede
...
@@ -38,7 +38,7 @@ METHOD = None
...
@@ -38,7 +38,7 @@ METHOD = None
def
get_player
(
viz
=
False
,
train
=
False
):
def
get_player
(
viz
=
False
,
train
=
False
):
env
=
AtariPlayer
(
ROM_FILE
,
frame_skip
=
ACTION_REPEAT
,
viz
=
viz
,
env
=
AtariPlayer
(
ROM_FILE
,
frame_skip
=
ACTION_REPEAT
,
viz
=
viz
,
live_lost_as_eoe
=
train
,
max_num_frames
=
3
0000
)
live_lost_as_eoe
=
train
,
max_num_frames
=
6
0000
)
env
=
FireResetEnv
(
env
)
env
=
FireResetEnv
(
env
)
env
=
MapState
(
env
,
lambda
im
:
cv2
.
resize
(
im
,
IMAGE_SIZE
))
env
=
MapState
(
env
,
lambda
im
:
cv2
.
resize
(
im
,
IMAGE_SIZE
))
if
not
train
:
if
not
train
:
...
...
examples/DeepQNetwork/common.py
View file @
d0cb0ede
...
@@ -21,7 +21,7 @@ def play_one_episode(env, func, render=False):
...
@@ -21,7 +21,7 @@ def play_one_episode(env, func, render=False):
Map from observation to action, with 0.001 greedy.
Map from observation to action, with 0.001 greedy.
"""
"""
act
=
func
(
s
[
None
,
:,
:,
:])[
0
][
0
]
.
argmax
()
act
=
func
(
s
[
None
,
:,
:,
:])[
0
][
0
]
.
argmax
()
if
random
.
random
()
<
0.0
0
1
:
if
random
.
random
()
<
0.01
:
spc
=
env
.
action_space
spc
=
env
.
action_space
act
=
spc
.
sample
()
act
=
spc
.
sample
()
return
act
return
act
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment