浏览代码
Develop communicator redesign (#638)
Develop communicator redesign (#638)
* [containers] Enables container support for scenes that use visual observations * [Initial Commit] Works only with simple balance ball * [Optimiztion] Store the academy in the brainBatcher as a temporary measure * [Modifications] Made it work from the editor as a prototype * [Made socket communicator and reimplmented all functionalities] * [Forgotten file] removed .meta file * [Forgot the meta file] * [Metafile] deleted metafile * [Comments] Removed dead code * [Comments] Added some descriptions * [Bug Fix] Multi brain scenario * [improved AgentInfo converter] * [Optimization] Remove VectorObs since StackedVectorObs is present in the AgentInfo protobuf object * [Timeout] Implemented a timeout for the rpc communicator in Unity * [Libraries] Added the C# Protobuf and Grpc libraries * [Requirements] Added protobuf 3.5.2 to the requirements * [Code Formating] Removed dead code and split some lines .../develop-generalizationTraining-TrainerController
GitHub
7 年前
当前提交
7914387f
共有 125 个文件被更改,包括 12187 次插入 和 800 次删除
-
2.gitattributes
-
3Dockerfile
-
1python/learn.py
-
2python/requirements.txt
-
122python/tests/test_bc.py
-
125python/tests/test_ppo.py
-
218python/tests/test_unityagents.py
-
105python/tests/test_unitytrainers.py
-
538python/unityagents/environment.py
-
21python/unitytrainers/trainer_controller.py
-
163unity-environment/Assets/ML-Agents/Scripts/Academy.cs
-
2unity-environment/Assets/ML-Agents/Scripts/Agent.cs
-
6unity-environment/Assets/ML-Agents/Scripts/Brain.cs
-
122unity-environment/Assets/ML-Agents/Scripts/Communicator.cs
-
2unity-environment/Assets/ML-Agents/Scripts/CoreBrain.cs
-
20unity-environment/Assets/ML-Agents/Scripts/CoreBrainExternal.cs
-
18unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs
-
20unity-environment/Assets/ML-Agents/Scripts/CoreBrainInternal.cs
-
23unity-environment/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs
-
2unity-environment/Assets/ML-Agents/Scripts/UnityAgentsException.cs
-
89python/tests/mock_communicator.py
-
37python/unityagents/communicator.py
-
97python/unityagents/rpc_communicator.py
-
98python/unityagents/socket_communicator.py
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer.meta
-
352unity-environment/Assets/ML-Agents/Scripts/Batcher.cs
-
13unity-environment/Assets/ML-Agents/Scripts/Batcher.cs.meta
-
8unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects.meta
-
149unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs
-
13unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs.meta
-
166unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs
-
13unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs.meta
-
19python/communicator_objects/__init__.py
-
85python/communicator_objects/agent_action_proto_pb2.py
-
134python/communicator_objects/agent_info_proto_pb2.py
-
135python/communicator_objects/brain_parameters_proto_pb2.py
-
71python/communicator_objects/brain_type_proto_pb2.py
-
64python/communicator_objects/command_proto_pb2.py
-
106python/communicator_objects/engine_configuration_proto_pb2.py
-
120python/communicator_objects/environment_parameters_proto_pb2.py
-
78python/communicator_objects/header_pb2.py
-
85python/communicator_objects/resolution_proto_pb2.py
-
61python/communicator_objects/space_type_proto_pb2.py
-
90python/communicator_objects/unity_input_pb2.py
-
92python/communicator_objects/unity_message_pb2.py
-
90python/communicator_objects/unity_output_pb2.py
-
71python/communicator_objects/unity_rl_initialization_input_pb2.py
-
104python/communicator_objects/unity_rl_initialization_output_pb2.py
-
188python/communicator_objects/unity_rl_input_pb2.py
-
170python/communicator_objects/unity_rl_output_pb2.py
-
58python/communicator_objects/unity_to_external_pb2.py
-
46python/communicator_objects/unity_to_external_pb2_grpc.py
-
1001unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll
-
30unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll.meta
-
1001unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll
-
30unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll.meta
-
1001unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll
-
32unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native.meta
-
102unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so.meta
-
102unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native.meta
-
1001unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
-
106unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win.meta
-
10unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native.meta
-
1001unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll
-
102unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll.meta
-
1001unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll
-
102unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll.meta
-
217unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta
-
402unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta
-
394unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta
-
52unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta
-
49unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta
-
316unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta
-
169unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs
-
11unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta
-
202unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using MLAgents.CommunicatorObjects; |
|||
/** \brief AcademyParameters is a structure containing basic information about the |
|||
* training environment. */ |
|||
/** The AcademyParameters will be sent via socket at the start of the Environment. |
|||
* This structure does not need to be modified. |
|||
*/ |
|||
public struct AcademyParameters |
|||
namespace MLAgents |
|||
/**< \brief The name of the Academy. If the communicator is External, |
|||
* it will be the name of the Academy GameObject */ |
|||
public string AcademyName; |
|||
public struct CommunicatorParameters |
|||
{ |
|||
public int port; |
|||
} |
|||
/**< \brief The API number for the communicator. */ |
|||
public string apiNumber; |
|||
|
|||
/**< \brief The location of the logfile*/ |
|||
public string logPath; |
|||
/** |
|||
This is the interface of the Communicators. |
|||
This does not need to be modified nor implemented to create a Unity environment. |
|||
/**< \brief The default reset parameters are sent via socket*/ |
|||
public Dictionary<string, float> resetParameters; |
|||
|
|||
/**< \brief A list of the all the brains names sent via socket*/ |
|||
public List<string> brainNames; |
|||
|
|||
/**< \brief A list of the External brains parameters sent via socket*/ |
|||
public List<BrainParameters> brainParameters; |
|||
|
|||
/**< \brief A list of the External brains names sent via socket*/ |
|||
public List<string> externalBrainNames; |
|||
} |
|||
|
|||
public enum ExternalCommand |
|||
{ |
|||
STEP, |
|||
RESET, |
|||
QUIT |
|||
} |
|||
|
|||
/** |
|||
* This is the interface used to generate coordinators. |
|||
* This does not need to be modified nor implemented to create a |
|||
* Unity environment. |
|||
*/ |
|||
public interface Communicator |
|||
{ |
|||
|
|||
/// Implement this method to allow brains to subscribe to the
|
|||
/// decisions made outside of Unity
|
|||
void SubscribeBrain(Brain brain); |
|||
|
|||
/// First contact between Communicator and external process
|
|||
bool CommunicatorHandShake(); |
|||
|
|||
/// Implement this method to initialize the communicator
|
|||
void InitializeCommunicator(); |
|||
When the Unity Communicator is initialized, it will wait for the External Communicator |
|||
to be initialized as well. The two communicators will then exchange their first messages |
|||
that will usually contain information for initialization (information that does not need |
|||
to be resent at each new exchange). |
|||
/// Implement this method to receive actions from outside of Unity and
|
|||
/// update the actions of the brains that subscribe
|
|||
void UpdateActions(); |
|||
By convention a Unity input is from External to Unity and a Unity output is from Unity to |
|||
External. Inputs and outputs are relative to Unity. |
|||
/// Implement this method to return the ExternalCommand that
|
|||
/// was given outside of Unity
|
|||
ExternalCommand GetCommand(); |
|||
By convention, when the Unity Communicator and External Communicator call exchange, the |
|||
exchange is NOT simultaneous but sequential. This means that when a side of the |
|||
communication calls exchange, the other will receive the result of its previous |
|||
exchange call. |
|||
This is what happens when A calls exchange a single time: |
|||
A sends data_1 to B -> B receives data_1 -> B generates and sends data_2 -> A receives data_2 |
|||
When A calls exchange, it sends data_1 and receives data_2 |
|||
void UpdateCommand(); |
|||
void SetCommand(ExternalCommand c); |
|||
Since the messages are sent back and forth with exchange and simultaneously when calling |
|||
initialize, External sends two messages at initialization. |
|||
/// Implement this method to return the new dictionary of resetParameters
|
|||
/// that was given outside of Unity
|
|||
Dictionary<string, float> GetResetParameters(); |
|||
The structure of the messages is as follows: |
|||
UnityMessage |
|||
...Header |
|||
...UnityOutput |
|||
......UnityRLOutput |
|||
......UnityRLInitializationOutput |
|||
...UnityInput |
|||
......UnityRLIntput |
|||
......UnityRLInitializationIntput |
|||
UnityOutput and UnityInput can be extended to provide functionalities beyond RL |
|||
UnityRLOutput and UnityRLInput can be extended to provide new RL functionalities |
|||
*/ |
|||
public interface Communicator |
|||
{ |
|||
/// <summary>
|
|||
/// Initialize the communicator by sending the first UnityOutput and receiving the
|
|||
/// first UnityInput. The second UnityInput is stored in the unityInput argument.
|
|||
/// </summary>
|
|||
/// <returns>The first Unity Input.</returns>
|
|||
/// <param name="unityOutput">The first Unity Output.</param>
|
|||
/// <param name="unityInput">The second Unity input.</param>
|
|||
UnityInput Initialize(UnityOutput unityOutput, |
|||
out UnityInput unityInput); |
|||
/// <summary>
|
|||
/// Send a UnityOutput and receives a UnityInput.
|
|||
/// </summary>
|
|||
/// <returns>The next UnityInput.</returns>
|
|||
/// <param name="unityOutput">The UnityOutput to be sent.</param>
|
|||
UnityInput Exchange(UnityOutput unityOutput); |
|||
Dictionary<string, bool> GetHasTried(); |
|||
Dictionary<string, bool> GetSent(); |
|||
/// <summary>
|
|||
/// Close the communicator gracefully on both sides of the communication.
|
|||
/// </summary>
|
|||
void Close(); |
|||
} |
|||
} |
|
|||
|
|||
from unityagents.communicator import Communicator |
|||
from communicator_objects import UnityMessage, UnityOutput, UnityInput,\ |
|||
ResolutionProto, BrainParametersProto, UnityRLInitializationOutput,\ |
|||
AgentInfoProto, UnityRLOutput |
|||
|
|||
|
|||
class MockCommunicator(Communicator): |
|||
def __init__(self, discrete=False, visual_input=False): |
|||
""" |
|||
Python side of the grpc communication. Python is the client and Unity the server |
|||
|
|||
:int base_port: Baseline port number to connect to Unity environment over. worker_id increments over this. |
|||
:int worker_id: Number to add to communication port (5005) [0]. Used for asynchronous agent scenarios. |
|||
""" |
|||
self.is_discrete = discrete |
|||
self.steps = 0 |
|||
self.visual_input = visual_input |
|||
self.has_been_closed = False |
|||
|
|||
def initialize(self, inputs: UnityInput) -> UnityOutput: |
|||
if self.visual_input: |
|||
resolutions = [ResolutionProto( |
|||
width=30, |
|||
height=40, |
|||
gray_scale=False)] |
|||
else: |
|||
resolutions = [] |
|||
bp = BrainParametersProto( |
|||
vector_observation_size=3, |
|||
num_stacked_vector_observations=2, |
|||
vector_action_size=2, |
|||
camera_resolutions=resolutions, |
|||
vector_action_descriptions=["", ""], |
|||
vector_action_space_type=int(not self.is_discrete), |
|||
vector_observation_space_type=1, |
|||
brain_name="RealFakeBrain", |
|||
brain_type=2 |
|||
) |
|||
rl_init = UnityRLInitializationOutput( |
|||
name="RealFakeAcademy", |
|||
version="API-4", |
|||
log_path="", |
|||
brain_parameters=[bp] |
|||
) |
|||
return UnityOutput( |
|||
rl_initialization_output=rl_init |
|||
) |
|||
|
|||
def exchange(self, inputs: UnityInput) -> UnityOutput: |
|||
dict_agent_info = {} |
|||
if self.is_discrete: |
|||
vector_action = [1] |
|||
else: |
|||
vector_action = [1, 2] |
|||
list_agent_info = [] |
|||
for i in range(3): |
|||
list_agent_info.append( |
|||
AgentInfoProto( |
|||
stacked_vector_observation=[1, 2, 3, 1, 2, 3], |
|||
reward=1, |
|||
stored_vector_actions=vector_action, |
|||
stored_text_actions="", |
|||
text_observation="", |
|||
memories=[], |
|||
done=(i == 2), |
|||
max_step_reached=False, |
|||
id=i |
|||
)) |
|||
dict_agent_info["RealFakeBrain"] = \ |
|||
UnityRLOutput.ListAgentInfoProto(value=list_agent_info) |
|||
global_done = False |
|||
try: |
|||
global_done = (inputs.rl_input.agent_actions["RealFakeBrain"].value[0].vector_actions[0] == -1) |
|||
except: |
|||
pass |
|||
result = UnityRLOutput( |
|||
global_done=global_done, |
|||
agentInfos=dict_agent_info |
|||
) |
|||
return UnityOutput( |
|||
rl_output=result |
|||
) |
|||
|
|||
def close(self): |
|||
""" |
|||
Sends a shutdown signal to the unity environment, and closes the grpc connection. |
|||
""" |
|||
self.has_been_closed = True |
|
|||
import logging |
|||
|
|||
from communicator_objects import UnityOutput, UnityInput |
|||
|
|||
logging.basicConfig(level=logging.INFO) |
|||
logger = logging.getLogger("unityagents") |
|||
|
|||
|
|||
class Communicator(object): |
|||
def __init__(self, worker_id=0, |
|||
base_port=5005): |
|||
""" |
|||
Python side of the communication. Must be used in pair with the right Unity Communicator equivalent. |
|||
|
|||
:int base_port: Baseline port number to connect to Unity environment over. worker_id increments over this. |
|||
:int worker_id: Number to add to communication port (5005) [0]. Used for asynchronous agent scenarios. |
|||
""" |
|||
|
|||
def initialize(self, inputs: UnityInput) -> UnityOutput: |
|||
""" |
|||
Used to exchange initialization parameters between Python and the Environment |
|||
:param inputs: The initialization input that will be sent to the environment. |
|||
:return: UnityOutput: The initialization output sent by Unity |
|||
""" |
|||
|
|||
def exchange(self, inputs: UnityInput) -> UnityOutput: |
|||
""" |
|||
Used to send an input and receive an output from the Environment |
|||
:param inputs: The UnityInput that needs to be sent the Environment |
|||
:return: The UnityOutputs generated by the Environment |
|||
""" |
|||
|
|||
def close(self): |
|||
""" |
|||
Sends a shutdown signal to the unity environment, and closes the connection. |
|||
""" |
|||
|
|
|||
import logging |
|||
import grpc |
|||
|
|||
from multiprocessing import Pipe |
|||
from concurrent.futures import ThreadPoolExecutor |
|||
|
|||
from .communicator import Communicator |
|||
from communicator_objects import UnityToExternalServicer, add_UnityToExternalServicer_to_server |
|||
from communicator_objects import UnityMessage, UnityInput, UnityOutput |
|||
from .exception import UnityTimeOutException |
|||
|
|||
|
|||
logging.basicConfig(level=logging.INFO) |
|||
logger = logging.getLogger("unityagents") |
|||
|
|||
|
|||
class UnityToExternalServicerImplementation(UnityToExternalServicer): |
|||
parent_conn, child_conn = Pipe() |
|||
|
|||
def Initialize(self, request, context): |
|||
self.child_conn.send(request) |
|||
return self.child_conn.recv() |
|||
|
|||
def Exchange(self, request, context): |
|||
self.child_conn.send(request) |
|||
return self.child_conn.recv() |
|||
|
|||
|
|||
class RpcCommunicator(Communicator): |
|||
def __init__(self, worker_id=0, |
|||
base_port=5005): |
|||
""" |
|||
Python side of the grpc communication. Python is the server and Unity the client |
|||
|
|||
|
|||
:int base_port: Baseline port number to connect to Unity environment over. worker_id increments over this. |
|||
:int worker_id: Number to add to communication port (5005) [0]. Used for asynchronous agent scenarios. |
|||
""" |
|||
self.port = base_port + worker_id |
|||
self.worker_id = worker_id |
|||
self.server = None |
|||
self.unity_to_external = None |
|||
self.is_open = False |
|||
|
|||
def initialize(self, inputs: UnityInput) -> UnityOutput: |
|||
try: |
|||
# Establish communication grpc |
|||
self.server = grpc.server(ThreadPoolExecutor(max_workers=10)) |
|||
self.unity_to_external = UnityToExternalServicerImplementation() |
|||
add_UnityToExternalServicer_to_server(self.unity_to_external, self.server) |
|||
self.server.add_insecure_port('[::]:'+str(self.port)) |
|||
self.server.start() |
|||
except : |
|||
raise UnityTimeOutException( |
|||
"Couldn't start socket communication because worker number {} is still in use. " |
|||
"You may need to manually close a previously opened environment " |
|||
"or use a different worker number.".format(str(self.worker_id))) |
|||
if not self.unity_to_external.parent_conn.poll(30): |
|||
raise UnityTimeOutException( |
|||
"The Unity environment took too long to respond. Make sure that :\n" |
|||
"\t The environment does not need user interaction to launch\n" |
|||
"\t The Academy and the External Brain(s) are attached to objects in the Scene\n" |
|||
"\t The environment and the Python interface have compatible versions.") |
|||
aca_param = self.unity_to_external.parent_conn.recv().unity_output |
|||
self.is_open = True |
|||
message = UnityMessage() |
|||
message.header.status = 200 |
|||
message.unity_input.CopyFrom(inputs) |
|||
self.unity_to_external.parent_conn.send(message) |
|||
self.unity_to_external.parent_conn.recv() |
|||
return aca_param |
|||
|
|||
def exchange(self, inputs: UnityInput) -> UnityOutput: |
|||
message = UnityMessage() |
|||
message.header.status = 200 |
|||
message.unity_input.CopyFrom(inputs) |
|||
self.unity_to_external.parent_conn.send(message) |
|||
output = self.unity_to_external.parent_conn.recv() |
|||
if output.header.status != 200: |
|||
return None |
|||
return output.unity_output |
|||
|
|||
def close(self): |
|||
""" |
|||
Sends a shutdown signal to the unity environment, and closes the grpc connection. |
|||
""" |
|||
if self.is_open: |
|||
message_input = UnityMessage() |
|||
message_input.header.status = 400 |
|||
self.unity_to_external.parent_conn.send(message_input) |
|||
self.unity_to_external.parent_conn.close() |
|||
self.server.stop(False) |
|||
self.is_open = False |
|||
|
|||
|
|||
|
|||
|
|
|||
import logging |
|||
import socket |
|||
import struct |
|||
|
|||
from .communicator import Communicator |
|||
from communicator_objects import UnityMessage, UnityOutput, UnityInput |
|||
from .exception import UnityTimeOutException |
|||
|
|||
|
|||
logging.basicConfig(level=logging.INFO) |
|||
logger = logging.getLogger("unityagents") |
|||
|
|||
|
|||
class SocketCommunicator(Communicator): |
|||
def __init__(self, worker_id=0, |
|||
base_port=5005): |
|||
""" |
|||
Python side of the socket communication |
|||
|
|||
:int base_port: Baseline port number to connect to Unity environment over. worker_id increments over this. |
|||
:int worker_id: Number to add to communication port (5005) [0]. Used for asynchronous agent scenarios. |
|||
""" |
|||
|
|||
self.port = base_port + worker_id |
|||
self._buffer_size = 12000 |
|||
self.worker_id = worker_id |
|||
self._socket = None |
|||
self._conn = None |
|||
|
|||
def initialize(self, inputs: UnityInput) -> UnityOutput: |
|||
try: |
|||
# Establish communication socket |
|||
self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|||
self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |
|||
self._socket.bind(("localhost", self.port)) |
|||
except: |
|||
raise UnityTimeOutException("Couldn't start socket communication because worker number {} is still in use. " |
|||
"You may need to manually close a previously opened environment " |
|||
"or use a different worker number.".format(str(self.worker_id))) |
|||
try: |
|||
self._socket.settimeout(30) |
|||
self._socket.listen(1) |
|||
self._conn, _ = self._socket.accept() |
|||
self._conn.settimeout(30) |
|||
except : |
|||
raise UnityTimeOutException( |
|||
"The Unity environment took too long to respond. Make sure that :\n" |
|||
"\t The environment does not need user interaction to launch\n" |
|||
"\t The Academy and the External Brain(s) are attached to objects in the Scene\n" |
|||
"\t The environment and the Python interface have compatible versions.") |
|||
message = UnityMessage() |
|||
message.header.status = 200 |
|||
message.unity_input.CopyFrom(inputs) |
|||
self._communicator_send(message.SerializeToString()) |
|||
initialization_output = UnityMessage() |
|||
initialization_output.ParseFromString(self._communicator_receive()) |
|||
return initialization_output.unity_output |
|||
|
|||
def _communicator_receive(self): |
|||
try: |
|||
s = self._conn.recv(self._buffer_size) |
|||
message_length = struct.unpack("I", bytearray(s[:4]))[0] |
|||
s = s[4:] |
|||
while len(s) != message_length: |
|||
s += self._conn.recv(self._buffer_size) |
|||
except socket.timeout as e: |
|||
raise UnityTimeOutException("The environment took too long to respond.") |
|||
return s |
|||
|
|||
def _communicator_send(self, message): |
|||
self._conn.send(struct.pack("I", len(message)) + message) |
|||
|
|||
def exchange(self, inputs: UnityInput) -> UnityOutput: |
|||
message = UnityMessage() |
|||
message.header.status = 200 |
|||
message.unity_input.CopyFrom(inputs) |
|||
self._communicator_send(message.SerializeToString()) |
|||
outputs = UnityMessage() |
|||
outputs.ParseFromString(self._communicator_receive()) |
|||
if outputs.header.status != 200: |
|||
return None |
|||
return outputs.unity_output |
|||
|
|||
def close(self): |
|||
""" |
|||
Sends a shutdown signal to the unity environment, and closes the socket connection. |
|||
""" |
|||
if self._socket is not None and self._conn is not None: |
|||
message_input = UnityMessage() |
|||
message_input.header.status = 400 |
|||
self._communicator_send(message_input.SerializeToString()) |
|||
if self._socket is not None: |
|||
self._socket.close() |
|||
self._socket = None |
|||
if self._socket is not None: |
|||
self._conn.close() |
|||
self._conn = None |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: e44343d7e31b04d47bd5f7329c918ffe |
|||
folderAsset: yes |
|||
timeCreated: 1521839636 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using UnityEngine; |
|||
using Google.Protobuf; |
|||
|
|||
namespace MLAgents |
|||
{ |
|||
/// <summary>
|
|||
/// The batcher is an RL specific class that makes sure that the information each object in
|
|||
/// Unity (Academy and Brains) wants to send to External is appropriately batched together
|
|||
/// and sent only when necessary.
|
|||
///
|
|||
/// The Batcher will only send a Message to the Communicator when either :
|
|||
/// 1 - The academy is done
|
|||
/// 2 - At least one brain has data to send
|
|||
///
|
|||
/// At each step, the batcher will keep track of the brains that queried the batcher for that
|
|||
/// step. The batcher can only send the batched data when all the Brains have queried the
|
|||
/// Batcher.
|
|||
/// </summary>
|
|||
public class Batcher |
|||
{ |
|||
/// The default number of agents in the scene
|
|||
private const int NumAgents = 32; |
|||
|
|||
/// Keeps track of which brains have data to send on the current step
|
|||
Dictionary<string, bool> m_hasData = |
|||
new Dictionary<string, bool>(); |
|||
/// Keeps track of which brains queried the batcher on the current step
|
|||
Dictionary<string, bool> m_hasQueried = |
|||
new Dictionary<string, bool>(); |
|||
/// Keeps track of the agents of each brain on the current step
|
|||
Dictionary<string, List<Agent>> m_currentAgents = |
|||
new Dictionary<string, List<Agent>>(); |
|||
/// The Communicator of the batcher, sends a message at most once per step
|
|||
Communicator m_communicator; |
|||
/// The current UnityRLOutput to be sent when all the brains queried the batcher
|
|||
CommunicatorObjects.UnityRLOutput m_currentUnityRLOutput = |
|||
new CommunicatorObjects.UnityRLOutput(); |
|||
/// Keeps track of the done flag of the Academy
|
|||
bool m_academyDone; |
|||
/// Keeps track of last CommandProto sent by External
|
|||
CommunicatorObjects.CommandProto m_command; |
|||
/// Keeps track of last EnvironmentParametersProto sent by External
|
|||
CommunicatorObjects.EnvironmentParametersProto m_environmentParameters; |
|||
/// Keeps track of last training mode sent by External
|
|||
bool m_isTraining; |
|||
|
|||
/// Keeps track of the number of messages received
|
|||
private ulong m_messagesReceived; |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the Batcher class.
|
|||
/// </summary>
|
|||
/// <param name="communicator">The communicator to be used by the batcher.</param>
|
|||
public Batcher(Communicator communicator) |
|||
{ |
|||
this.m_communicator = communicator; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Sends the academy parameters through the Communicator.
|
|||
/// Is used by the academy to send the AcademyParameters to the communicator.
|
|||
/// </summary>
|
|||
/// <returns>The External Initialization Parameters received.</returns>
|
|||
/// <param name="academyParameters">The Unity Initialization Paramters to be sent.</param>
|
|||
public CommunicatorObjects.UnityRLInitializationInput SendAcademyParameters( |
|||
CommunicatorObjects.UnityRLInitializationOutput academyParameters) |
|||
{ |
|||
CommunicatorObjects.UnityInput input; |
|||
var initializationInput = new CommunicatorObjects.UnityInput(); |
|||
try |
|||
{ |
|||
initializationInput = m_communicator.Initialize( |
|||
new CommunicatorObjects.UnityOutput |
|||
{ |
|||
RlInitializationOutput = academyParameters |
|||
}, |
|||
out input); |
|||
} |
|||
catch |
|||
{ |
|||
throw new UnityAgentsException( |
|||
"The Communicator was unable to connect. Please make sure the External " + |
|||
"process is ready to accept communication with Unity."); |
|||
} |
|||
|
|||
var firstRlInput = input.RlInput; |
|||
m_command = firstRlInput.Command; |
|||
m_environmentParameters = firstRlInput.EnvironmentParameters; |
|||
m_isTraining = firstRlInput.IsTraining; |
|||
return initializationInput.RlInitializationInput; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Registers the done flag of the academy to the next output to be sent
|
|||
/// to the communicator.
|
|||
/// </summary>
|
|||
/// <param name="done">If set to <c>true</c>
|
|||
/// The academy done state will be sent to External at the next Exchange.</param>
|
|||
public void RegisterAcademyDoneFlag(bool done) |
|||
{ |
|||
m_academyDone = done; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Gets the command. Is used by the academy to get reset or quit signals.
|
|||
/// </summary>
|
|||
/// <returns>The current command.</returns>
|
|||
public CommunicatorObjects.CommandProto GetCommand() |
|||
{ |
|||
return m_command; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Gets the number of messages received so far. Can be used to check for new messages.
|
|||
/// </summary>
|
|||
/// <returns>The number of messages received since start of the simulation</returns>
|
|||
public ulong GetNumberMessageReceived() |
|||
{ |
|||
return m_messagesReceived; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Gets the environment parameters. Is used by the academy to update
|
|||
/// the environment parameters.
|
|||
/// </summary>
|
|||
/// <returns>The environment parameters.</returns>
|
|||
public CommunicatorObjects.EnvironmentParametersProto GetEnvironmentParameters() |
|||
{ |
|||
return m_environmentParameters; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Gets the last training_mode flag External sent
|
|||
/// </summary>
|
|||
/// <returns><c>true</c>, if training mode is requested, <c>false</c> otherwise.</returns>
|
|||
public bool GetIsTraining() |
|||
{ |
|||
return m_isTraining; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Adds the brain to the list of brains which will be sending information to External.
|
|||
/// </summary>
|
|||
/// <param name="brainKey">Brain key.</param>
|
|||
public void SubscribeBrain(string brainKey) |
|||
{ |
|||
m_hasQueried[brainKey] = false; |
|||
m_hasData[brainKey] = false; |
|||
m_currentAgents[brainKey] = new List<Agent>(NumAgents); |
|||
m_currentUnityRLOutput.AgentInfos.Add( |
|||
brainKey, |
|||
new CommunicatorObjects.UnityRLOutput.Types.ListAgentInfoProto()); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Converts a AgentInfo to a protobuffer generated AgentInfoProto
|
|||
/// </summary>
|
|||
/// <returns>The protobuf verison of the AgentInfo.</returns>
|
|||
/// <param name="info">The AgentInfo to convert.</param>
|
|||
public static CommunicatorObjects.AgentInfoProto |
|||
AgentInfoConvertor(AgentInfo info) |
|||
{ |
|||
|
|||
var agentInfoProto = new CommunicatorObjects.AgentInfoProto |
|||
{ |
|||
StackedVectorObservation = { info.stackedVectorObservation }, |
|||
StoredVectorActions = { info.storedVectorActions }, |
|||
Memories = { info.memories }, |
|||
StoredTextActions = info.storedTextActions, |
|||
TextObservation = info.textObservation, |
|||
Reward = info.reward, |
|||
MaxStepReached = info.maxStepReached, |
|||
Done = info.done, |
|||
Id = info.id, |
|||
}; |
|||
foreach (Texture2D obs in info.visualObservations) |
|||
{ |
|||
agentInfoProto.VisualObservations.Add( |
|||
ByteString.CopyFrom(obs.EncodeToJPG()) |
|||
); |
|||
} |
|||
return agentInfoProto; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Converts a Brain into to a Protobuff BrainInfoProto so it can be sent
|
|||
/// </summary>
|
|||
/// <returns>The BrainInfoProto generated.</returns>
|
|||
/// <param name="brainParameters">The BrainParameters.</param>
|
|||
/// <param name="name">The name of the brain.</param>
|
|||
/// <param name="type">The type of brain.</param>
|
|||
public static CommunicatorObjects.BrainParametersProto BrainParametersConvertor( |
|||
BrainParameters brainParameters, string name, CommunicatorObjects.BrainTypeProto type) |
|||
{ |
|||
|
|||
var brainParametersProto = new CommunicatorObjects.BrainParametersProto |
|||
{ |
|||
VectorObservationSize = brainParameters.vectorObservationSize, |
|||
NumStackedVectorObservations = brainParameters.numStackedVectorObservations, |
|||
VectorActionSize = brainParameters.vectorActionSize, |
|||
VectorActionSpaceType = |
|||
(CommunicatorObjects.SpaceTypeProto)brainParameters.vectorActionSpaceType, |
|||
VectorObservationSpaceType = |
|||
(CommunicatorObjects.SpaceTypeProto)brainParameters.vectorObservationSpaceType, |
|||
BrainName = name, |
|||
BrainType = type |
|||
}; |
|||
brainParametersProto.VectorActionDescriptions.AddRange( |
|||
brainParameters.vectorActionDescriptions); |
|||
foreach (resolution res in brainParameters.cameraResolutions) |
|||
{ |
|||
brainParametersProto.CameraResolutions.Add( |
|||
new CommunicatorObjects.ResolutionProto |
|||
{ |
|||
Width = res.width, |
|||
Height = res.height, |
|||
GrayScale = res.blackAndWhite |
|||
}); |
|||
} |
|||
return brainParametersProto; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Sends the brain info. If at least one brain has an agent in need of
|
|||
/// a decision or if the academy is done, the data is sent via
|
|||
/// Communicator. Else, a new step is realized. The data can only be
|
|||
/// sent once all the brains that subscribed to the batcher have tried
|
|||
/// to send information.
|
|||
/// </summary>
|
|||
/// <param name="brainKey">Brain key.</param>
|
|||
/// <param name="agentInfo">Agent info.</param>
|
|||
public void SendBrainInfo( |
|||
string brainKey, Dictionary<Agent, AgentInfo> agentInfo) |
|||
{ |
|||
// If no communicator is initialized, the Batcher will not transmit
|
|||
// BrainInfo
|
|||
if (m_communicator == null) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
// The brain tried called GiveBrainInfo, update m_hasQueried
|
|||
m_hasQueried[brainKey] = true; |
|||
// Populate the currentAgents dictionary
|
|||
m_currentAgents[brainKey].Clear(); |
|||
foreach (Agent agent in agentInfo.Keys) |
|||
{ |
|||
m_currentAgents[brainKey].Add(agent); |
|||
} |
|||
// If at least one agent has data to send, then append data to
|
|||
// the message and update hasSentState
|
|||
if (m_currentAgents[brainKey].Count > 0) |
|||
{ |
|||
foreach (Agent agent in m_currentAgents[brainKey]) |
|||
{ |
|||
CommunicatorObjects.AgentInfoProto agentInfoProto = |
|||
AgentInfoConvertor(agentInfo[agent]); |
|||
m_currentUnityRLOutput.AgentInfos[brainKey].Value.Add(agentInfoProto); |
|||
} |
|||
m_hasData[brainKey] = true; |
|||
} |
|||
|
|||
// If any agent needs to send data, then the whole message
|
|||
// must be sent
|
|||
if (m_hasQueried.Values.All(x => x)) |
|||
{ |
|||
if (m_hasData.Values.Any(x => x) || m_academyDone) |
|||
{ |
|||
m_currentUnityRLOutput.GlobalDone = m_academyDone; |
|||
SendBatchedMessageHelper(); |
|||
} |
|||
// The message was just sent so we must reset hasSentState and
|
|||
// triedSendState
|
|||
foreach (string k in m_currentAgents.Keys) |
|||
{ |
|||
m_hasData[k] = false; |
|||
m_hasQueried[k] = false; |
|||
} |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Helper method that sends the curent UnityRLOutput, receives the next UnityInput and
|
|||
/// Applies the appropriate AgentAction to the agents.
|
|||
/// </summary>
|
|||
void SendBatchedMessageHelper() |
|||
{ |
|||
var input = m_communicator.Exchange( |
|||
new CommunicatorObjects.UnityOutput{ |
|||
RlOutput = m_currentUnityRLOutput |
|||
}); |
|||
m_messagesReceived += 1; |
|||
|
|||
foreach (string k in m_currentUnityRLOutput.AgentInfos.Keys) |
|||
{ |
|||
m_currentUnityRLOutput.AgentInfos[k].Value.Clear(); |
|||
} |
|||
if (input == null) |
|||
{ |
|||
m_command = CommunicatorObjects.CommandProto.Quit; |
|||
return; |
|||
} |
|||
|
|||
CommunicatorObjects.UnityRLInput rlInput = input.RlInput; |
|||
|
|||
if (rlInput == null) |
|||
{ |
|||
m_command = CommunicatorObjects.CommandProto.Quit; |
|||
return; |
|||
} |
|||
|
|||
m_command = rlInput.Command; |
|||
m_environmentParameters = rlInput.EnvironmentParameters; |
|||
m_isTraining = rlInput.IsTraining; |
|||
|
|||
if (rlInput.AgentActions == null) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
foreach (var brainName in rlInput.AgentActions.Keys) |
|||
{ |
|||
if (!m_currentAgents[brainName].Any()) |
|||
{ |
|||
continue; |
|||
} |
|||
if (!rlInput.AgentActions[brainName].Value.Any()) |
|||
{ |
|||
continue; |
|||
} |
|||
for (var i = 0; i < m_currentAgents[brainName].Count(); i++) |
|||
{ |
|||
var agent = m_currentAgents[brainName][i]; |
|||
var action = rlInput.AgentActions[brainName].Value[i]; |
|||
agent.UpdateVectorAction( |
|||
action.VectorActions.ToArray()); |
|||
agent.UpdateMemoriesAction( |
|||
action.Memories.ToList()); |
|||
agent.UpdateTextAction( |
|||
action.TextActions); |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: 4243d5dc0ad5746cba578575182f8c17 |
|||
timeCreated: 1523045876 |
|||
licenseType: Free |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7ebeef5df83b74a048b7f99681672f3b |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using Grpc.Core; |
|||
using System.IO; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
using UnityEngine; |
|||
using MLAgents.CommunicatorObjects; |
|||
|
|||
namespace MLAgents |
|||
{ |
|||
/// Responsible for communication with External using gRPC.
|
|||
public class RPCCommunicator : Communicator |
|||
{ |
|||
/// If true, the communication is active.
|
|||
bool m_isOpen; |
|||
|
|||
/// The Unity to External client.
|
|||
UnityToExternal.UnityToExternalClient m_client; |
|||
|
|||
/// The communicator parameters sent at construction
|
|||
CommunicatorParameters m_communicatorParameters; |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the RPCCommunicator class.
|
|||
/// </summary>
|
|||
/// <param name="communicatorParameters">Communicator parameters.</param>
|
|||
public RPCCommunicator(CommunicatorParameters communicatorParameters) |
|||
{ |
|||
this.m_communicatorParameters = communicatorParameters; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initialize the communicator by sending the first UnityOutput and receiving the
|
|||
/// first UnityInput. The second UnityInput is stored in the unityInput argument.
|
|||
/// </summary>
|
|||
/// <returns>The first Unity Input.</returns>
|
|||
/// <param name="unityOutput">The first Unity Output.</param>
|
|||
/// <param name="unityInput">The second Unity input.</param>
|
|||
public UnityInput Initialize(UnityOutput unityOutput, |
|||
out UnityInput unityInput) |
|||
{ |
|||
m_isOpen = true; |
|||
var channel = new Channel( |
|||
"localhost:"+m_communicatorParameters.port, |
|||
ChannelCredentials.Insecure); |
|||
|
|||
m_client = new UnityToExternal.UnityToExternalClient(channel); |
|||
var result = m_client.Exchange(WrapMessage(unityOutput, 200)); |
|||
unityInput = m_client.Exchange(WrapMessage(null, 200)).UnityInput; |
|||
#if UNITY_EDITOR
|
|||
EditorApplication.playModeStateChanged += HandleOnPlayModeChanged; |
|||
#endif
|
|||
return result.UnityInput; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Close the communicator gracefully on both sides of the communication.
|
|||
/// </summary>
|
|||
public void Close() |
|||
{ |
|||
if (!m_isOpen) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
try |
|||
{ |
|||
m_client.Exchange(WrapMessage(null, 400)); |
|||
m_isOpen = false; |
|||
} |
|||
catch |
|||
{ |
|||
return; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Send a UnityOutput and receives a UnityInput.
|
|||
/// </summary>
|
|||
/// <returns>The next UnityInput.</returns>
|
|||
/// <param name="unityOutput">The UnityOutput to be sent.</param>
|
|||
public UnityInput Exchange(UnityOutput unityOutput) |
|||
{ |
|||
if (!m_isOpen) |
|||
{ |
|||
return null; |
|||
} |
|||
try |
|||
{ |
|||
var message = m_client.Exchange(WrapMessage(unityOutput, 200)); |
|||
if (message.Header.Status == 200) |
|||
{ |
|||
return message.UnityInput; |
|||
} |
|||
else |
|||
{ |
|||
m_isOpen = false; |
|||
return null; |
|||
} |
|||
} |
|||
catch |
|||
{ |
|||
m_isOpen = false; |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Wraps the UnityOuptut into a message with the appropriate status.
|
|||
/// </summary>
|
|||
/// <returns>The UnityMessage corresponding.</returns>
|
|||
/// <param name="content">The UnityOutput to be wrapped.</param>
|
|||
/// <param name="status">The status of the message.</param>
|
|||
private static UnityMessage WrapMessage(UnityOutput content, int status) |
|||
{ |
|||
return new UnityMessage |
|||
{ |
|||
Header = new Header { Status = status }, |
|||
UnityOutput = content |
|||
}; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// When the Unity application quits, the communicator must be closed
|
|||
/// </summary>
|
|||
private void OnApplicationQuit() |
|||
{ |
|||
Close(); |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
/// <summary>
|
|||
/// When the editor exits, the communicator must be closed
|
|||
/// </summary>
|
|||
/// <param name="state">State.</param>
|
|||
private void HandleOnPlayModeChanged(PlayModeStateChange state) |
|||
{ |
|||
// This method is run whenever the playmode state is changed.
|
|||
if (state==PlayModeStateChange.ExitingPlayMode) |
|||
{ |
|||
Close(); |
|||
} |
|||
} |
|||
#endif
|
|||
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 57a3dc12d3b88408688bb490b65a838e |
|||
timeCreated: 1523046536 |
|||
licenseType: Free |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using Google.Protobuf; |
|||
using Grpc.Core; |
|||
using System.Net.Sockets; |
|||
using UnityEngine; |
|||
using MLAgents.CommunicatorObjects; |
|||
using System.Threading.Tasks; |
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
|
|||
namespace MLAgents |
|||
{ |
|||
|
|||
public class SocketCommunicator : Communicator |
|||
{ |
|||
private const float TimeOut = 10f; |
|||
private const int MessageLength = 12000; |
|||
byte[] m_messageHolder = new byte[MessageLength]; |
|||
int m_comPort; |
|||
Socket m_sender; |
|||
byte[] m_lengthHolder = new byte[4]; |
|||
CommunicatorParameters communicatorParameters; |
|||
|
|||
|
|||
public SocketCommunicator(CommunicatorParameters communicatorParameters) |
|||
{ |
|||
this.communicatorParameters = communicatorParameters; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initialize the communicator by sending the first UnityOutput and receiving the
|
|||
/// first UnityInput. The second UnityInput is stored in the unityInput argument.
|
|||
/// </summary>
|
|||
/// <returns>The first Unity Input.</returns>
|
|||
/// <param name="unityOutput">The first Unity Output.</param>
|
|||
/// <param name="unityInput">The second Unity input.</param>
|
|||
public UnityInput Initialize(UnityOutput unityOutput, |
|||
out UnityInput unityInput) |
|||
{ |
|||
|
|||
m_sender = new Socket( |
|||
AddressFamily.InterNetwork, |
|||
SocketType.Stream, |
|||
ProtocolType.Tcp); |
|||
m_sender.Connect("localhost", communicatorParameters.port); |
|||
|
|||
UnityMessage initializationInput = |
|||
UnityMessage.Parser.ParseFrom(Receive()); |
|||
|
|||
Send(WrapMessage(unityOutput, 200).ToByteArray()); |
|||
|
|||
unityInput = UnityMessage.Parser.ParseFrom(Receive()).UnityInput; |
|||
#if UNITY_EDITOR
|
|||
EditorApplication.playModeStateChanged += HandleOnPlayModeChanged; |
|||
#endif
|
|||
return initializationInput.UnityInput; |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Uses the socke to receive a byte[] from External. Reassemble a message that was split
|
|||
/// by External if it was too long.
|
|||
/// </summary>
|
|||
/// <returns>The byte[] sent by External.</returns>
|
|||
byte[] Receive() |
|||
{ |
|||
m_sender.Receive(m_lengthHolder); |
|||
int totalLength = System.BitConverter.ToInt32(m_lengthHolder, 0); |
|||
int location = 0; |
|||
byte[] result = new byte[totalLength]; |
|||
while (location != totalLength) |
|||
{ |
|||
int fragment = m_sender.Receive(m_messageHolder); |
|||
System.Buffer.BlockCopy( |
|||
m_messageHolder, 0, result, location, fragment); |
|||
location += fragment; |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Send the specified input via socket to External. Split the message into smaller
|
|||
/// parts if it is too long.
|
|||
/// </summary>
|
|||
/// <param name="input">The byte[] to be sent.</param>
|
|||
void Send(byte[] input) |
|||
{ |
|||
byte[] newArray = new byte[input.Length + 4]; |
|||
input.CopyTo(newArray, 4); |
|||
System.BitConverter.GetBytes(input.Length).CopyTo(newArray, 0); |
|||
m_sender.Send(newArray); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Close the communicator gracefully on both sides of the communication.
|
|||
/// </summary>
|
|||
public void Close() |
|||
{ |
|||
Send(WrapMessage(null, 400).ToByteArray()); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Send a UnityOutput and receives a UnityInput.
|
|||
/// </summary>
|
|||
/// <returns>The next UnityInput.</returns>
|
|||
/// <param name="unityOutput">The UnityOutput to be sent.</param>
|
|||
public UnityInput Exchange(UnityOutput unityOutput) |
|||
{ |
|||
Send(WrapMessage(unityOutput, 200).ToByteArray()); |
|||
byte[] received = null; |
|||
var task = Task.Run(() => received = Receive()); |
|||
if (!task.Wait(System.TimeSpan.FromSeconds(TimeOut))) |
|||
{ |
|||
throw new UnityAgentsException( |
|||
"The communicator took too long to respond."); |
|||
} |
|||
|
|||
var message = UnityMessage.Parser.ParseFrom(received); |
|||
|
|||
if (message.Header.Status != 200) |
|||
{ |
|||
return null; |
|||
} |
|||
return message.UnityInput; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Wraps the UnityOuptut into a message with the appropriate status.
|
|||
/// </summary>
|
|||
/// <returns>The UnityMessage corresponding.</returns>
|
|||
/// <param name="content">The UnityOutput to be wrapped.</param>
|
|||
/// <param name="status">The status of the message.</param>
|
|||
private static UnityMessage WrapMessage(UnityOutput content, int status) |
|||
{ |
|||
return new UnityMessage |
|||
{ |
|||
Header = new Header { Status = status }, |
|||
UnityOutput = content |
|||
}; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// When the Unity application quits, the communicator must be closed
|
|||
/// </summary>
|
|||
private void OnApplicationQuit() |
|||
{ |
|||
Close(); |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
/// <summary>
|
|||
/// When the editor exits, the communicator must be closed
|
|||
/// </summary>
|
|||
/// <param name="state">State.</param>
|
|||
void HandleOnPlayModeChanged(PlayModeStateChange state) |
|||
{ |
|||
// This method is run whenever the playmode state is changed.
|
|||
if (state == PlayModeStateChange.ExitingPlayMode) |
|||
{ |
|||
Close(); |
|||
} |
|||
} |
|||
#endif
|
|||
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f0901c57c84a54f25aa5955165072493 |
|||
timeCreated: 1523046536 |
|||
licenseType: Free |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
from .agent_action_proto_pb2 import * |
|||
from .agent_info_proto_pb2 import * |
|||
from .brain_parameters_proto_pb2 import * |
|||
from .brain_type_proto_pb2 import * |
|||
from .command_proto_pb2 import * |
|||
from .engine_configuration_proto_pb2 import * |
|||
from .environment_parameters_proto_pb2 import * |
|||
from .header_pb2 import * |
|||
from .resolution_proto_pb2 import * |
|||
from .space_type_proto_pb2 import * |
|||
from .unity_input_pb2 import * |
|||
from .unity_message_pb2 import * |
|||
from .unity_output_pb2 import * |
|||
from .unity_rl_initialization_input_pb2 import * |
|||
from .unity_rl_initialization_output_pb2 import * |
|||
from .unity_rl_input_pb2 import * |
|||
from .unity_rl_output_pb2 import * |
|||
from .unity_to_external_pb2 import * |
|||
from .unity_to_external_pb2_grpc import * |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/agent_action_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/agent_action_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n-communicator_objects/agent_action_proto.proto\x12\x14\x63ommunicator_objects\"R\n\x10\x41gentActionProto\x12\x16\n\x0evector_actions\x18\x01 \x03(\x02\x12\x14\n\x0ctext_actions\x18\x02 \x01(\t\x12\x10\n\x08memories\x18\x03 \x03(\x02\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_AGENTACTIONPROTO = _descriptor.Descriptor( |
|||
name='AgentActionProto', |
|||
full_name='communicator_objects.AgentActionProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='vector_actions', full_name='communicator_objects.AgentActionProto.vector_actions', index=0, |
|||
number=1, type=2, cpp_type=6, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='text_actions', full_name='communicator_objects.AgentActionProto.text_actions', index=1, |
|||
number=2, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='memories', full_name='communicator_objects.AgentActionProto.memories', index=2, |
|||
number=3, type=2, cpp_type=6, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=71, |
|||
serialized_end=153, |
|||
) |
|||
|
|||
DESCRIPTOR.message_types_by_name['AgentActionProto'] = _AGENTACTIONPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
AgentActionProto = _reflection.GeneratedProtocolMessageType('AgentActionProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _AGENTACTIONPROTO, |
|||
__module__ = 'communicator_objects.agent_action_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.AgentActionProto) |
|||
)) |
|||
_sym_db.RegisterMessage(AgentActionProto) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/agent_info_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/agent_info_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n+communicator_objects/agent_info_proto.proto\x12\x14\x63ommunicator_objects\"\xfd\x01\n\x0e\x41gentInfoProto\x12\"\n\x1astacked_vector_observation\x18\x01 \x03(\x02\x12\x1b\n\x13visual_observations\x18\x02 \x03(\x0c\x12\x18\n\x10text_observation\x18\x03 \x01(\t\x12\x1d\n\x15stored_vector_actions\x18\x04 \x03(\x02\x12\x1b\n\x13stored_text_actions\x18\x05 \x01(\t\x12\x10\n\x08memories\x18\x06 \x03(\x02\x12\x0e\n\x06reward\x18\x07 \x01(\x02\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\x18\n\x10max_step_reached\x18\t \x01(\x08\x12\n\n\x02id\x18\n \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_AGENTINFOPROTO = _descriptor.Descriptor( |
|||
name='AgentInfoProto', |
|||
full_name='communicator_objects.AgentInfoProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='stacked_vector_observation', full_name='communicator_objects.AgentInfoProto.stacked_vector_observation', index=0, |
|||
number=1, type=2, cpp_type=6, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='visual_observations', full_name='communicator_objects.AgentInfoProto.visual_observations', index=1, |
|||
number=2, type=12, cpp_type=9, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='text_observation', full_name='communicator_objects.AgentInfoProto.text_observation', index=2, |
|||
number=3, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='stored_vector_actions', full_name='communicator_objects.AgentInfoProto.stored_vector_actions', index=3, |
|||
number=4, type=2, cpp_type=6, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='stored_text_actions', full_name='communicator_objects.AgentInfoProto.stored_text_actions', index=4, |
|||
number=5, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='memories', full_name='communicator_objects.AgentInfoProto.memories', index=5, |
|||
number=6, type=2, cpp_type=6, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='reward', full_name='communicator_objects.AgentInfoProto.reward', index=6, |
|||
number=7, type=2, cpp_type=6, label=1, |
|||
has_default_value=False, default_value=float(0), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='done', full_name='communicator_objects.AgentInfoProto.done', index=7, |
|||
number=8, type=8, cpp_type=7, label=1, |
|||
has_default_value=False, default_value=False, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='max_step_reached', full_name='communicator_objects.AgentInfoProto.max_step_reached', index=8, |
|||
number=9, type=8, cpp_type=7, label=1, |
|||
has_default_value=False, default_value=False, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='id', full_name='communicator_objects.AgentInfoProto.id', index=9, |
|||
number=10, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=70, |
|||
serialized_end=323, |
|||
) |
|||
|
|||
DESCRIPTOR.message_types_by_name['AgentInfoProto'] = _AGENTINFOPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
AgentInfoProto = _reflection.GeneratedProtocolMessageType('AgentInfoProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _AGENTINFOPROTO, |
|||
__module__ = 'communicator_objects.agent_info_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.AgentInfoProto) |
|||
)) |
|||
_sym_db.RegisterMessage(AgentInfoProto) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/brain_parameters_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import resolution_proto_pb2 as communicator__objects_dot_resolution__proto__pb2 |
|||
from communicator_objects import brain_type_proto_pb2 as communicator__objects_dot_brain__type__proto__pb2 |
|||
from communicator_objects import space_type_proto_pb2 as communicator__objects_dot_space__type__proto__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/brain_parameters_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n1communicator_objects/brain_parameters_proto.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/resolution_proto.proto\x1a+communicator_objects/brain_type_proto.proto\x1a+communicator_objects/space_type_proto.proto\"\xc6\x03\n\x14\x42rainParametersProto\x12\x1f\n\x17vector_observation_size\x18\x01 \x01(\x05\x12\'\n\x1fnum_stacked_vector_observations\x18\x02 \x01(\x05\x12\x1a\n\x12vector_action_size\x18\x03 \x01(\x05\x12\x41\n\x12\x63\x61mera_resolutions\x18\x04 \x03(\x0b\x32%.communicator_objects.ResolutionProto\x12\"\n\x1avector_action_descriptions\x18\x05 \x03(\t\x12\x46\n\x18vector_action_space_type\x18\x06 \x01(\x0e\x32$.communicator_objects.SpaceTypeProto\x12K\n\x1dvector_observation_space_type\x18\x07 \x01(\x0e\x32$.communicator_objects.SpaceTypeProto\x12\x12\n\nbrain_name\x18\x08 \x01(\t\x12\x38\n\nbrain_type\x18\t \x01(\x0e\x32$.communicator_objects.BrainTypeProtoB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,communicator__objects_dot_brain__type__proto__pb2.DESCRIPTOR,communicator__objects_dot_space__type__proto__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_BRAINPARAMETERSPROTO = _descriptor.Descriptor( |
|||
name='BrainParametersProto', |
|||
full_name='communicator_objects.BrainParametersProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='vector_observation_size', full_name='communicator_objects.BrainParametersProto.vector_observation_size', index=0, |
|||
number=1, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='num_stacked_vector_observations', full_name='communicator_objects.BrainParametersProto.num_stacked_vector_observations', index=1, |
|||
number=2, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='vector_action_size', full_name='communicator_objects.BrainParametersProto.vector_action_size', index=2, |
|||
number=3, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='camera_resolutions', full_name='communicator_objects.BrainParametersProto.camera_resolutions', index=3, |
|||
number=4, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='vector_action_descriptions', full_name='communicator_objects.BrainParametersProto.vector_action_descriptions', index=4, |
|||
number=5, type=9, cpp_type=9, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='vector_action_space_type', full_name='communicator_objects.BrainParametersProto.vector_action_space_type', index=5, |
|||
number=6, type=14, cpp_type=8, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='vector_observation_space_type', full_name='communicator_objects.BrainParametersProto.vector_observation_space_type', index=6, |
|||
number=7, type=14, cpp_type=8, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='brain_name', full_name='communicator_objects.BrainParametersProto.brain_name', index=7, |
|||
number=8, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='brain_type', full_name='communicator_objects.BrainParametersProto.brain_type', index=8, |
|||
number=9, type=14, cpp_type=8, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=211, |
|||
serialized_end=665, |
|||
) |
|||
|
|||
_BRAINPARAMETERSPROTO.fields_by_name['camera_resolutions'].message_type = communicator__objects_dot_resolution__proto__pb2._RESOLUTIONPROTO |
|||
_BRAINPARAMETERSPROTO.fields_by_name['vector_action_space_type'].enum_type = communicator__objects_dot_space__type__proto__pb2._SPACETYPEPROTO |
|||
_BRAINPARAMETERSPROTO.fields_by_name['vector_observation_space_type'].enum_type = communicator__objects_dot_space__type__proto__pb2._SPACETYPEPROTO |
|||
_BRAINPARAMETERSPROTO.fields_by_name['brain_type'].enum_type = communicator__objects_dot_brain__type__proto__pb2._BRAINTYPEPROTO |
|||
DESCRIPTOR.message_types_by_name['BrainParametersProto'] = _BRAINPARAMETERSPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
BrainParametersProto = _reflection.GeneratedProtocolMessageType('BrainParametersProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _BRAINPARAMETERSPROTO, |
|||
__module__ = 'communicator_objects.brain_parameters_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.BrainParametersProto) |
|||
)) |
|||
_sym_db.RegisterMessage(BrainParametersProto) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/brain_type_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf.internal import enum_type_wrapper |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import resolution_proto_pb2 as communicator__objects_dot_resolution__proto__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/brain_type_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n+communicator_objects/brain_type_proto.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/resolution_proto.proto*G\n\x0e\x42rainTypeProto\x12\n\n\x06Player\x10\x00\x12\r\n\tHeuristic\x10\x01\x12\x0c\n\x08\x45xternal\x10\x02\x12\x0c\n\x08Internal\x10\x03\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,]) |
|||
|
|||
_BRAINTYPEPROTO = _descriptor.EnumDescriptor( |
|||
name='BrainTypeProto', |
|||
full_name='communicator_objects.BrainTypeProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
values=[ |
|||
_descriptor.EnumValueDescriptor( |
|||
name='Player', index=0, number=0, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='Heuristic', index=1, number=1, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='External', index=2, number=2, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='Internal', index=3, number=3, |
|||
options=None, |
|||
type=None), |
|||
], |
|||
containing_type=None, |
|||
options=None, |
|||
serialized_start=114, |
|||
serialized_end=185, |
|||
) |
|||
_sym_db.RegisterEnumDescriptor(_BRAINTYPEPROTO) |
|||
|
|||
BrainTypeProto = enum_type_wrapper.EnumTypeWrapper(_BRAINTYPEPROTO) |
|||
Player = 0 |
|||
Heuristic = 1 |
|||
External = 2 |
|||
Internal = 3 |
|||
|
|||
|
|||
DESCRIPTOR.enum_types_by_name['BrainTypeProto'] = _BRAINTYPEPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/command_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf.internal import enum_type_wrapper |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/command_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n(communicator_objects/command_proto.proto\x12\x14\x63ommunicator_objects*-\n\x0c\x43ommandProto\x12\x08\n\x04STEP\x10\x00\x12\t\n\x05RESET\x10\x01\x12\x08\n\x04QUIT\x10\x02\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
_COMMANDPROTO = _descriptor.EnumDescriptor( |
|||
name='CommandProto', |
|||
full_name='communicator_objects.CommandProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
values=[ |
|||
_descriptor.EnumValueDescriptor( |
|||
name='STEP', index=0, number=0, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='RESET', index=1, number=1, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='QUIT', index=2, number=2, |
|||
options=None, |
|||
type=None), |
|||
], |
|||
containing_type=None, |
|||
options=None, |
|||
serialized_start=66, |
|||
serialized_end=111, |
|||
) |
|||
_sym_db.RegisterEnumDescriptor(_COMMANDPROTO) |
|||
|
|||
CommandProto = enum_type_wrapper.EnumTypeWrapper(_COMMANDPROTO) |
|||
STEP = 0 |
|||
RESET = 1 |
|||
QUIT = 2 |
|||
|
|||
|
|||
DESCRIPTOR.enum_types_by_name['CommandProto'] = _COMMANDPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/engine_configuration_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/engine_configuration_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n5communicator_objects/engine_configuration_proto.proto\x12\x14\x63ommunicator_objects\"\x95\x01\n\x18\x45ngineConfigurationProto\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\x15\n\rquality_level\x18\x03 \x01(\x05\x12\x12\n\ntime_scale\x18\x04 \x01(\x02\x12\x19\n\x11target_frame_rate\x18\x05 \x01(\x05\x12\x14\n\x0cshow_monitor\x18\x06 \x01(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_ENGINECONFIGURATIONPROTO = _descriptor.Descriptor( |
|||
name='EngineConfigurationProto', |
|||
full_name='communicator_objects.EngineConfigurationProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='width', full_name='communicator_objects.EngineConfigurationProto.width', index=0, |
|||
number=1, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='height', full_name='communicator_objects.EngineConfigurationProto.height', index=1, |
|||
number=2, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='quality_level', full_name='communicator_objects.EngineConfigurationProto.quality_level', index=2, |
|||
number=3, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='time_scale', full_name='communicator_objects.EngineConfigurationProto.time_scale', index=3, |
|||
number=4, type=2, cpp_type=6, label=1, |
|||
has_default_value=False, default_value=float(0), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='target_frame_rate', full_name='communicator_objects.EngineConfigurationProto.target_frame_rate', index=4, |
|||
number=5, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='show_monitor', full_name='communicator_objects.EngineConfigurationProto.show_monitor', index=5, |
|||
number=6, type=8, cpp_type=7, label=1, |
|||
has_default_value=False, default_value=False, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=80, |
|||
serialized_end=229, |
|||
) |
|||
|
|||
DESCRIPTOR.message_types_by_name['EngineConfigurationProto'] = _ENGINECONFIGURATIONPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
EngineConfigurationProto = _reflection.GeneratedProtocolMessageType('EngineConfigurationProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _ENGINECONFIGURATIONPROTO, |
|||
__module__ = 'communicator_objects.engine_configuration_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.EngineConfigurationProto) |
|||
)) |
|||
_sym_db.RegisterMessage(EngineConfigurationProto) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/environment_parameters_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/environment_parameters_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n7communicator_objects/environment_parameters_proto.proto\x12\x14\x63ommunicator_objects\"\xb5\x01\n\x1a\x45nvironmentParametersProto\x12_\n\x10\x66loat_parameters\x18\x01 \x03(\x0b\x32\x45.communicator_objects.EnvironmentParametersProto.FloatParametersEntry\x1a\x36\n\x14\x46loatParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY = _descriptor.Descriptor( |
|||
name='FloatParametersEntry', |
|||
full_name='communicator_objects.EnvironmentParametersProto.FloatParametersEntry', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='key', full_name='communicator_objects.EnvironmentParametersProto.FloatParametersEntry.key', index=0, |
|||
number=1, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='value', full_name='communicator_objects.EnvironmentParametersProto.FloatParametersEntry.value', index=1, |
|||
number=2, type=2, cpp_type=6, label=1, |
|||
has_default_value=False, default_value=float(0), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=209, |
|||
serialized_end=263, |
|||
) |
|||
|
|||
_ENVIRONMENTPARAMETERSPROTO = _descriptor.Descriptor( |
|||
name='EnvironmentParametersProto', |
|||
full_name='communicator_objects.EnvironmentParametersProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='float_parameters', full_name='communicator_objects.EnvironmentParametersProto.float_parameters', index=0, |
|||
number=1, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY, ], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=82, |
|||
serialized_end=263, |
|||
) |
|||
|
|||
_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY.containing_type = _ENVIRONMENTPARAMETERSPROTO |
|||
_ENVIRONMENTPARAMETERSPROTO.fields_by_name['float_parameters'].message_type = _ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY |
|||
DESCRIPTOR.message_types_by_name['EnvironmentParametersProto'] = _ENVIRONMENTPARAMETERSPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
EnvironmentParametersProto = _reflection.GeneratedProtocolMessageType('EnvironmentParametersProto', (_message.Message,), dict( |
|||
|
|||
FloatParametersEntry = _reflection.GeneratedProtocolMessageType('FloatParametersEntry', (_message.Message,), dict( |
|||
DESCRIPTOR = _ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY, |
|||
__module__ = 'communicator_objects.environment_parameters_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.EnvironmentParametersProto.FloatParametersEntry) |
|||
)) |
|||
, |
|||
DESCRIPTOR = _ENVIRONMENTPARAMETERSPROTO, |
|||
__module__ = 'communicator_objects.environment_parameters_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.EnvironmentParametersProto) |
|||
)) |
|||
_sym_db.RegisterMessage(EnvironmentParametersProto) |
|||
_sym_db.RegisterMessage(EnvironmentParametersProto.FloatParametersEntry) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY.has_options = True |
|||
_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/header.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/header.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n!communicator_objects/header.proto\x12\x14\x63ommunicator_objects\")\n\x06Header\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\tB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_HEADER = _descriptor.Descriptor( |
|||
name='Header', |
|||
full_name='communicator_objects.Header', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='status', full_name='communicator_objects.Header.status', index=0, |
|||
number=1, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='message', full_name='communicator_objects.Header.message', index=1, |
|||
number=2, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=59, |
|||
serialized_end=100, |
|||
) |
|||
|
|||
DESCRIPTOR.message_types_by_name['Header'] = _HEADER |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
Header = _reflection.GeneratedProtocolMessageType('Header', (_message.Message,), dict( |
|||
DESCRIPTOR = _HEADER, |
|||
__module__ = 'communicator_objects.header_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.Header) |
|||
)) |
|||
_sym_db.RegisterMessage(Header) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/resolution_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/resolution_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n+communicator_objects/resolution_proto.proto\x12\x14\x63ommunicator_objects\"D\n\x0fResolutionProto\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\x12\n\ngray_scale\x18\x03 \x01(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_RESOLUTIONPROTO = _descriptor.Descriptor( |
|||
name='ResolutionProto', |
|||
full_name='communicator_objects.ResolutionProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='width', full_name='communicator_objects.ResolutionProto.width', index=0, |
|||
number=1, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='height', full_name='communicator_objects.ResolutionProto.height', index=1, |
|||
number=2, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='gray_scale', full_name='communicator_objects.ResolutionProto.gray_scale', index=2, |
|||
number=3, type=8, cpp_type=7, label=1, |
|||
has_default_value=False, default_value=False, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=69, |
|||
serialized_end=137, |
|||
) |
|||
|
|||
DESCRIPTOR.message_types_by_name['ResolutionProto'] = _RESOLUTIONPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
ResolutionProto = _reflection.GeneratedProtocolMessageType('ResolutionProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _RESOLUTIONPROTO, |
|||
__module__ = 'communicator_objects.resolution_proto_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.ResolutionProto) |
|||
)) |
|||
_sym_db.RegisterMessage(ResolutionProto) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/space_type_proto.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf.internal import enum_type_wrapper |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import resolution_proto_pb2 as communicator__objects_dot_resolution__proto__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/space_type_proto.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n+communicator_objects/space_type_proto.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/resolution_proto.proto*.\n\x0eSpaceTypeProto\x12\x0c\n\x08\x64iscrete\x10\x00\x12\x0e\n\ncontinuous\x10\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,]) |
|||
|
|||
_SPACETYPEPROTO = _descriptor.EnumDescriptor( |
|||
name='SpaceTypeProto', |
|||
full_name='communicator_objects.SpaceTypeProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
values=[ |
|||
_descriptor.EnumValueDescriptor( |
|||
name='discrete', index=0, number=0, |
|||
options=None, |
|||
type=None), |
|||
_descriptor.EnumValueDescriptor( |
|||
name='continuous', index=1, number=1, |
|||
options=None, |
|||
type=None), |
|||
], |
|||
containing_type=None, |
|||
options=None, |
|||
serialized_start=114, |
|||
serialized_end=160, |
|||
) |
|||
_sym_db.RegisterEnumDescriptor(_SPACETYPEPROTO) |
|||
|
|||
SpaceTypeProto = enum_type_wrapper.EnumTypeWrapper(_SPACETYPEPROTO) |
|||
discrete = 0 |
|||
continuous = 1 |
|||
|
|||
|
|||
DESCRIPTOR.enum_types_by_name['SpaceTypeProto'] = _SPACETYPEPROTO |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_input.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import unity_rl_input_pb2 as communicator__objects_dot_unity__rl__input__pb2 |
|||
from communicator_objects import unity_rl_initialization_input_pb2 as communicator__objects_dot_unity__rl__initialization__input__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_input.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n&communicator_objects/unity_input.proto\x12\x14\x63ommunicator_objects\x1a)communicator_objects/unity_rl_input.proto\x1a\x38\x63ommunicator_objects/unity_rl_initialization_input.proto\"\xb0\x01\n\nUnityInput\x12\x34\n\x08rl_input\x18\x01 \x01(\x0b\x32\".communicator_objects.UnityRLInput\x12Q\n\x17rl_initialization_input\x18\x02 \x01(\x0b\x32\x30.communicator_objects.UnityRLInitializationInput\x12\x19\n\x11\x63ustom_data_input\x18\x03 \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_unity__rl__input__pb2.DESCRIPTOR,communicator__objects_dot_unity__rl__initialization__input__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYINPUT = _descriptor.Descriptor( |
|||
name='UnityInput', |
|||
full_name='communicator_objects.UnityInput', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='rl_input', full_name='communicator_objects.UnityInput.rl_input', index=0, |
|||
number=1, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='rl_initialization_input', full_name='communicator_objects.UnityInput.rl_initialization_input', index=1, |
|||
number=2, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='custom_data_input', full_name='communicator_objects.UnityInput.custom_data_input', index=2, |
|||
number=3, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=166, |
|||
serialized_end=342, |
|||
) |
|||
|
|||
_UNITYINPUT.fields_by_name['rl_input'].message_type = communicator__objects_dot_unity__rl__input__pb2._UNITYRLINPUT |
|||
_UNITYINPUT.fields_by_name['rl_initialization_input'].message_type = communicator__objects_dot_unity__rl__initialization__input__pb2._UNITYRLINITIALIZATIONINPUT |
|||
DESCRIPTOR.message_types_by_name['UnityInput'] = _UNITYINPUT |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityInput = _reflection.GeneratedProtocolMessageType('UnityInput', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYINPUT, |
|||
__module__ = 'communicator_objects.unity_input_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityInput) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityInput) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_message.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import unity_output_pb2 as communicator__objects_dot_unity__output__pb2 |
|||
from communicator_objects import unity_input_pb2 as communicator__objects_dot_unity__input__pb2 |
|||
from communicator_objects import header_pb2 as communicator__objects_dot_header__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_message.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n(communicator_objects/unity_message.proto\x12\x14\x63ommunicator_objects\x1a\'communicator_objects/unity_output.proto\x1a&communicator_objects/unity_input.proto\x1a!communicator_objects/header.proto\"\xac\x01\n\x0cUnityMessage\x12,\n\x06header\x18\x01 \x01(\x0b\x32\x1c.communicator_objects.Header\x12\x37\n\x0cunity_output\x18\x02 \x01(\x0b\x32!.communicator_objects.UnityOutput\x12\x35\n\x0bunity_input\x18\x03 \x01(\x0b\x32 .communicator_objects.UnityInputB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_unity__output__pb2.DESCRIPTOR,communicator__objects_dot_unity__input__pb2.DESCRIPTOR,communicator__objects_dot_header__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYMESSAGE = _descriptor.Descriptor( |
|||
name='UnityMessage', |
|||
full_name='communicator_objects.UnityMessage', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='header', full_name='communicator_objects.UnityMessage.header', index=0, |
|||
number=1, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='unity_output', full_name='communicator_objects.UnityMessage.unity_output', index=1, |
|||
number=2, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='unity_input', full_name='communicator_objects.UnityMessage.unity_input', index=2, |
|||
number=3, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=183, |
|||
serialized_end=355, |
|||
) |
|||
|
|||
_UNITYMESSAGE.fields_by_name['header'].message_type = communicator__objects_dot_header__pb2._HEADER |
|||
_UNITYMESSAGE.fields_by_name['unity_output'].message_type = communicator__objects_dot_unity__output__pb2._UNITYOUTPUT |
|||
_UNITYMESSAGE.fields_by_name['unity_input'].message_type = communicator__objects_dot_unity__input__pb2._UNITYINPUT |
|||
DESCRIPTOR.message_types_by_name['UnityMessage'] = _UNITYMESSAGE |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityMessage = _reflection.GeneratedProtocolMessageType('UnityMessage', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYMESSAGE, |
|||
__module__ = 'communicator_objects.unity_message_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityMessage) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityMessage) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_output.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import unity_rl_output_pb2 as communicator__objects_dot_unity__rl__output__pb2 |
|||
from communicator_objects import unity_rl_initialization_output_pb2 as communicator__objects_dot_unity__rl__initialization__output__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_output.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n\'communicator_objects/unity_output.proto\x12\x14\x63ommunicator_objects\x1a*communicator_objects/unity_rl_output.proto\x1a\x39\x63ommunicator_objects/unity_rl_initialization_output.proto\"\xb6\x01\n\x0bUnityOutput\x12\x36\n\trl_output\x18\x01 \x01(\x0b\x32#.communicator_objects.UnityRLOutput\x12S\n\x18rl_initialization_output\x18\x02 \x01(\x0b\x32\x31.communicator_objects.UnityRLInitializationOutput\x12\x1a\n\x12\x63ustom_data_output\x18\x03 \x01(\tB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_unity__rl__output__pb2.DESCRIPTOR,communicator__objects_dot_unity__rl__initialization__output__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYOUTPUT = _descriptor.Descriptor( |
|||
name='UnityOutput', |
|||
full_name='communicator_objects.UnityOutput', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='rl_output', full_name='communicator_objects.UnityOutput.rl_output', index=0, |
|||
number=1, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='rl_initialization_output', full_name='communicator_objects.UnityOutput.rl_initialization_output', index=1, |
|||
number=2, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='custom_data_output', full_name='communicator_objects.UnityOutput.custom_data_output', index=2, |
|||
number=3, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=169, |
|||
serialized_end=351, |
|||
) |
|||
|
|||
_UNITYOUTPUT.fields_by_name['rl_output'].message_type = communicator__objects_dot_unity__rl__output__pb2._UNITYRLOUTPUT |
|||
_UNITYOUTPUT.fields_by_name['rl_initialization_output'].message_type = communicator__objects_dot_unity__rl__initialization__output__pb2._UNITYRLINITIALIZATIONOUTPUT |
|||
DESCRIPTOR.message_types_by_name['UnityOutput'] = _UNITYOUTPUT |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityOutput = _reflection.GeneratedProtocolMessageType('UnityOutput', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYOUTPUT, |
|||
__module__ = 'communicator_objects.unity_output_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityOutput) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityOutput) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_rl_initialization_input.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_rl_initialization_input.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n8communicator_objects/unity_rl_initialization_input.proto\x12\x14\x63ommunicator_objects\"*\n\x1aUnityRLInitializationInput\x12\x0c\n\x04seed\x18\x01 \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYRLINITIALIZATIONINPUT = _descriptor.Descriptor( |
|||
name='UnityRLInitializationInput', |
|||
full_name='communicator_objects.UnityRLInitializationInput', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='seed', full_name='communicator_objects.UnityRLInitializationInput.seed', index=0, |
|||
number=1, type=5, cpp_type=1, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=82, |
|||
serialized_end=124, |
|||
) |
|||
|
|||
DESCRIPTOR.message_types_by_name['UnityRLInitializationInput'] = _UNITYRLINITIALIZATIONINPUT |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityRLInitializationInput = _reflection.GeneratedProtocolMessageType('UnityRLInitializationInput', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYRLINITIALIZATIONINPUT, |
|||
__module__ = 'communicator_objects.unity_rl_initialization_input_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInitializationInput) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityRLInitializationInput) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_rl_initialization_output.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import brain_parameters_proto_pb2 as communicator__objects_dot_brain__parameters__proto__pb2 |
|||
from communicator_objects import environment_parameters_proto_pb2 as communicator__objects_dot_environment__parameters__proto__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_rl_initialization_output.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n9communicator_objects/unity_rl_initialization_output.proto\x12\x14\x63ommunicator_objects\x1a\x31\x63ommunicator_objects/brain_parameters_proto.proto\x1a\x37\x63ommunicator_objects/environment_parameters_proto.proto\"\xe6\x01\n\x1bUnityRLInitializationOutput\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08log_path\x18\x03 \x01(\t\x12\x44\n\x10\x62rain_parameters\x18\x05 \x03(\x0b\x32*.communicator_objects.BrainParametersProto\x12P\n\x16\x65nvironment_parameters\x18\x06 \x01(\x0b\x32\x30.communicator_objects.EnvironmentParametersProtoB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_brain__parameters__proto__pb2.DESCRIPTOR,communicator__objects_dot_environment__parameters__proto__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYRLINITIALIZATIONOUTPUT = _descriptor.Descriptor( |
|||
name='UnityRLInitializationOutput', |
|||
full_name='communicator_objects.UnityRLInitializationOutput', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='name', full_name='communicator_objects.UnityRLInitializationOutput.name', index=0, |
|||
number=1, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='version', full_name='communicator_objects.UnityRLInitializationOutput.version', index=1, |
|||
number=2, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='log_path', full_name='communicator_objects.UnityRLInitializationOutput.log_path', index=2, |
|||
number=3, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='brain_parameters', full_name='communicator_objects.UnityRLInitializationOutput.brain_parameters', index=3, |
|||
number=5, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='environment_parameters', full_name='communicator_objects.UnityRLInitializationOutput.environment_parameters', index=4, |
|||
number=6, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=192, |
|||
serialized_end=422, |
|||
) |
|||
|
|||
_UNITYRLINITIALIZATIONOUTPUT.fields_by_name['brain_parameters'].message_type = communicator__objects_dot_brain__parameters__proto__pb2._BRAINPARAMETERSPROTO |
|||
_UNITYRLINITIALIZATIONOUTPUT.fields_by_name['environment_parameters'].message_type = communicator__objects_dot_environment__parameters__proto__pb2._ENVIRONMENTPARAMETERSPROTO |
|||
DESCRIPTOR.message_types_by_name['UnityRLInitializationOutput'] = _UNITYRLINITIALIZATIONOUTPUT |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityRLInitializationOutput = _reflection.GeneratedProtocolMessageType('UnityRLInitializationOutput', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYRLINITIALIZATIONOUTPUT, |
|||
__module__ = 'communicator_objects.unity_rl_initialization_output_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInitializationOutput) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityRLInitializationOutput) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_rl_input.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import agent_action_proto_pb2 as communicator__objects_dot_agent__action__proto__pb2 |
|||
from communicator_objects import environment_parameters_proto_pb2 as communicator__objects_dot_environment__parameters__proto__pb2 |
|||
from communicator_objects import command_proto_pb2 as communicator__objects_dot_command__proto__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_rl_input.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n)communicator_objects/unity_rl_input.proto\x12\x14\x63ommunicator_objects\x1a-communicator_objects/agent_action_proto.proto\x1a\x37\x63ommunicator_objects/environment_parameters_proto.proto\x1a(communicator_objects/command_proto.proto\"\xb4\x03\n\x0cUnityRLInput\x12K\n\ragent_actions\x18\x01 \x03(\x0b\x32\x34.communicator_objects.UnityRLInput.AgentActionsEntry\x12P\n\x16\x65nvironment_parameters\x18\x02 \x01(\x0b\x32\x30.communicator_objects.EnvironmentParametersProto\x12\x13\n\x0bis_training\x18\x03 \x01(\x08\x12\x33\n\x07\x63ommand\x18\x04 \x01(\x0e\x32\".communicator_objects.CommandProto\x1aM\n\x14ListAgentActionProto\x12\x35\n\x05value\x18\x01 \x03(\x0b\x32&.communicator_objects.AgentActionProto\x1al\n\x11\x41gentActionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.communicator_objects.UnityRLInput.ListAgentActionProto:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_agent__action__proto__pb2.DESCRIPTOR,communicator__objects_dot_environment__parameters__proto__pb2.DESCRIPTOR,communicator__objects_dot_command__proto__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYRLINPUT_LISTAGENTACTIONPROTO = _descriptor.Descriptor( |
|||
name='ListAgentActionProto', |
|||
full_name='communicator_objects.UnityRLInput.ListAgentActionProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='value', full_name='communicator_objects.UnityRLInput.ListAgentActionProto.value', index=0, |
|||
number=1, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=463, |
|||
serialized_end=540, |
|||
) |
|||
|
|||
_UNITYRLINPUT_AGENTACTIONSENTRY = _descriptor.Descriptor( |
|||
name='AgentActionsEntry', |
|||
full_name='communicator_objects.UnityRLInput.AgentActionsEntry', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='key', full_name='communicator_objects.UnityRLInput.AgentActionsEntry.key', index=0, |
|||
number=1, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='value', full_name='communicator_objects.UnityRLInput.AgentActionsEntry.value', index=1, |
|||
number=2, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=542, |
|||
serialized_end=650, |
|||
) |
|||
|
|||
_UNITYRLINPUT = _descriptor.Descriptor( |
|||
name='UnityRLInput', |
|||
full_name='communicator_objects.UnityRLInput', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='agent_actions', full_name='communicator_objects.UnityRLInput.agent_actions', index=0, |
|||
number=1, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='environment_parameters', full_name='communicator_objects.UnityRLInput.environment_parameters', index=1, |
|||
number=2, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='is_training', full_name='communicator_objects.UnityRLInput.is_training', index=2, |
|||
number=3, type=8, cpp_type=7, label=1, |
|||
has_default_value=False, default_value=False, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='command', full_name='communicator_objects.UnityRLInput.command', index=3, |
|||
number=4, type=14, cpp_type=8, label=1, |
|||
has_default_value=False, default_value=0, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[_UNITYRLINPUT_LISTAGENTACTIONPROTO, _UNITYRLINPUT_AGENTACTIONSENTRY, ], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=214, |
|||
serialized_end=650, |
|||
) |
|||
|
|||
_UNITYRLINPUT_LISTAGENTACTIONPROTO.fields_by_name['value'].message_type = communicator__objects_dot_agent__action__proto__pb2._AGENTACTIONPROTO |
|||
_UNITYRLINPUT_LISTAGENTACTIONPROTO.containing_type = _UNITYRLINPUT |
|||
_UNITYRLINPUT_AGENTACTIONSENTRY.fields_by_name['value'].message_type = _UNITYRLINPUT_LISTAGENTACTIONPROTO |
|||
_UNITYRLINPUT_AGENTACTIONSENTRY.containing_type = _UNITYRLINPUT |
|||
_UNITYRLINPUT.fields_by_name['agent_actions'].message_type = _UNITYRLINPUT_AGENTACTIONSENTRY |
|||
_UNITYRLINPUT.fields_by_name['environment_parameters'].message_type = communicator__objects_dot_environment__parameters__proto__pb2._ENVIRONMENTPARAMETERSPROTO |
|||
_UNITYRLINPUT.fields_by_name['command'].enum_type = communicator__objects_dot_command__proto__pb2._COMMANDPROTO |
|||
DESCRIPTOR.message_types_by_name['UnityRLInput'] = _UNITYRLINPUT |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityRLInput = _reflection.GeneratedProtocolMessageType('UnityRLInput', (_message.Message,), dict( |
|||
|
|||
ListAgentActionProto = _reflection.GeneratedProtocolMessageType('ListAgentActionProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYRLINPUT_LISTAGENTACTIONPROTO, |
|||
__module__ = 'communicator_objects.unity_rl_input_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInput.ListAgentActionProto) |
|||
)) |
|||
, |
|||
|
|||
AgentActionsEntry = _reflection.GeneratedProtocolMessageType('AgentActionsEntry', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYRLINPUT_AGENTACTIONSENTRY, |
|||
__module__ = 'communicator_objects.unity_rl_input_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInput.AgentActionsEntry) |
|||
)) |
|||
, |
|||
DESCRIPTOR = _UNITYRLINPUT, |
|||
__module__ = 'communicator_objects.unity_rl_input_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInput) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityRLInput) |
|||
_sym_db.RegisterMessage(UnityRLInput.ListAgentActionProto) |
|||
_sym_db.RegisterMessage(UnityRLInput.AgentActionsEntry) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
_UNITYRLINPUT_AGENTACTIONSENTRY.has_options = True |
|||
_UNITYRLINPUT_AGENTACTIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_rl_output.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import agent_info_proto_pb2 as communicator__objects_dot_agent__info__proto__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_rl_output.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n*communicator_objects/unity_rl_output.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/agent_info_proto.proto\"\xa3\x02\n\rUnityRLOutput\x12\x13\n\x0bglobal_done\x18\x01 \x01(\x08\x12G\n\nagentInfos\x18\x02 \x03(\x0b\x32\x33.communicator_objects.UnityRLOutput.AgentInfosEntry\x1aI\n\x12ListAgentInfoProto\x12\x33\n\x05value\x18\x01 \x03(\x0b\x32$.communicator_objects.AgentInfoProto\x1ai\n\x0f\x41gentInfosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.communicator_objects.UnityRLOutput.ListAgentInfoProto:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_agent__info__proto__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
|
|||
_UNITYRLOUTPUT_LISTAGENTINFOPROTO = _descriptor.Descriptor( |
|||
name='ListAgentInfoProto', |
|||
full_name='communicator_objects.UnityRLOutput.ListAgentInfoProto', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='value', full_name='communicator_objects.UnityRLOutput.ListAgentInfoProto.value', index=0, |
|||
number=1, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=225, |
|||
serialized_end=298, |
|||
) |
|||
|
|||
_UNITYRLOUTPUT_AGENTINFOSENTRY = _descriptor.Descriptor( |
|||
name='AgentInfosEntry', |
|||
full_name='communicator_objects.UnityRLOutput.AgentInfosEntry', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='key', full_name='communicator_objects.UnityRLOutput.AgentInfosEntry.key', index=0, |
|||
number=1, type=9, cpp_type=9, label=1, |
|||
has_default_value=False, default_value=_b("").decode('utf-8'), |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='value', full_name='communicator_objects.UnityRLOutput.AgentInfosEntry.value', index=1, |
|||
number=2, type=11, cpp_type=10, label=1, |
|||
has_default_value=False, default_value=None, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[], |
|||
enum_types=[ |
|||
], |
|||
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=300, |
|||
serialized_end=405, |
|||
) |
|||
|
|||
_UNITYRLOUTPUT = _descriptor.Descriptor( |
|||
name='UnityRLOutput', |
|||
full_name='communicator_objects.UnityRLOutput', |
|||
filename=None, |
|||
file=DESCRIPTOR, |
|||
containing_type=None, |
|||
fields=[ |
|||
_descriptor.FieldDescriptor( |
|||
name='global_done', full_name='communicator_objects.UnityRLOutput.global_done', index=0, |
|||
number=1, type=8, cpp_type=7, label=1, |
|||
has_default_value=False, default_value=False, |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
_descriptor.FieldDescriptor( |
|||
name='agentInfos', full_name='communicator_objects.UnityRLOutput.agentInfos', index=1, |
|||
number=2, type=11, cpp_type=10, label=3, |
|||
has_default_value=False, default_value=[], |
|||
message_type=None, enum_type=None, containing_type=None, |
|||
is_extension=False, extension_scope=None, |
|||
options=None, file=DESCRIPTOR), |
|||
], |
|||
extensions=[ |
|||
], |
|||
nested_types=[_UNITYRLOUTPUT_LISTAGENTINFOPROTO, _UNITYRLOUTPUT_AGENTINFOSENTRY, ], |
|||
enum_types=[ |
|||
], |
|||
options=None, |
|||
is_extendable=False, |
|||
syntax='proto3', |
|||
extension_ranges=[], |
|||
oneofs=[ |
|||
], |
|||
serialized_start=114, |
|||
serialized_end=405, |
|||
) |
|||
|
|||
_UNITYRLOUTPUT_LISTAGENTINFOPROTO.fields_by_name['value'].message_type = communicator__objects_dot_agent__info__proto__pb2._AGENTINFOPROTO |
|||
_UNITYRLOUTPUT_LISTAGENTINFOPROTO.containing_type = _UNITYRLOUTPUT |
|||
_UNITYRLOUTPUT_AGENTINFOSENTRY.fields_by_name['value'].message_type = _UNITYRLOUTPUT_LISTAGENTINFOPROTO |
|||
_UNITYRLOUTPUT_AGENTINFOSENTRY.containing_type = _UNITYRLOUTPUT |
|||
_UNITYRLOUTPUT.fields_by_name['agentInfos'].message_type = _UNITYRLOUTPUT_AGENTINFOSENTRY |
|||
DESCRIPTOR.message_types_by_name['UnityRLOutput'] = _UNITYRLOUTPUT |
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
UnityRLOutput = _reflection.GeneratedProtocolMessageType('UnityRLOutput', (_message.Message,), dict( |
|||
|
|||
ListAgentInfoProto = _reflection.GeneratedProtocolMessageType('ListAgentInfoProto', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYRLOUTPUT_LISTAGENTINFOPROTO, |
|||
__module__ = 'communicator_objects.unity_rl_output_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLOutput.ListAgentInfoProto) |
|||
)) |
|||
, |
|||
|
|||
AgentInfosEntry = _reflection.GeneratedProtocolMessageType('AgentInfosEntry', (_message.Message,), dict( |
|||
DESCRIPTOR = _UNITYRLOUTPUT_AGENTINFOSENTRY, |
|||
__module__ = 'communicator_objects.unity_rl_output_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLOutput.AgentInfosEntry) |
|||
)) |
|||
, |
|||
DESCRIPTOR = _UNITYRLOUTPUT, |
|||
__module__ = 'communicator_objects.unity_rl_output_pb2' |
|||
# @@protoc_insertion_point(class_scope:communicator_objects.UnityRLOutput) |
|||
)) |
|||
_sym_db.RegisterMessage(UnityRLOutput) |
|||
_sym_db.RegisterMessage(UnityRLOutput.ListAgentInfoProto) |
|||
_sym_db.RegisterMessage(UnityRLOutput.AgentInfosEntry) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
_UNITYRLOUTPUT_AGENTINFOSENTRY.has_options = True |
|||
_UNITYRLOUTPUT_AGENTINFOSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) |
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|||
# source: communicator_objects/unity_to_external.proto |
|||
|
|||
import sys |
|||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) |
|||
from google.protobuf import descriptor as _descriptor |
|||
from google.protobuf import message as _message |
|||
from google.protobuf import reflection as _reflection |
|||
from google.protobuf import symbol_database as _symbol_database |
|||
from google.protobuf import descriptor_pb2 |
|||
# @@protoc_insertion_point(imports) |
|||
|
|||
_sym_db = _symbol_database.Default() |
|||
|
|||
|
|||
from communicator_objects import unity_message_pb2 as communicator__objects_dot_unity__message__pb2 |
|||
|
|||
|
|||
DESCRIPTOR = _descriptor.FileDescriptor( |
|||
name='communicator_objects/unity_to_external.proto', |
|||
package='communicator_objects', |
|||
syntax='proto3', |
|||
serialized_pb=_b('\n,communicator_objects/unity_to_external.proto\x12\x14\x63ommunicator_objects\x1a(communicator_objects/unity_message.proto2g\n\x0fUnityToExternal\x12T\n\x08\x45xchange\x12\".communicator_objects.UnityMessage\x1a\".communicator_objects.UnityMessage\"\x00\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') |
|||
, |
|||
dependencies=[communicator__objects_dot_unity__message__pb2.DESCRIPTOR,]) |
|||
|
|||
|
|||
|
|||
_sym_db.RegisterFileDescriptor(DESCRIPTOR) |
|||
|
|||
|
|||
DESCRIPTOR.has_options = True |
|||
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) |
|||
|
|||
_UNITYTOEXTERNAL = _descriptor.ServiceDescriptor( |
|||
name='UnityToExternal', |
|||
full_name='communicator_objects.UnityToExternal', |
|||
file=DESCRIPTOR, |
|||
index=0, |
|||
options=None, |
|||
serialized_start=112, |
|||
serialized_end=215, |
|||
methods=[ |
|||
_descriptor.MethodDescriptor( |
|||
name='Exchange', |
|||
full_name='communicator_objects.UnityToExternal.Exchange', |
|||
index=0, |
|||
containing_service=None, |
|||
input_type=communicator__objects_dot_unity__message__pb2._UNITYMESSAGE, |
|||
output_type=communicator__objects_dot_unity__message__pb2._UNITYMESSAGE, |
|||
options=None, |
|||
), |
|||
]) |
|||
_sym_db.RegisterServiceDescriptor(_UNITYTOEXTERNAL) |
|||
|
|||
DESCRIPTOR.services_by_name['UnityToExternal'] = _UNITYTOEXTERNAL |
|||
|
|||
# @@protoc_insertion_point(module_scope) |
|
|||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! |
|||
import grpc |
|||
|
|||
from communicator_objects import unity_message_pb2 as communicator__objects_dot_unity__message__pb2 |
|||
|
|||
|
|||
class UnityToExternalStub(object): |
|||
# missing associated documentation comment in .proto file |
|||
pass |
|||
|
|||
def __init__(self, channel): |
|||
"""Constructor. |
|||
|
|||
Args: |
|||
channel: A grpc.Channel. |
|||
""" |
|||
self.Exchange = channel.unary_unary( |
|||
'/communicator_objects.UnityToExternal/Exchange', |
|||
request_serializer=communicator__objects_dot_unity__message__pb2.UnityMessage.SerializeToString, |
|||
response_deserializer=communicator__objects_dot_unity__message__pb2.UnityMessage.FromString, |
|||
) |
|||
|
|||
|
|||
class UnityToExternalServicer(object): |
|||
# missing associated documentation comment in .proto file |
|||
pass |
|||
|
|||
def Exchange(self, request, context): |
|||
"""Sends the academy parameters |
|||
""" |
|||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
|||
context.set_details('Method not implemented!') |
|||
raise NotImplementedError('Method not implemented!') |
|||
|
|||
|
|||
def add_UnityToExternalServicer_to_server(servicer, server): |
|||
rpc_method_handlers = { |
|||
'Exchange': grpc.unary_unary_rpc_method_handler( |
|||
servicer.Exchange, |
|||
request_deserializer=communicator__objects_dot_unity__message__pb2.UnityMessage.FromString, |
|||
response_serializer=communicator__objects_dot_unity__message__pb2.UnityMessage.SerializeToString, |
|||
), |
|||
} |
|||
generic_handler = grpc.method_handlers_generic_handler( |
|||
'communicator_objects.UnityToExternal', rpc_method_handlers) |
|||
server.add_generic_rpc_handlers((generic_handler,)) |
1001
unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 0836ffd04a4924861a2d58aa4b111937 |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 1 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
DefaultValueInitialized: true |
|||
- first: |
|||
Windows Store Apps: WindowsStoreApps |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: cbf24ddeec4054edc9ad4c8295556878 |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 1 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
DefaultValueInitialized: true |
|||
- first: |
|||
Windows Store Apps: WindowsStoreApps |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 9502ce7e38c5947dba996570732b6e9f |
|||
timeCreated: 1521661784 |
|||
licenseType: Free |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 1 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
DefaultValueInitialized: true |
|||
- first: |
|||
Windows Store Apps: WindowsStoreApps |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: b8022add2e5264884a117894eeaf9809 |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 50c3602c6f6244621861928757e31463 |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ba192b1e561564e1583e0a87334f8682 |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: c9d901caf522f4dc5815786fa764a5da |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
'': Any |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
Exclude Android: 1 |
|||
Exclude Editor: 0 |
|||
Exclude Linux: 1 |
|||
Exclude Linux64: 0 |
|||
Exclude LinuxUniversal: 0 |
|||
Exclude OSXUniversal: 1 |
|||
Exclude Win: 0 |
|||
Exclude Win64: 0 |
|||
Exclude iOS: 1 |
|||
- first: |
|||
Android: Android |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: ARMv7 |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 0 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
DefaultValueInitialized: true |
|||
OS: Linux |
|||
- first: |
|||
Facebook: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Facebook: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Linux |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Standalone: Linux64 |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
- first: |
|||
Standalone: LinuxUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
- first: |
|||
Standalone: OSXUniversal |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Standalone: Win |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win64 |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
iPhone: iOS |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
AddToEmbeddedBinaries: false |
|||
CompileFlags: |
|||
FrameworkDependencies: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7dfb52431a6d941c89758cf0a217e3ab |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
'': Any |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
Exclude Android: 1 |
|||
Exclude Editor: 0 |
|||
Exclude Linux: 0 |
|||
Exclude Linux64: 1 |
|||
Exclude LinuxUniversal: 0 |
|||
Exclude OSXUniversal: 1 |
|||
Exclude Win: 0 |
|||
Exclude Win64: 0 |
|||
Exclude iOS: 1 |
|||
- first: |
|||
Android: Android |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: ARMv7 |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 0 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86 |
|||
DefaultValueInitialized: true |
|||
OS: Linux |
|||
- first: |
|||
Facebook: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Facebook: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Linux |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86 |
|||
- first: |
|||
Standalone: Linux64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Standalone: LinuxUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86 |
|||
- first: |
|||
Standalone: OSXUniversal |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Standalone: Win |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win64 |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
iPhone: iOS |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
AddToEmbeddedBinaries: false |
|||
CompileFlags: |
|||
FrameworkDependencies: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: f43fa6e62fb4c4105b270be1ae7bbbfd |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 55aee008fb6a3411aa96f2f9911f9207 |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 7eeb863bd08ba4388829c23da03a714f |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
'': Any |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
Exclude Android: 1 |
|||
Exclude Editor: 0 |
|||
Exclude Linux: 1 |
|||
Exclude Linux64: 1 |
|||
Exclude LinuxUniversal: 1 |
|||
Exclude OSXUniversal: 0 |
|||
Exclude Win: 1 |
|||
Exclude Win64: 1 |
|||
Exclude iOS: 1 |
|||
- first: |
|||
'': OSXIntel |
|||
second: |
|||
enabled: 1 |
|||
settings: {} |
|||
- first: |
|||
'': OSXIntel64 |
|||
second: |
|||
enabled: 1 |
|||
settings: {} |
|||
- first: |
|||
Android: Android |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: ARMv7 |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 0 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
DefaultValueInitialized: true |
|||
OS: OSX |
|||
- first: |
|||
Facebook: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Facebook: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Linux |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: x86 |
|||
- first: |
|||
Standalone: Linux64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: x86_64 |
|||
- first: |
|||
Standalone: OSXUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
iPhone: iOS |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
AddToEmbeddedBinaries: false |
|||
CompileFlags: |
|||
FrameworkDependencies: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: a961485c3484a4002ac4961a8481f6cc |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: af9f9f367bbc543b8ba41e58dcdd6e66 |
|||
folderAsset: yes |
|||
timeCreated: 1521595360 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: f4d9429fe43154fbd9d158c129e0ff33 |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
'': Any |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
Exclude Android: 1 |
|||
Exclude Editor: 0 |
|||
Exclude Linux: 0 |
|||
Exclude Linux64: 0 |
|||
Exclude LinuxUniversal: 0 |
|||
Exclude OSXUniversal: 0 |
|||
Exclude Win: 1 |
|||
Exclude Win64: 0 |
|||
Exclude iOS: 1 |
|||
- first: |
|||
Android: Android |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: ARMv7 |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 0 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
DefaultValueInitialized: true |
|||
OS: Windows |
|||
- first: |
|||
Facebook: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Facebook: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Linux |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86 |
|||
- first: |
|||
Standalone: Linux64 |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
- first: |
|||
Standalone: LinuxUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: OSXUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Standalone: Win64 |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
iPhone: iOS |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
AddToEmbeddedBinaries: false |
|||
CompileFlags: |
|||
FrameworkDependencies: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: d74134114def74fb4ae781c015deaa95 |
|||
PluginImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
iconMap: {} |
|||
executionOrder: {} |
|||
isPreloaded: 0 |
|||
isOverridable: 0 |
|||
platformData: |
|||
- first: |
|||
'': Any |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
Exclude Android: 1 |
|||
Exclude Editor: 0 |
|||
Exclude Linux: 0 |
|||
Exclude Linux64: 0 |
|||
Exclude LinuxUniversal: 0 |
|||
Exclude OSXUniversal: 0 |
|||
Exclude Win: 0 |
|||
Exclude Win64: 1 |
|||
Exclude iOS: 1 |
|||
- first: |
|||
Android: Android |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: ARMv7 |
|||
- first: |
|||
Any: |
|||
second: |
|||
enabled: 0 |
|||
settings: {} |
|||
- first: |
|||
Editor: Editor |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86 |
|||
DefaultValueInitialized: true |
|||
OS: Windows |
|||
- first: |
|||
Facebook: Win |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Facebook: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
Standalone: Linux |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86 |
|||
- first: |
|||
Standalone: Linux64 |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: x86_64 |
|||
- first: |
|||
Standalone: LinuxUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: OSXUniversal |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win |
|||
second: |
|||
enabled: 1 |
|||
settings: |
|||
CPU: AnyCPU |
|||
- first: |
|||
Standalone: Win64 |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
CPU: None |
|||
- first: |
|||
iPhone: iOS |
|||
second: |
|||
enabled: 0 |
|||
settings: |
|||
AddToEmbeddedBinaries: false |
|||
CompileFlags: |
|||
FrameworkDependencies: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/agent_action_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/agent_action_proto.proto</summary>
|
|||
public static partial class AgentActionProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/agent_action_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static AgentActionProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"Ci1jb21tdW5pY2F0b3Jfb2JqZWN0cy9hZ2VudF9hY3Rpb25fcHJvdG8ucHJv", |
|||
"dG8SFGNvbW11bmljYXRvcl9vYmplY3RzIlIKEEFnZW50QWN0aW9uUHJvdG8S", |
|||
"FgoOdmVjdG9yX2FjdGlvbnMYASADKAISFAoMdGV4dF9hY3Rpb25zGAIgASgJ", |
|||
"EhAKCG1lbW9yaWVzGAMgAygCQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JP", |
|||
"YmplY3RzYgZwcm90bzM=")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentActionProto), global::MLAgents.CommunicatorObjects.AgentActionProto.Parser, new[]{ "VectorActions", "TextActions", "Memories" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class AgentActionProto : pb::IMessage<AgentActionProto> { |
|||
private static readonly pb::MessageParser<AgentActionProto> _parser = new pb::MessageParser<AgentActionProto>(() => new AgentActionProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<AgentActionProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.AgentActionProtoReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentActionProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentActionProto(AgentActionProto other) : this() { |
|||
vectorActions_ = other.vectorActions_.Clone(); |
|||
textActions_ = other.textActions_; |
|||
memories_ = other.memories_.Clone(); |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentActionProto Clone() { |
|||
return new AgentActionProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_actions" field.</summary>
|
|||
public const int VectorActionsFieldNumber = 1; |
|||
private static readonly pb::FieldCodec<float> _repeated_vectorActions_codec |
|||
= pb::FieldCodec.ForFloat(10); |
|||
private readonly pbc::RepeatedField<float> vectorActions_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> VectorActions { |
|||
get { return vectorActions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "text_actions" field.</summary>
|
|||
public const int TextActionsFieldNumber = 2; |
|||
private string textActions_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string TextActions { |
|||
get { return textActions_; } |
|||
set { |
|||
textActions_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "memories" field.</summary>
|
|||
public const int MemoriesFieldNumber = 3; |
|||
private static readonly pb::FieldCodec<float> _repeated_memories_codec |
|||
= pb::FieldCodec.ForFloat(26); |
|||
private readonly pbc::RepeatedField<float> memories_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> Memories { |
|||
get { return memories_; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as AgentActionProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(AgentActionProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if(!vectorActions_.Equals(other.vectorActions_)) return false; |
|||
if (TextActions != other.TextActions) return false; |
|||
if(!memories_.Equals(other.memories_)) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
hash ^= vectorActions_.GetHashCode(); |
|||
if (TextActions.Length != 0) hash ^= TextActions.GetHashCode(); |
|||
hash ^= memories_.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
vectorActions_.WriteTo(output, _repeated_vectorActions_codec); |
|||
if (TextActions.Length != 0) { |
|||
output.WriteRawTag(18); |
|||
output.WriteString(TextActions); |
|||
} |
|||
memories_.WriteTo(output, _repeated_memories_codec); |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
size += vectorActions_.CalculateSize(_repeated_vectorActions_codec); |
|||
if (TextActions.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(TextActions); |
|||
} |
|||
size += memories_.CalculateSize(_repeated_memories_codec); |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(AgentActionProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
vectorActions_.Add(other.vectorActions_); |
|||
if (other.TextActions.Length != 0) { |
|||
TextActions = other.TextActions; |
|||
} |
|||
memories_.Add(other.memories_); |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 10: |
|||
case 13: { |
|||
vectorActions_.AddEntriesFrom(input, _repeated_vectorActions_codec); |
|||
break; |
|||
} |
|||
case 18: { |
|||
TextActions = input.ReadString(); |
|||
break; |
|||
} |
|||
case 26: |
|||
case 29: { |
|||
memories_.AddEntriesFrom(input, _repeated_memories_codec); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: 93eec67e32dc3484ca9b8e3ea98909c7 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/agent_info_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/agent_info_proto.proto</summary>
|
|||
public static partial class AgentInfoProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/agent_info_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static AgentInfoProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"Citjb21tdW5pY2F0b3Jfb2JqZWN0cy9hZ2VudF9pbmZvX3Byb3RvLnByb3Rv", |
|||
"EhRjb21tdW5pY2F0b3Jfb2JqZWN0cyL9AQoOQWdlbnRJbmZvUHJvdG8SIgoa", |
|||
"c3RhY2tlZF92ZWN0b3Jfb2JzZXJ2YXRpb24YASADKAISGwoTdmlzdWFsX29i", |
|||
"c2VydmF0aW9ucxgCIAMoDBIYChB0ZXh0X29ic2VydmF0aW9uGAMgASgJEh0K", |
|||
"FXN0b3JlZF92ZWN0b3JfYWN0aW9ucxgEIAMoAhIbChNzdG9yZWRfdGV4dF9h", |
|||
"Y3Rpb25zGAUgASgJEhAKCG1lbW9yaWVzGAYgAygCEg4KBnJld2FyZBgHIAEo", |
|||
"AhIMCgRkb25lGAggASgIEhgKEG1heF9zdGVwX3JlYWNoZWQYCSABKAgSCgoC", |
|||
"aWQYCiABKAVCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnBy", |
|||
"b3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentInfoProto), global::MLAgents.CommunicatorObjects.AgentInfoProto.Parser, new[]{ "StackedVectorObservation", "VisualObservations", "TextObservation", "StoredVectorActions", "StoredTextActions", "Memories", "Reward", "Done", "MaxStepReached", "Id" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class AgentInfoProto : pb::IMessage<AgentInfoProto> { |
|||
private static readonly pb::MessageParser<AgentInfoProto> _parser = new pb::MessageParser<AgentInfoProto>(() => new AgentInfoProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<AgentInfoProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.AgentInfoProtoReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentInfoProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentInfoProto(AgentInfoProto other) : this() { |
|||
stackedVectorObservation_ = other.stackedVectorObservation_.Clone(); |
|||
visualObservations_ = other.visualObservations_.Clone(); |
|||
textObservation_ = other.textObservation_; |
|||
storedVectorActions_ = other.storedVectorActions_.Clone(); |
|||
storedTextActions_ = other.storedTextActions_; |
|||
memories_ = other.memories_.Clone(); |
|||
reward_ = other.reward_; |
|||
done_ = other.done_; |
|||
maxStepReached_ = other.maxStepReached_; |
|||
id_ = other.id_; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public AgentInfoProto Clone() { |
|||
return new AgentInfoProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "stacked_vector_observation" field.</summary>
|
|||
public const int StackedVectorObservationFieldNumber = 1; |
|||
private static readonly pb::FieldCodec<float> _repeated_stackedVectorObservation_codec |
|||
= pb::FieldCodec.ForFloat(10); |
|||
private readonly pbc::RepeatedField<float> stackedVectorObservation_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> StackedVectorObservation { |
|||
get { return stackedVectorObservation_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "visual_observations" field.</summary>
|
|||
public const int VisualObservationsFieldNumber = 2; |
|||
private static readonly pb::FieldCodec<pb::ByteString> _repeated_visualObservations_codec |
|||
= pb::FieldCodec.ForBytes(18); |
|||
private readonly pbc::RepeatedField<pb::ByteString> visualObservations_ = new pbc::RepeatedField<pb::ByteString>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<pb::ByteString> VisualObservations { |
|||
get { return visualObservations_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "text_observation" field.</summary>
|
|||
public const int TextObservationFieldNumber = 3; |
|||
private string textObservation_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string TextObservation { |
|||
get { return textObservation_; } |
|||
set { |
|||
textObservation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "stored_vector_actions" field.</summary>
|
|||
public const int StoredVectorActionsFieldNumber = 4; |
|||
private static readonly pb::FieldCodec<float> _repeated_storedVectorActions_codec |
|||
= pb::FieldCodec.ForFloat(34); |
|||
private readonly pbc::RepeatedField<float> storedVectorActions_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> StoredVectorActions { |
|||
get { return storedVectorActions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "stored_text_actions" field.</summary>
|
|||
public const int StoredTextActionsFieldNumber = 5; |
|||
private string storedTextActions_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string StoredTextActions { |
|||
get { return storedTextActions_; } |
|||
set { |
|||
storedTextActions_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "memories" field.</summary>
|
|||
public const int MemoriesFieldNumber = 6; |
|||
private static readonly pb::FieldCodec<float> _repeated_memories_codec |
|||
= pb::FieldCodec.ForFloat(50); |
|||
private readonly pbc::RepeatedField<float> memories_ = new pbc::RepeatedField<float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<float> Memories { |
|||
get { return memories_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "reward" field.</summary>
|
|||
public const int RewardFieldNumber = 7; |
|||
private float reward_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public float Reward { |
|||
get { return reward_; } |
|||
set { |
|||
reward_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "done" field.</summary>
|
|||
public const int DoneFieldNumber = 8; |
|||
private bool done_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Done { |
|||
get { return done_; } |
|||
set { |
|||
done_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "max_step_reached" field.</summary>
|
|||
public const int MaxStepReachedFieldNumber = 9; |
|||
private bool maxStepReached_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool MaxStepReached { |
|||
get { return maxStepReached_; } |
|||
set { |
|||
maxStepReached_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "id" field.</summary>
|
|||
public const int IdFieldNumber = 10; |
|||
private int id_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int Id { |
|||
get { return id_; } |
|||
set { |
|||
id_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as AgentInfoProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(AgentInfoProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if(!stackedVectorObservation_.Equals(other.stackedVectorObservation_)) return false; |
|||
if(!visualObservations_.Equals(other.visualObservations_)) return false; |
|||
if (TextObservation != other.TextObservation) return false; |
|||
if(!storedVectorActions_.Equals(other.storedVectorActions_)) return false; |
|||
if (StoredTextActions != other.StoredTextActions) return false; |
|||
if(!memories_.Equals(other.memories_)) return false; |
|||
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Reward, other.Reward)) return false; |
|||
if (Done != other.Done) return false; |
|||
if (MaxStepReached != other.MaxStepReached) return false; |
|||
if (Id != other.Id) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
hash ^= stackedVectorObservation_.GetHashCode(); |
|||
hash ^= visualObservations_.GetHashCode(); |
|||
if (TextObservation.Length != 0) hash ^= TextObservation.GetHashCode(); |
|||
hash ^= storedVectorActions_.GetHashCode(); |
|||
if (StoredTextActions.Length != 0) hash ^= StoredTextActions.GetHashCode(); |
|||
hash ^= memories_.GetHashCode(); |
|||
if (Reward != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Reward); |
|||
if (Done != false) hash ^= Done.GetHashCode(); |
|||
if (MaxStepReached != false) hash ^= MaxStepReached.GetHashCode(); |
|||
if (Id != 0) hash ^= Id.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
stackedVectorObservation_.WriteTo(output, _repeated_stackedVectorObservation_codec); |
|||
visualObservations_.WriteTo(output, _repeated_visualObservations_codec); |
|||
if (TextObservation.Length != 0) { |
|||
output.WriteRawTag(26); |
|||
output.WriteString(TextObservation); |
|||
} |
|||
storedVectorActions_.WriteTo(output, _repeated_storedVectorActions_codec); |
|||
if (StoredTextActions.Length != 0) { |
|||
output.WriteRawTag(42); |
|||
output.WriteString(StoredTextActions); |
|||
} |
|||
memories_.WriteTo(output, _repeated_memories_codec); |
|||
if (Reward != 0F) { |
|||
output.WriteRawTag(61); |
|||
output.WriteFloat(Reward); |
|||
} |
|||
if (Done != false) { |
|||
output.WriteRawTag(64); |
|||
output.WriteBool(Done); |
|||
} |
|||
if (MaxStepReached != false) { |
|||
output.WriteRawTag(72); |
|||
output.WriteBool(MaxStepReached); |
|||
} |
|||
if (Id != 0) { |
|||
output.WriteRawTag(80); |
|||
output.WriteInt32(Id); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
size += stackedVectorObservation_.CalculateSize(_repeated_stackedVectorObservation_codec); |
|||
size += visualObservations_.CalculateSize(_repeated_visualObservations_codec); |
|||
if (TextObservation.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(TextObservation); |
|||
} |
|||
size += storedVectorActions_.CalculateSize(_repeated_storedVectorActions_codec); |
|||
if (StoredTextActions.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(StoredTextActions); |
|||
} |
|||
size += memories_.CalculateSize(_repeated_memories_codec); |
|||
if (Reward != 0F) { |
|||
size += 1 + 4; |
|||
} |
|||
if (Done != false) { |
|||
size += 1 + 1; |
|||
} |
|||
if (MaxStepReached != false) { |
|||
size += 1 + 1; |
|||
} |
|||
if (Id != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(AgentInfoProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
stackedVectorObservation_.Add(other.stackedVectorObservation_); |
|||
visualObservations_.Add(other.visualObservations_); |
|||
if (other.TextObservation.Length != 0) { |
|||
TextObservation = other.TextObservation; |
|||
} |
|||
storedVectorActions_.Add(other.storedVectorActions_); |
|||
if (other.StoredTextActions.Length != 0) { |
|||
StoredTextActions = other.StoredTextActions; |
|||
} |
|||
memories_.Add(other.memories_); |
|||
if (other.Reward != 0F) { |
|||
Reward = other.Reward; |
|||
} |
|||
if (other.Done != false) { |
|||
Done = other.Done; |
|||
} |
|||
if (other.MaxStepReached != false) { |
|||
MaxStepReached = other.MaxStepReached; |
|||
} |
|||
if (other.Id != 0) { |
|||
Id = other.Id; |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 10: |
|||
case 13: { |
|||
stackedVectorObservation_.AddEntriesFrom(input, _repeated_stackedVectorObservation_codec); |
|||
break; |
|||
} |
|||
case 18: { |
|||
visualObservations_.AddEntriesFrom(input, _repeated_visualObservations_codec); |
|||
break; |
|||
} |
|||
case 26: { |
|||
TextObservation = input.ReadString(); |
|||
break; |
|||
} |
|||
case 34: |
|||
case 37: { |
|||
storedVectorActions_.AddEntriesFrom(input, _repeated_storedVectorActions_codec); |
|||
break; |
|||
} |
|||
case 42: { |
|||
StoredTextActions = input.ReadString(); |
|||
break; |
|||
} |
|||
case 50: |
|||
case 53: { |
|||
memories_.AddEntriesFrom(input, _repeated_memories_codec); |
|||
break; |
|||
} |
|||
case 61: { |
|||
Reward = input.ReadFloat(); |
|||
break; |
|||
} |
|||
case 64: { |
|||
Done = input.ReadBool(); |
|||
break; |
|||
} |
|||
case 72: { |
|||
MaxStepReached = input.ReadBool(); |
|||
break; |
|||
} |
|||
case 80: { |
|||
Id = input.ReadInt32(); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: 9a2cd47d5b7a84d45b66748c405edf5a |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/brain_parameters_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/brain_parameters_proto.proto</summary>
|
|||
public static partial class BrainParametersProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/brain_parameters_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static BrainParametersProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjFjb21tdW5pY2F0b3Jfb2JqZWN0cy9icmFpbl9wYXJhbWV0ZXJzX3Byb3Rv", |
|||
"LnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cxorY29tbXVuaWNhdG9yX29i", |
|||
"amVjdHMvcmVzb2x1dGlvbl9wcm90by5wcm90bxorY29tbXVuaWNhdG9yX29i", |
|||
"amVjdHMvYnJhaW5fdHlwZV9wcm90by5wcm90bxorY29tbXVuaWNhdG9yX29i", |
|||
"amVjdHMvc3BhY2VfdHlwZV9wcm90by5wcm90byLGAwoUQnJhaW5QYXJhbWV0", |
|||
"ZXJzUHJvdG8SHwoXdmVjdG9yX29ic2VydmF0aW9uX3NpemUYASABKAUSJwof", |
|||
"bnVtX3N0YWNrZWRfdmVjdG9yX29ic2VydmF0aW9ucxgCIAEoBRIaChJ2ZWN0", |
|||
"b3JfYWN0aW9uX3NpemUYAyABKAUSQQoSY2FtZXJhX3Jlc29sdXRpb25zGAQg", |
|||
"AygLMiUuY29tbXVuaWNhdG9yX29iamVjdHMuUmVzb2x1dGlvblByb3RvEiIK", |
|||
"GnZlY3Rvcl9hY3Rpb25fZGVzY3JpcHRpb25zGAUgAygJEkYKGHZlY3Rvcl9h", |
|||
"Y3Rpb25fc3BhY2VfdHlwZRgGIAEoDjIkLmNvbW11bmljYXRvcl9vYmplY3Rz", |
|||
"LlNwYWNlVHlwZVByb3RvEksKHXZlY3Rvcl9vYnNlcnZhdGlvbl9zcGFjZV90", |
|||
"eXBlGAcgASgOMiQuY29tbXVuaWNhdG9yX29iamVjdHMuU3BhY2VUeXBlUHJv", |
|||
"dG8SEgoKYnJhaW5fbmFtZRgIIAEoCRI4CgpicmFpbl90eXBlGAkgASgOMiQu", |
|||
"Y29tbXVuaWNhdG9yX29iamVjdHMuQnJhaW5UeXBlUHJvdG9CH6oCHE1MQWdl", |
|||
"bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.BrainTypeProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.SpaceTypeProtoReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.BrainParametersProto), global::MLAgents.CommunicatorObjects.BrainParametersProto.Parser, new[]{ "VectorObservationSize", "NumStackedVectorObservations", "VectorActionSize", "CameraResolutions", "VectorActionDescriptions", "VectorActionSpaceType", "VectorObservationSpaceType", "BrainName", "BrainType" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class BrainParametersProto : pb::IMessage<BrainParametersProto> { |
|||
private static readonly pb::MessageParser<BrainParametersProto> _parser = new pb::MessageParser<BrainParametersProto>(() => new BrainParametersProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<BrainParametersProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.BrainParametersProtoReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public BrainParametersProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public BrainParametersProto(BrainParametersProto other) : this() { |
|||
vectorObservationSize_ = other.vectorObservationSize_; |
|||
numStackedVectorObservations_ = other.numStackedVectorObservations_; |
|||
vectorActionSize_ = other.vectorActionSize_; |
|||
cameraResolutions_ = other.cameraResolutions_.Clone(); |
|||
vectorActionDescriptions_ = other.vectorActionDescriptions_.Clone(); |
|||
vectorActionSpaceType_ = other.vectorActionSpaceType_; |
|||
vectorObservationSpaceType_ = other.vectorObservationSpaceType_; |
|||
brainName_ = other.brainName_; |
|||
brainType_ = other.brainType_; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public BrainParametersProto Clone() { |
|||
return new BrainParametersProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_observation_size" field.</summary>
|
|||
public const int VectorObservationSizeFieldNumber = 1; |
|||
private int vectorObservationSize_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int VectorObservationSize { |
|||
get { return vectorObservationSize_; } |
|||
set { |
|||
vectorObservationSize_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "num_stacked_vector_observations" field.</summary>
|
|||
public const int NumStackedVectorObservationsFieldNumber = 2; |
|||
private int numStackedVectorObservations_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int NumStackedVectorObservations { |
|||
get { return numStackedVectorObservations_; } |
|||
set { |
|||
numStackedVectorObservations_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_action_size" field.</summary>
|
|||
public const int VectorActionSizeFieldNumber = 3; |
|||
private int vectorActionSize_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int VectorActionSize { |
|||
get { return vectorActionSize_; } |
|||
set { |
|||
vectorActionSize_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "camera_resolutions" field.</summary>
|
|||
public const int CameraResolutionsFieldNumber = 4; |
|||
private static readonly pb::FieldCodec<global::MLAgents.CommunicatorObjects.ResolutionProto> _repeated_cameraResolutions_codec |
|||
= pb::FieldCodec.ForMessage(34, global::MLAgents.CommunicatorObjects.ResolutionProto.Parser); |
|||
private readonly pbc::RepeatedField<global::MLAgents.CommunicatorObjects.ResolutionProto> cameraResolutions_ = new pbc::RepeatedField<global::MLAgents.CommunicatorObjects.ResolutionProto>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<global::MLAgents.CommunicatorObjects.ResolutionProto> CameraResolutions { |
|||
get { return cameraResolutions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_action_descriptions" field.</summary>
|
|||
public const int VectorActionDescriptionsFieldNumber = 5; |
|||
private static readonly pb::FieldCodec<string> _repeated_vectorActionDescriptions_codec |
|||
= pb::FieldCodec.ForString(42); |
|||
private readonly pbc::RepeatedField<string> vectorActionDescriptions_ = new pbc::RepeatedField<string>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::RepeatedField<string> VectorActionDescriptions { |
|||
get { return vectorActionDescriptions_; } |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_action_space_type" field.</summary>
|
|||
public const int VectorActionSpaceTypeFieldNumber = 6; |
|||
private global::MLAgents.CommunicatorObjects.SpaceTypeProto vectorActionSpaceType_ = 0; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public global::MLAgents.CommunicatorObjects.SpaceTypeProto VectorActionSpaceType { |
|||
get { return vectorActionSpaceType_; } |
|||
set { |
|||
vectorActionSpaceType_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "vector_observation_space_type" field.</summary>
|
|||
public const int VectorObservationSpaceTypeFieldNumber = 7; |
|||
private global::MLAgents.CommunicatorObjects.SpaceTypeProto vectorObservationSpaceType_ = 0; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public global::MLAgents.CommunicatorObjects.SpaceTypeProto VectorObservationSpaceType { |
|||
get { return vectorObservationSpaceType_; } |
|||
set { |
|||
vectorObservationSpaceType_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "brain_name" field.</summary>
|
|||
public const int BrainNameFieldNumber = 8; |
|||
private string brainName_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string BrainName { |
|||
get { return brainName_; } |
|||
set { |
|||
brainName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "brain_type" field.</summary>
|
|||
public const int BrainTypeFieldNumber = 9; |
|||
private global::MLAgents.CommunicatorObjects.BrainTypeProto brainType_ = 0; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public global::MLAgents.CommunicatorObjects.BrainTypeProto BrainType { |
|||
get { return brainType_; } |
|||
set { |
|||
brainType_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as BrainParametersProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(BrainParametersProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if (VectorObservationSize != other.VectorObservationSize) return false; |
|||
if (NumStackedVectorObservations != other.NumStackedVectorObservations) return false; |
|||
if (VectorActionSize != other.VectorActionSize) return false; |
|||
if(!cameraResolutions_.Equals(other.cameraResolutions_)) return false; |
|||
if(!vectorActionDescriptions_.Equals(other.vectorActionDescriptions_)) return false; |
|||
if (VectorActionSpaceType != other.VectorActionSpaceType) return false; |
|||
if (VectorObservationSpaceType != other.VectorObservationSpaceType) return false; |
|||
if (BrainName != other.BrainName) return false; |
|||
if (BrainType != other.BrainType) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
if (VectorObservationSize != 0) hash ^= VectorObservationSize.GetHashCode(); |
|||
if (NumStackedVectorObservations != 0) hash ^= NumStackedVectorObservations.GetHashCode(); |
|||
if (VectorActionSize != 0) hash ^= VectorActionSize.GetHashCode(); |
|||
hash ^= cameraResolutions_.GetHashCode(); |
|||
hash ^= vectorActionDescriptions_.GetHashCode(); |
|||
if (VectorActionSpaceType != 0) hash ^= VectorActionSpaceType.GetHashCode(); |
|||
if (VectorObservationSpaceType != 0) hash ^= VectorObservationSpaceType.GetHashCode(); |
|||
if (BrainName.Length != 0) hash ^= BrainName.GetHashCode(); |
|||
if (BrainType != 0) hash ^= BrainType.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
if (VectorObservationSize != 0) { |
|||
output.WriteRawTag(8); |
|||
output.WriteInt32(VectorObservationSize); |
|||
} |
|||
if (NumStackedVectorObservations != 0) { |
|||
output.WriteRawTag(16); |
|||
output.WriteInt32(NumStackedVectorObservations); |
|||
} |
|||
if (VectorActionSize != 0) { |
|||
output.WriteRawTag(24); |
|||
output.WriteInt32(VectorActionSize); |
|||
} |
|||
cameraResolutions_.WriteTo(output, _repeated_cameraResolutions_codec); |
|||
vectorActionDescriptions_.WriteTo(output, _repeated_vectorActionDescriptions_codec); |
|||
if (VectorActionSpaceType != 0) { |
|||
output.WriteRawTag(48); |
|||
output.WriteEnum((int) VectorActionSpaceType); |
|||
} |
|||
if (VectorObservationSpaceType != 0) { |
|||
output.WriteRawTag(56); |
|||
output.WriteEnum((int) VectorObservationSpaceType); |
|||
} |
|||
if (BrainName.Length != 0) { |
|||
output.WriteRawTag(66); |
|||
output.WriteString(BrainName); |
|||
} |
|||
if (BrainType != 0) { |
|||
output.WriteRawTag(72); |
|||
output.WriteEnum((int) BrainType); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
if (VectorObservationSize != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(VectorObservationSize); |
|||
} |
|||
if (NumStackedVectorObservations != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumStackedVectorObservations); |
|||
} |
|||
if (VectorActionSize != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(VectorActionSize); |
|||
} |
|||
size += cameraResolutions_.CalculateSize(_repeated_cameraResolutions_codec); |
|||
size += vectorActionDescriptions_.CalculateSize(_repeated_vectorActionDescriptions_codec); |
|||
if (VectorActionSpaceType != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) VectorActionSpaceType); |
|||
} |
|||
if (VectorObservationSpaceType != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) VectorObservationSpaceType); |
|||
} |
|||
if (BrainName.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(BrainName); |
|||
} |
|||
if (BrainType != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BrainType); |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(BrainParametersProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
if (other.VectorObservationSize != 0) { |
|||
VectorObservationSize = other.VectorObservationSize; |
|||
} |
|||
if (other.NumStackedVectorObservations != 0) { |
|||
NumStackedVectorObservations = other.NumStackedVectorObservations; |
|||
} |
|||
if (other.VectorActionSize != 0) { |
|||
VectorActionSize = other.VectorActionSize; |
|||
} |
|||
cameraResolutions_.Add(other.cameraResolutions_); |
|||
vectorActionDescriptions_.Add(other.vectorActionDescriptions_); |
|||
if (other.VectorActionSpaceType != 0) { |
|||
VectorActionSpaceType = other.VectorActionSpaceType; |
|||
} |
|||
if (other.VectorObservationSpaceType != 0) { |
|||
VectorObservationSpaceType = other.VectorObservationSpaceType; |
|||
} |
|||
if (other.BrainName.Length != 0) { |
|||
BrainName = other.BrainName; |
|||
} |
|||
if (other.BrainType != 0) { |
|||
BrainType = other.BrainType; |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 8: { |
|||
VectorObservationSize = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 16: { |
|||
NumStackedVectorObservations = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 24: { |
|||
VectorActionSize = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 34: { |
|||
cameraResolutions_.AddEntriesFrom(input, _repeated_cameraResolutions_codec); |
|||
break; |
|||
} |
|||
case 42: { |
|||
vectorActionDescriptions_.AddEntriesFrom(input, _repeated_vectorActionDescriptions_codec); |
|||
break; |
|||
} |
|||
case 48: { |
|||
vectorActionSpaceType_ = (global::MLAgents.CommunicatorObjects.SpaceTypeProto) input.ReadEnum(); |
|||
break; |
|||
} |
|||
case 56: { |
|||
vectorObservationSpaceType_ = (global::MLAgents.CommunicatorObjects.SpaceTypeProto) input.ReadEnum(); |
|||
break; |
|||
} |
|||
case 66: { |
|||
BrainName = input.ReadString(); |
|||
break; |
|||
} |
|||
case 72: { |
|||
brainType_ = (global::MLAgents.CommunicatorObjects.BrainTypeProto) input.ReadEnum(); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: 91e3353985a4c4c08a8004648a81de4f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/brain_type_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/brain_type_proto.proto</summary>
|
|||
public static partial class BrainTypeProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/brain_type_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static BrainTypeProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"Citjb21tdW5pY2F0b3Jfb2JqZWN0cy9icmFpbl90eXBlX3Byb3RvLnByb3Rv", |
|||
"EhRjb21tdW5pY2F0b3Jfb2JqZWN0cxorY29tbXVuaWNhdG9yX29iamVjdHMv", |
|||
"cmVzb2x1dGlvbl9wcm90by5wcm90bypHCg5CcmFpblR5cGVQcm90bxIKCgZQ", |
|||
"bGF5ZXIQABINCglIZXVyaXN0aWMQARIMCghFeHRlcm5hbBACEgwKCEludGVy", |
|||
"bmFsEANCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3Rv", |
|||
"Mw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionProtoReflection.Descriptor, }, |
|||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.BrainTypeProto), }, null)); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Enums
|
|||
public enum BrainTypeProto { |
|||
[pbr::OriginalName("Player")] Player = 0, |
|||
[pbr::OriginalName("Heuristic")] Heuristic = 1, |
|||
[pbr::OriginalName("External")] External = 2, |
|||
[pbr::OriginalName("Internal")] Internal = 3, |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: d2e4f3cea300049b7a4cd65fbee2ee95 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/command_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/command_proto.proto</summary>
|
|||
public static partial class CommandProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/command_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static CommandProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"Cihjb21tdW5pY2F0b3Jfb2JqZWN0cy9jb21tYW5kX3Byb3RvLnByb3RvEhRj", |
|||
"b21tdW5pY2F0b3Jfb2JqZWN0cyotCgxDb21tYW5kUHJvdG8SCAoEU1RFUBAA", |
|||
"EgkKBVJFU0VUEAESCAoEUVVJVBACQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0", |
|||
"b3JPYmplY3RzYgZwcm90bzM=")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.CommandProto), }, null)); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Enums
|
|||
public enum CommandProto { |
|||
[pbr::OriginalName("STEP")] Step = 0, |
|||
[pbr::OriginalName("RESET")] Reset = 1, |
|||
[pbr::OriginalName("QUIT")] Quit = 2, |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: 19e8be280f78249c188fde36f0855094 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/engine_configuration_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/engine_configuration_proto.proto</summary>
|
|||
public static partial class EngineConfigurationProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/engine_configuration_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static EngineConfigurationProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CjVjb21tdW5pY2F0b3Jfb2JqZWN0cy9lbmdpbmVfY29uZmlndXJhdGlvbl9w", |
|||
"cm90by5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMilQEKGEVuZ2luZUNv", |
|||
"bmZpZ3VyYXRpb25Qcm90bxINCgV3aWR0aBgBIAEoBRIOCgZoZWlnaHQYAiAB", |
|||
"KAUSFQoNcXVhbGl0eV9sZXZlbBgDIAEoBRISCgp0aW1lX3NjYWxlGAQgASgC", |
|||
"EhkKEXRhcmdldF9mcmFtZV9yYXRlGAUgASgFEhQKDHNob3dfbW9uaXRvchgG", |
|||
"IAEoCEIfqgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.EngineConfigurationProto), global::MLAgents.CommunicatorObjects.EngineConfigurationProto.Parser, new[]{ "Width", "Height", "QualityLevel", "TimeScale", "TargetFrameRate", "ShowMonitor" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class EngineConfigurationProto : pb::IMessage<EngineConfigurationProto> { |
|||
private static readonly pb::MessageParser<EngineConfigurationProto> _parser = new pb::MessageParser<EngineConfigurationProto>(() => new EngineConfigurationProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<EngineConfigurationProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.EngineConfigurationProtoReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EngineConfigurationProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EngineConfigurationProto(EngineConfigurationProto other) : this() { |
|||
width_ = other.width_; |
|||
height_ = other.height_; |
|||
qualityLevel_ = other.qualityLevel_; |
|||
timeScale_ = other.timeScale_; |
|||
targetFrameRate_ = other.targetFrameRate_; |
|||
showMonitor_ = other.showMonitor_; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EngineConfigurationProto Clone() { |
|||
return new EngineConfigurationProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "width" field.</summary>
|
|||
public const int WidthFieldNumber = 1; |
|||
private int width_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int Width { |
|||
get { return width_; } |
|||
set { |
|||
width_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "height" field.</summary>
|
|||
public const int HeightFieldNumber = 2; |
|||
private int height_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int Height { |
|||
get { return height_; } |
|||
set { |
|||
height_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "quality_level" field.</summary>
|
|||
public const int QualityLevelFieldNumber = 3; |
|||
private int qualityLevel_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int QualityLevel { |
|||
get { return qualityLevel_; } |
|||
set { |
|||
qualityLevel_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "time_scale" field.</summary>
|
|||
public const int TimeScaleFieldNumber = 4; |
|||
private float timeScale_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public float TimeScale { |
|||
get { return timeScale_; } |
|||
set { |
|||
timeScale_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "target_frame_rate" field.</summary>
|
|||
public const int TargetFrameRateFieldNumber = 5; |
|||
private int targetFrameRate_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int TargetFrameRate { |
|||
get { return targetFrameRate_; } |
|||
set { |
|||
targetFrameRate_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "show_monitor" field.</summary>
|
|||
public const int ShowMonitorFieldNumber = 6; |
|||
private bool showMonitor_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool ShowMonitor { |
|||
get { return showMonitor_; } |
|||
set { |
|||
showMonitor_ = value; |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as EngineConfigurationProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(EngineConfigurationProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if (Width != other.Width) return false; |
|||
if (Height != other.Height) return false; |
|||
if (QualityLevel != other.QualityLevel) return false; |
|||
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TimeScale, other.TimeScale)) return false; |
|||
if (TargetFrameRate != other.TargetFrameRate) return false; |
|||
if (ShowMonitor != other.ShowMonitor) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
if (Width != 0) hash ^= Width.GetHashCode(); |
|||
if (Height != 0) hash ^= Height.GetHashCode(); |
|||
if (QualityLevel != 0) hash ^= QualityLevel.GetHashCode(); |
|||
if (TimeScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TimeScale); |
|||
if (TargetFrameRate != 0) hash ^= TargetFrameRate.GetHashCode(); |
|||
if (ShowMonitor != false) hash ^= ShowMonitor.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
if (Width != 0) { |
|||
output.WriteRawTag(8); |
|||
output.WriteInt32(Width); |
|||
} |
|||
if (Height != 0) { |
|||
output.WriteRawTag(16); |
|||
output.WriteInt32(Height); |
|||
} |
|||
if (QualityLevel != 0) { |
|||
output.WriteRawTag(24); |
|||
output.WriteInt32(QualityLevel); |
|||
} |
|||
if (TimeScale != 0F) { |
|||
output.WriteRawTag(37); |
|||
output.WriteFloat(TimeScale); |
|||
} |
|||
if (TargetFrameRate != 0) { |
|||
output.WriteRawTag(40); |
|||
output.WriteInt32(TargetFrameRate); |
|||
} |
|||
if (ShowMonitor != false) { |
|||
output.WriteRawTag(48); |
|||
output.WriteBool(ShowMonitor); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
if (Width != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Width); |
|||
} |
|||
if (Height != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Height); |
|||
} |
|||
if (QualityLevel != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(QualityLevel); |
|||
} |
|||
if (TimeScale != 0F) { |
|||
size += 1 + 4; |
|||
} |
|||
if (TargetFrameRate != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetFrameRate); |
|||
} |
|||
if (ShowMonitor != false) { |
|||
size += 1 + 1; |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(EngineConfigurationProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
if (other.Width != 0) { |
|||
Width = other.Width; |
|||
} |
|||
if (other.Height != 0) { |
|||
Height = other.Height; |
|||
} |
|||
if (other.QualityLevel != 0) { |
|||
QualityLevel = other.QualityLevel; |
|||
} |
|||
if (other.TimeScale != 0F) { |
|||
TimeScale = other.TimeScale; |
|||
} |
|||
if (other.TargetFrameRate != 0) { |
|||
TargetFrameRate = other.TargetFrameRate; |
|||
} |
|||
if (other.ShowMonitor != false) { |
|||
ShowMonitor = other.ShowMonitor; |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 8: { |
|||
Width = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 16: { |
|||
Height = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 24: { |
|||
QualityLevel = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 37: { |
|||
TimeScale = input.ReadFloat(); |
|||
break; |
|||
} |
|||
case 40: { |
|||
TargetFrameRate = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 48: { |
|||
ShowMonitor = input.ReadBool(); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: fac934345fc664df8823b494ea9b1ca8 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/environment_parameters_proto.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/environment_parameters_proto.proto</summary>
|
|||
public static partial class EnvironmentParametersProtoReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/environment_parameters_proto.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static EnvironmentParametersProtoReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"Cjdjb21tdW5pY2F0b3Jfb2JqZWN0cy9lbnZpcm9ubWVudF9wYXJhbWV0ZXJz", |
|||
"X3Byb3RvLnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cyK1AQoaRW52aXJv", |
|||
"bm1lbnRQYXJhbWV0ZXJzUHJvdG8SXwoQZmxvYXRfcGFyYW1ldGVycxgBIAMo", |
|||
"CzJFLmNvbW11bmljYXRvcl9vYmplY3RzLkVudmlyb25tZW50UGFyYW1ldGVy", |
|||
"c1Byb3RvLkZsb2F0UGFyYW1ldGVyc0VudHJ5GjYKFEZsb2F0UGFyYW1ldGVy", |
|||
"c0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoAjoCOAFCH6oCHE1M", |
|||
"QWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.EnvironmentParametersProto), global::MLAgents.CommunicatorObjects.EnvironmentParametersProto.Parser, new[]{ "FloatParameters" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class EnvironmentParametersProto : pb::IMessage<EnvironmentParametersProto> { |
|||
private static readonly pb::MessageParser<EnvironmentParametersProto> _parser = new pb::MessageParser<EnvironmentParametersProto>(() => new EnvironmentParametersProto()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<EnvironmentParametersProto> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.EnvironmentParametersProtoReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EnvironmentParametersProto() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EnvironmentParametersProto(EnvironmentParametersProto other) : this() { |
|||
floatParameters_ = other.floatParameters_.Clone(); |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public EnvironmentParametersProto Clone() { |
|||
return new EnvironmentParametersProto(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "float_parameters" field.</summary>
|
|||
public const int FloatParametersFieldNumber = 1; |
|||
private static readonly pbc::MapField<string, float>.Codec _map_floatParameters_codec |
|||
= new pbc::MapField<string, float>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForFloat(21), 10); |
|||
private readonly pbc::MapField<string, float> floatParameters_ = new pbc::MapField<string, float>(); |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public pbc::MapField<string, float> FloatParameters { |
|||
get { return floatParameters_; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as EnvironmentParametersProto); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(EnvironmentParametersProto other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if (!FloatParameters.Equals(other.FloatParameters)) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
hash ^= FloatParameters.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
floatParameters_.WriteTo(output, _map_floatParameters_codec); |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
size += floatParameters_.CalculateSize(_map_floatParameters_codec); |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(EnvironmentParametersProto other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
floatParameters_.Add(other.floatParameters_); |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 10: { |
|||
floatParameters_.AddEntriesFrom(input, _map_floatParameters_codec); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
|
|||
fileFormatVersion: 2 |
|||
guid: 312dc062dfab44416a31b8b273cda29a |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// <auto-generated>
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|||
// source: communicator_objects/header.proto
|
|||
// </auto-generated>
|
|||
#pragma warning disable 1591, 0612, 3021
|
|||
#region Designer generated code
|
|||
|
|||
using pb = global::Google.Protobuf; |
|||
using pbc = global::Google.Protobuf.Collections; |
|||
using pbr = global::Google.Protobuf.Reflection; |
|||
using scg = global::System.Collections.Generic; |
|||
namespace MLAgents.CommunicatorObjects { |
|||
|
|||
/// <summary>Holder for reflection information generated from communicator_objects/header.proto</summary>
|
|||
public static partial class HeaderReflection { |
|||
|
|||
#region Descriptor
|
|||
/// <summary>File descriptor for communicator_objects/header.proto</summary>
|
|||
public static pbr::FileDescriptor Descriptor { |
|||
get { return descriptor; } |
|||
} |
|||
private static pbr::FileDescriptor descriptor; |
|||
|
|||
static HeaderReflection() { |
|||
byte[] descriptorData = global::System.Convert.FromBase64String( |
|||
string.Concat( |
|||
"CiFjb21tdW5pY2F0b3Jfb2JqZWN0cy9oZWFkZXIucHJvdG8SFGNvbW11bmlj", |
|||
"YXRvcl9vYmplY3RzIikKBkhlYWRlchIOCgZzdGF0dXMYASABKAUSDwoHbWVz", |
|||
"c2FnZRgCIAEoCUIfqgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IG", |
|||
"cHJvdG8z")); |
|||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
|||
new pbr::FileDescriptor[] { }, |
|||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
|||
new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.Header), global::MLAgents.CommunicatorObjects.Header.Parser, new[]{ "Status", "Message" }, null, null, null) |
|||
})); |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
#region Messages
|
|||
public sealed partial class Header : pb::IMessage<Header> { |
|||
private static readonly pb::MessageParser<Header> _parser = new pb::MessageParser<Header>(() => new Header()); |
|||
private pb::UnknownFieldSet _unknownFields; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pb::MessageParser<Header> Parser { get { return _parser; } } |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public static pbr::MessageDescriptor Descriptor { |
|||
get { return global::MLAgents.CommunicatorObjects.HeaderReflection.Descriptor.MessageTypes[0]; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
pbr::MessageDescriptor pb::IMessage.Descriptor { |
|||
get { return Descriptor; } |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public Header() { |
|||
OnConstruction(); |
|||
} |
|||
|
|||
partial void OnConstruction(); |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public Header(Header other) : this() { |
|||
status_ = other.status_; |
|||
message_ = other.message_; |
|||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public Header Clone() { |
|||
return new Header(this); |
|||
} |
|||
|
|||
/// <summary>Field number for the "status" field.</summary>
|
|||
public const int StatusFieldNumber = 1; |
|||
private int status_; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int Status { |
|||
get { return status_; } |
|||
set { |
|||
status_ = value; |
|||
} |
|||
} |
|||
|
|||
/// <summary>Field number for the "message" field.</summary>
|
|||
public const int MessageFieldNumber = 2; |
|||
private string message_ = ""; |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public string Message { |
|||
get { return message_; } |
|||
set { |
|||
message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override bool Equals(object other) { |
|||
return Equals(other as Header); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public bool Equals(Header other) { |
|||
if (ReferenceEquals(other, null)) { |
|||
return false; |
|||
} |
|||
if (ReferenceEquals(other, this)) { |
|||
return true; |
|||
} |
|||
if (Status != other.Status) return false; |
|||
if (Message != other.Message) return false; |
|||
return Equals(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override int GetHashCode() { |
|||
int hash = 1; |
|||
if (Status != 0) hash ^= Status.GetHashCode(); |
|||
if (Message.Length != 0) hash ^= Message.GetHashCode(); |
|||
if (_unknownFields != null) { |
|||
hash ^= _unknownFields.GetHashCode(); |
|||
} |
|||
return hash; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public override string ToString() { |
|||
return pb::JsonFormatter.ToDiagnosticString(this); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void WriteTo(pb::CodedOutputStream output) { |
|||
if (Status != 0) { |
|||
output.WriteRawTag(8); |
|||
output.WriteInt32(Status); |
|||
} |
|||
if (Message.Length != 0) { |
|||
output.WriteRawTag(18); |
|||
output.WriteString(Message); |
|||
} |
|||
if (_unknownFields != null) { |
|||
_unknownFields.WriteTo(output); |
|||
} |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public int CalculateSize() { |
|||
int size = 0; |
|||
if (Status != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); |
|||
} |
|||
if (Message.Length != 0) { |
|||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); |
|||
} |
|||
if (_unknownFields != null) { |
|||
size += _unknownFields.CalculateSize(); |
|||
} |
|||
return size; |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(Header other) { |
|||
if (other == null) { |
|||
return; |
|||
} |
|||
if (other.Status != 0) { |
|||
Status = other.Status; |
|||
} |
|||
if (other.Message.Length != 0) { |
|||
Message = other.Message; |
|||
} |
|||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
|||
} |
|||
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
|||
public void MergeFrom(pb::CodedInputStream input) { |
|||
uint tag; |
|||
while ((tag = input.ReadTag()) != 0) { |
|||
switch(tag) { |
|||
default: |
|||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
|||
break; |
|||
case 8: { |
|||
Status = input.ReadInt32(); |
|||
break; |
|||
} |
|||
case 18: { |
|||
Message = input.ReadString(); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
|
|||
#endregion Designer generated code
|
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue