December 2019
Intermediate to advanced
368 pages
11h 10m
English
This is the loop that we use to evaluate the previously created network graph over multiple games in parallel – the number of games that can be evaluated simultaneously is determined by the batch_size parameter.
The evaluation loop is defined in the _loop function and is implemented as follows:
running = np.zeros((self.batch_size,), dtype=np.bool)cumrews = np.zeros((self.batch_size, ), dtype=np.float32)cumlen = np.zeros((self.batch_size, ), dtype=np.int32)
while True: # nothing loaded, block if not any(running): ...
Read now
Unlock full access