[RLlib] Unity3D integration (n Unity3D clients vs learning server). (#8590)

This commit is contained in:
Sven Mika
2020-05-30 22:48:34 +02:00
committed by GitHub
parent 016337d4eb
commit d8a081a185
31 changed files with 870 additions and 191 deletions
+7 -5
View File
@@ -2,10 +2,10 @@ import collections
import logging
import numpy as np
from ray.util.debug import log_once
from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch
from ray.rllib.utils.annotations import PublicAPI, DeveloperAPI
from ray.rllib.utils.debug import summarize
from ray.util.debug import log_once
logger = logging.getLogger(__name__)
@@ -124,8 +124,9 @@ class MultiAgentSampleBatchBuilder:
This pushes the postprocessed per-agent batches onto the per-policy
builders, clearing per-agent state.
Arguments:
episode: current MultiAgentEpisode object or None
Args:
episode (Optional[MultiAgentEpisode]): Current MultiAgentEpisode
object.
"""
# Materialize the batches so far
@@ -198,8 +199,9 @@ class MultiAgentSampleBatchBuilder:
Any unprocessed rows will be first postprocessed with a policy
postprocessor. The internal state of this builder will be reset.
Arguments:
episode: current MultiAgentEpisode object or None
Args:
episode (Optional[MultiAgentEpisode]): Current MultiAgentEpisode
object.
"""
self.postprocess_batch_so_far(episode)