-
Notifications
You must be signed in to change notification settings - Fork 0
/
q_learner.ps1
19 lines (18 loc) · 1.32 KB
/
q_learner.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# launch qlearn
# $qlearn = Start-Process -FilePath "C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py" -PassThru
# $qlearn = python C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py
# $qlearn = Start-Process python -FilePath "C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py" -PassThru
$qlearn = Start-Process "C:\Users\gamev\anaconda3\envs\ROAR_major\python.exe" -ArgumentList "C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py" -PassThru
$qlearn = $qlearn | Get-Process
# infinite loop (Ctrl + C to stop script)
while ($True) {
Start-Sleep -Seconds 5 # wait 5 seconds
if ($qlearn.HasExited) { # if qlearn process is closed
# restart qlearn
# $qlearn = Start-Process -FilePath "C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py" -PassThru
# $qlearn = python C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py
# $qlearn = Start-Process python -FilePath "C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py" -PassThru
$qlearn = Start-Process "C:\Users\gamev\anaconda3\envs\ROAR_major\python.exe" -ArgumentList "C:\Users\gamev\Desktop\ROAR_Folders\Summer2022\ROAR_qlearning\q_learn.py" -PassThru
$qlearn = $qlearn | Get-Process
}
}