Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ output. You can plot the progress by executing `plot_results.py`:
`$ python plot_results.py breakout_05-28-17-09_0p00025_0p99/results.csv`

After training completes, you can watch the network play using the
`ale_run_watch.py` script:
`ale_run_watch.py` script. REMEMBER to select the network you used (nips or nature):

`$ python ale_run_watch.py breakout_05-28-17-09_0p00025_0p99/network_file_99.pkl`
`$ python ale_run_watch.py nips breakout_05-28-17-09_0p00025_0p99/network_file_99.pkl`

`$ python ale_run_watch.py nature breakout_05-28-17-09_0p00025_0p99/network_file_99.pkl`

# Performance Tuning

Expand Down
16 changes: 12 additions & 4 deletions deep_q_rl/ale_run_watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
import sys

def run_watch():
command = ['./run_nature.py', '--steps-per-epoch', '0',
'--test-length', '10000', '--nn-file', sys.argv[1],
if sys.argv[1] == 'nips':
script = './run_nips.py'
elif sys.argv[1] == 'nature':
script = './run_nature.py'
else:
print 'Usage: python ale_run_watch.py NETWORK_THAT_YOU_TRAINED(nips/nature) NETWORK_PKL_FILE [ ROM ]'
exit(0)

command = [script, '--steps-per-epoch', '0',
'--test-length', '10000', '--nn-file', sys.argv[2],
'--display-screen']

if len(sys.argv) > 2:
command.extend(['--rom', sys.argv[2]])
if len(sys.argv) > 3:
command.extend(['--rom', sys.argv[3]])

p1 = subprocess.Popen(command)

Expand Down