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
8e4c695c
Commit
8e4c695c
authored
Jun 07, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recv ACK after action
parent
1555899d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tensorpack/RL/simulator.py
tensorpack/RL/simulator.py
+3
-2
No files found.
tensorpack/RL/simulator.py
View file @
8e4c695c
...
@@ -59,6 +59,7 @@ class SimulatorProcess(multiprocessing.Process):
...
@@ -59,6 +59,7 @@ class SimulatorProcess(multiprocessing.Process):
action
=
loads
(
data
)
action
=
loads
(
data
)
reward
,
isOver
=
player
.
action
(
action
)
reward
,
isOver
=
player
.
action
(
action
)
c2s_socket
.
send
(
dumps
((
reward
,
isOver
)),
copy
=
False
)
c2s_socket
.
send
(
dumps
((
reward
,
isOver
)),
copy
=
False
)
noop
=
s2c_socket
.
recv
(
copy
=
False
)
#cnt += 1
#cnt += 1
#if cnt % 100 == 0:
#if cnt % 100 == 0:
#print_total_timer()
#print_total_timer()
...
@@ -122,9 +123,9 @@ class SimulatorMaster(threading.Thread):
...
@@ -122,9 +123,9 @@ class SimulatorMaster(threading.Thread):
reward
,
isOver
=
loads
(
msg
)
reward
,
isOver
=
loads
(
msg
)
client
.
memory
[
-
1
]
.
reward
=
reward
client
.
memory
[
-
1
]
.
reward
=
reward
if
isOver
:
if
isOver
:
self
.
_on_episode_over
(
cli
ent
)
self
.
_on_episode_over
(
id
ent
)
else
:
else
:
self
.
_on_datapoint
(
cli
ent
)
self
.
_on_datapoint
(
id
ent
)
@
abstractmethod
@
abstractmethod
def
_on_state
(
self
,
state
,
ident
):
def
_on_state
(
self
,
state
,
ident
):
...
...
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