forked from martius-lab/hockey-env
-
Notifications
You must be signed in to change notification settings - Fork 1
/
remoteTD3.py
executable file
·37 lines (28 loc) · 1.32 KB
/
remoteTD3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import numpy as np
from TD3 import agent
from client.remoteControllerInterface import RemoteControllerInterface
from client.backend.client import Client
class RemoteTD3(agent.TD3, RemoteControllerInterface):
def __init__(self, pretrained='superagent'):
agent.TD3.__init__(self, pretrained=pretrained)
RemoteControllerInterface.__init__(self, identifier='StillTrying-TD3')
def remote_act(self,
obs : np.ndarray,
) -> np.ndarray:
return self.act(obs)
if __name__ == '__main__':
controller = RemoteTD3()
# Play n (None for an infinite amount) games and quit
client = Client(username='Fynn_Bachmann_StillTrying', # Testuser
password="W@7c'M{Z",
controller=controller,
output_path='client/user0', # rollout buffer with finished games will be saved in here
interactive=True,
op='start_queuing',
num_games=None)
# Start interactive mode. Start playing by typing start_queuing. Stop playing by pressing escape and typing stop_queuing
# client = Client(username='user0',
# password='1234',
# controller=controller,
# output_path='/tmp/ALRL2020/client/user0',
# )