cuju-engine 0.3.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cuju/__init__.py +217 -0
- cuju/__main__.py +262 -0
- cuju/_batch/__init__.py +4 -0
- cuju/_batch/allocator.py +52 -0
- cuju/_batch/assets.py +68 -0
- cuju/_batch/environment.py +1890 -0
- cuju/_batch/frame_stack.py +114 -0
- cuju/_batch/library.py +190 -0
- cuju/_batch/log.py +103 -0
- cuju/_batch/memory.py +70 -0
- cuju/_batch/operators.py +55 -0
- cuju/_batch/pinned.py +39 -0
- cuju/_batch/pixels.py +207 -0
- cuju/_batch/state.py +77 -0
- cuju/_checksums.py +60 -0
- cuju/_cli_contract.py +244 -0
- cuju/_cli_parsers.py +191 -0
- cuju/_completion.py +277 -0
- cuju/_dump_to_txt.py +66 -0
- cuju/_grf_config.py +331 -0
- cuju/_library_path.py +141 -0
- cuju/_media.py +113 -0
- cuju/_pixels.py +276 -0
- cuju/_plugins.py +106 -0
- cuju/_python_players.py +224 -0
- cuju/_replay_command.py +109 -0
- cuju/_replay_player.py +42 -0
- cuju/_replays.py +414 -0
- cuju/_script_helpers.py +109 -0
- cuju/_version.py +6 -0
- cuju/action_log.py +371 -0
- cuju/check.py +596 -0
- cuju/cuju_cpu.dll +0 -0
- cuju/cuju_cuda.dll +0 -0
- cuju/cuju_render.dll +0 -0
- cuju/data/SHA256SUMS +20 -0
- cuju/data/animations.bin +0 -0
- cuju/data/assets/11_vs_11_competition_l0_r0.cjb +0 -0
- cuju/data/assets/11_vs_11_easy_stochastic_l0_r0.cjb +0 -0
- cuju/data/assets/11_vs_11_hard_stochastic_l0_r0.cjb +0 -0
- cuju/data/assets/11_vs_11_kaggle_l0_r0.cjb +0 -0
- cuju/data/assets/11_vs_11_stochastic_l0_r0.cjb +0 -0
- cuju/data/assets/1_vs_1_easy_l0_r0.cjb +0 -0
- cuju/data/assets/5_vs_5_l0_r0.cjb +0 -0
- cuju/data/assets/academy_3_vs_1_with_keeper_l0_r0.cjb +0 -0
- cuju/data/assets/academy_corner_l0_r0.cjb +0 -0
- cuju/data/assets/academy_counterattack_easy_l0_r0.cjb +0 -0
- cuju/data/assets/academy_counterattack_hard_l0_r0.cjb +0 -0
- cuju/data/assets/academy_empty_goal_close_l0_r0.cjb +0 -0
- cuju/data/assets/academy_empty_goal_l0_r0.cjb +0 -0
- cuju/data/assets/academy_pass_and_shoot_with_keeper_l0_r0.cjb +0 -0
- cuju/data/assets/academy_run_pass_and_shoot_with_keeper_l0_r0.cjb +0 -0
- cuju/data/assets/academy_run_to_score_l0_r0.cjb +0 -0
- cuju/data/assets/academy_run_to_score_with_keeper_l0_r0.cjb +0 -0
- cuju/data/assets/academy_single_goal_versus_lazy_l0_r0.cjb +0 -0
- cuju/data/assets/test_example_multiagent_l0_r0.cjb +0 -0
- cuju/data/digests.json +186 -0
- cuju/data/render_digests.json.z +0 -0
- cuju/data/scenarios/11_vs_11_competition.py +45 -0
- cuju/data/scenarios/11_vs_11_easy_stochastic.py +44 -0
- cuju/data/scenarios/11_vs_11_hard_stochastic.py +44 -0
- cuju/data/scenarios/11_vs_11_kaggle.py +46 -0
- cuju/data/scenarios/11_vs_11_stochastic.py +44 -0
- cuju/data/scenarios/1_vs_1_easy.py +25 -0
- cuju/data/scenarios/5_vs_5.py +33 -0
- cuju/data/scenarios/academy_3_vs_1_with_keeper.py +28 -0
- cuju/data/scenarios/academy_corner.py +45 -0
- cuju/data/scenarios/academy_counterattack_easy.py +45 -0
- cuju/data/scenarios/academy_counterattack_hard.py +45 -0
- cuju/data/scenarios/academy_empty_goal.py +25 -0
- cuju/data/scenarios/academy_empty_goal_close.py +25 -0
- cuju/data/scenarios/academy_pass_and_shoot_with_keeper.py +27 -0
- cuju/data/scenarios/academy_run_pass_and_shoot_with_keeper.py +27 -0
- cuju/data/scenarios/academy_run_to_score.py +30 -0
- cuju/data/scenarios/academy_run_to_score_with_keeper.py +30 -0
- cuju/data/scenarios/academy_single_goal_versus_lazy.py +49 -0
- cuju/data/scenarios/test_example_multiagent.py +28 -0
- cuju/dumps.py +942 -0
- cuju/engine_status.py +106 -0
- cuju/env.py +1168 -0
- cuju/errors.py +108 -0
- cuju/gfootball/GRF_SOURCES +86 -0
- cuju/gfootball/__init__.py +60 -0
- cuju/gfootball/_cv2.py +43 -0
- cuju/gfootball/_gym/__init__.py +88 -0
- cuju/gfootball/_gym/_vendored/GYM_SOURCES +22 -0
- cuju/gfootball/_gym/_vendored/__init__.py +43 -0
- cuju/gfootball/_gym/_vendored/core.py +361 -0
- cuju/gfootball/_gym/_vendored/envs/__init__.py +19 -0
- cuju/gfootball/_gym/_vendored/envs/registration.py +284 -0
- cuju/gfootball/_gym/_vendored/error.py +230 -0
- cuju/gfootball/_gym/_vendored/logger.py +56 -0
- cuju/gfootball/_gym/_vendored/spaces/__init__.py +30 -0
- cuju/gfootball/_gym/_vendored/spaces/box.py +171 -0
- cuju/gfootball/_gym/_vendored/spaces/dict.py +162 -0
- cuju/gfootball/_gym/_vendored/spaces/discrete.py +41 -0
- cuju/gfootball/_gym/_vendored/spaces/multi_binary.py +61 -0
- cuju/gfootball/_gym/_vendored/spaces/multi_discrete.py +77 -0
- cuju/gfootball/_gym/_vendored/spaces/space.py +94 -0
- cuju/gfootball/_gym/_vendored/spaces/tuple.py +96 -0
- cuju/gfootball/_gym/_vendored/spaces/utils.py +228 -0
- cuju/gfootball/_gym/_vendored/utils/__init__.py +13 -0
- cuju/gfootball/_gym/_vendored/utils/closer.py +72 -0
- cuju/gfootball/_gym/_vendored/utils/colorize.py +36 -0
- cuju/gfootball/_gym/_vendored/utils/ezpickle.py +37 -0
- cuju/gfootball/_gym/_vendored/utils/json_utils.py +27 -0
- cuju/gfootball/_gym/_vendored/utils/seeding.py +101 -0
- cuju/gfootball/_gym/_vendored/version.py +5 -0
- cuju/gfootball/_gym/_vendored/wrappers/__init__.py +8 -0
- cuju/gfootball/_gym/_vendored/wrappers/order_enforcing.py +20 -0
- cuju/gfootball/_gym/_vendored/wrappers/time_limit.py +31 -0
- cuju/gfootball/dump_to_txt.py +49 -0
- cuju/gfootball/dump_to_video.py +33 -0
- cuju/gfootball/env/__init__.py +271 -0
- cuju/gfootball/env/config.py +163 -0
- cuju/gfootball/env/constants.py +33 -0
- cuju/gfootball/env/controller_base.py +114 -0
- cuju/gfootball/env/event_queue.py +54 -0
- cuju/gfootball/env/football_action_set.py +220 -0
- cuju/gfootball/env/football_action_set_test.py +76 -0
- cuju/gfootball/env/football_env.py +225 -0
- cuju/gfootball/env/football_env_core.py +447 -0
- cuju/gfootball/env/football_env_test.py +692 -0
- cuju/gfootball/env/gym_test.py +47 -0
- cuju/gfootball/env/observation_preprocessing.py +94 -0
- cuju/gfootball/env/observation_processor.py +526 -0
- cuju/gfootball/env/observation_rotation.py +163 -0
- cuju/gfootball/env/observation_rotation_test.py +84 -0
- cuju/gfootball/env/player_base.py +46 -0
- cuju/gfootball/env/players/__init__.py +16 -0
- cuju/gfootball/env/players/agent.py +39 -0
- cuju/gfootball/env/players/bot.py +217 -0
- cuju/gfootball/env/players/gamepad.py +81 -0
- cuju/gfootball/env/players/keyboard.py +72 -0
- cuju/gfootball/env/players/lazy.py +31 -0
- cuju/gfootball/env/players/ppo2_cnn.py +119 -0
- cuju/gfootball/env/players/replay.py +40 -0
- cuju/gfootball/env/remote_football_env.py +189 -0
- cuju/gfootball/env/scenario_builder.py +125 -0
- cuju/gfootball/env/script_helpers.py +130 -0
- cuju/gfootball/env/script_helpers_test.py +107 -0
- cuju/gfootball/env/wrappers.py +440 -0
- cuju/gfootball/env/wrappers_test.py +150 -0
- cuju/gfootball/eval_server/__init__.py +17 -0
- cuju/gfootball/eval_server/config.py +30 -0
- cuju/gfootball/eval_server/example_client.py +107 -0
- cuju/gfootball/eval_server/proto/game_server.proto +62 -0
- cuju/gfootball/eval_server/proto/game_server_pb2.py +501 -0
- cuju/gfootball/eval_server/proto/game_server_pb2_grpc.py +113 -0
- cuju/gfootball/eval_server/proto/master.proto +25 -0
- cuju/gfootball/eval_server/proto/master_pb2.py +184 -0
- cuju/gfootball/eval_server/proto/master_pb2_grpc.py +62 -0
- cuju/gfootball/eval_server/utils.py +52 -0
- cuju/gfootball/examples/__init__.py +16 -0
- cuju/gfootball/examples/models.py +66 -0
- cuju/gfootball/examples/run_multiagent_rllib.py +140 -0
- cuju/gfootball/examples/run_ppo2.py +123 -0
- cuju/gfootball/play_game.py +73 -0
- cuju/gfootball/replay.py +43 -0
- cuju/gfootball/scenarios/11_vs_11_competition.py +59 -0
- cuju/gfootball/scenarios/11_vs_11_easy_stochastic.py +57 -0
- cuju/gfootball/scenarios/11_vs_11_hard_stochastic.py +57 -0
- cuju/gfootball/scenarios/11_vs_11_kaggle.py +60 -0
- cuju/gfootball/scenarios/11_vs_11_stochastic.py +57 -0
- cuju/gfootball/scenarios/1_vs_1_easy.py +39 -0
- cuju/gfootball/scenarios/5_vs_5.py +46 -0
- cuju/gfootball/scenarios/__init__.py +31 -0
- cuju/gfootball/scenarios/academy_3_vs_1_with_keeper.py +42 -0
- cuju/gfootball/scenarios/academy_corner.py +59 -0
- cuju/gfootball/scenarios/academy_counterattack_easy.py +59 -0
- cuju/gfootball/scenarios/academy_counterattack_hard.py +59 -0
- cuju/gfootball/scenarios/academy_empty_goal.py +39 -0
- cuju/gfootball/scenarios/academy_empty_goal_close.py +39 -0
- cuju/gfootball/scenarios/academy_pass_and_shoot_with_keeper.py +41 -0
- cuju/gfootball/scenarios/academy_run_pass_and_shoot_with_keeper.py +41 -0
- cuju/gfootball/scenarios/academy_run_to_score.py +44 -0
- cuju/gfootball/scenarios/academy_run_to_score_with_keeper.py +44 -0
- cuju/gfootball/scenarios/academy_single_goal_versus_lazy.py +63 -0
- cuju/gfootball/scenarios/test_example_multiagent.py +42 -0
- cuju/gfootball/scenarios/tests/11_vs_11_deterministic.py +58 -0
- cuju/gfootball/scenarios/tests/11_vs_11_easy_deterministic.py +58 -0
- cuju/gfootball/scenarios/tests/11_vs_11_hard_deterministic.py +58 -0
- cuju/gfootball/scenarios/tests/11_vs_11_single_goal_deterministic.py +58 -0
- cuju/gfootball/scenarios/tests/11_vs_11_single_goal_stochastic.py +58 -0
- cuju/gfootball/scenarios/tests/11_vs_4_offence_deterministic.py +47 -0
- cuju/gfootball/scenarios/tests/11_vs_4_offence_stochastic.py +47 -0
- cuju/gfootball/scenarios/tests/__init__.py +31 -0
- cuju/gfootball/scenarios/tests/corner_test.py +38 -0
- cuju/gfootball/scenarios/tests/goal_test.py +35 -0
- cuju/gfootball/scenarios/tests/keeper_test.py +38 -0
- cuju/gfootball/scenarios/tests/kickoff_for_goal_loosing_team_test.py +34 -0
- cuju/gfootball/scenarios/tests/multiagent_wrapper.py +60 -0
- cuju/gfootball/scenarios/tests/offside_test.py +39 -0
- cuju/gfootball/scenarios/tests/penalty.py +34 -0
- cuju/gfootball/scenarios/tests/second_half.py +33 -0
- cuju/gfootball/scenarios/tests/symmetric.py +53 -0
- cuju/gfootball_engine/__init__.py +31 -0
- cuju/gfootball_engine/_gameplayfootball.py +1624 -0
- cuju/gfootball_engine/_native.py +193 -0
- cuju/gfootball_engine/_pickle_names.py +114 -0
- cuju/gfootball_engine/_render_hooks.py +156 -0
- cuju/kaggle.py +425 -0
- cuju/multi_device.py +401 -0
- cuju/players.py +260 -0
- cuju/raw.py +93 -0
- cuju/scenarios.py +661 -0
- cuju/state.py +211 -0
- cuju/wrappers.py +325 -0
- cuju_engine-0.3.0.dist-info/METADATA +325 -0
- cuju_engine-0.3.0.dist-info/RECORD +222 -0
- cuju_engine-0.3.0.dist-info/WHEEL +5 -0
- cuju_engine-0.3.0.dist-info/entry_points.txt +4 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSE +202 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/BSD-3-Clause.txt +31 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/BSL-1.0.txt +23 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/LGPL-2.1-or-later.txt +502 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/MIT-Mesa.txt +26 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/MIT-gym.txt +23 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/MIT.txt +23 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/SunPro.txt +8 -0
- cuju_engine-0.3.0.dist-info/licenses/LICENSES/Zlib.txt +20 -0
- cuju_engine-0.3.0.dist-info/licenses/NOTICE +56 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# Copyright 2019 Google LLC
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# Modified by the cuju Authors in 2026, in the import lines that ci/port_gfootball.py lists.
|
|
15
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
# -*- coding: utf-8 -*-
|
|
18
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
19
|
+
# source: gfootball/eval_server/proto/game_server.proto
|
|
20
|
+
|
|
21
|
+
import sys
|
|
22
|
+
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
|
23
|
+
from google.protobuf import descriptor as _descriptor
|
|
24
|
+
from google.protobuf import message as _message
|
|
25
|
+
from google.protobuf import reflection as _reflection
|
|
26
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
27
|
+
# @@protoc_insertion_point(imports)
|
|
28
|
+
|
|
29
|
+
_sym_db = _symbol_database.Default()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
DESCRIPTOR = _descriptor.FileDescriptor(
|
|
35
|
+
name='gfootball/eval_server/proto/game_server.proto',
|
|
36
|
+
package='gfootball.eval_server',
|
|
37
|
+
syntax='proto3',
|
|
38
|
+
serialized_options=None,
|
|
39
|
+
serialized_pb=_b('\n-gfootball/eval_server/proto/game_server.proto\x12\x15gfootball.eval_server\"q\n\x13GetEnvResultRequest\x12\x14\n\x0cgame_version\x18\x01 \x01(\t\x12\x0f\n\x07game_id\x18\x02 \x01(\t\x12\x10\n\x08username\x18\x03 \x01(\t\x12\r\n\x05token\x18\x04 \x01(\t\x12\x12\n\nmodel_name\x18\x05 \x01(\t\"*\n\x14GetEnvResultResponse\x12\x12\n\nenv_result\x18\x01 \x01(\x0c\"\x8e\x01\n\x0bStepRequest\x12\x14\n\x0cgame_version\x18\x01 \x01(\t\x12\x0f\n\x07game_id\x18\x02 \x01(\t\x12\x10\n\x08username\x18\x03 \x01(\t\x12\r\n\x05token\x18\x04 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x05 \x01(\x05\x12\x12\n\nmodel_name\x18\x06 \x01(\t\x12\x13\n\x0b\x61\x63tion_list\x18\x07 \x03(\x05\"\"\n\x0cStepResponse\x12\x12\n\nenv_result\x18\x01 \x01(\x0c\"\x14\n\x12GetCapacityRequest\"1\n\x13GetCapacityResponse\x12\x1a\n\x12\x63\x61pacity_for_games\x18\x01 \x01(\x05\"y\n\x11\x43reateGameRequest\x12\x0f\n\x07game_id\x18\x01 \x01(\t\x12\x13\n\x0bleft_player\x18\x02 \x01(\t\x12\x14\n\x0cright_player\x18\x03 \x01(\t\x12\x19\n\x11include_rendering\x18\x04 \x01(\x08\x12\r\n\x05track\x18\x05 \x01(\t\"%\n\x12\x43reateGameResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\x97\x03\n\nGameServer\x12i\n\x0cGetEnvResult\x12*.gfootball.eval_server.GetEnvResultRequest\x1a+.gfootball.eval_server.GetEnvResultResponse\"\x00\x12Q\n\x04Step\x12\".gfootball.eval_server.StepRequest\x1a#.gfootball.eval_server.StepResponse\"\x00\x12\x66\n\x0bGetCapacity\x12).gfootball.eval_server.GetCapacityRequest\x1a*.gfootball.eval_server.GetCapacityResponse\"\x00\x12\x63\n\nCreateGame\x12(.gfootball.eval_server.CreateGameRequest\x1a).gfootball.eval_server.CreateGameResponse\"\x00\x62\x06proto3')
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
_GETENVRESULTREQUEST = _descriptor.Descriptor(
|
|
46
|
+
name='GetEnvResultRequest',
|
|
47
|
+
full_name='gfootball.eval_server.GetEnvResultRequest',
|
|
48
|
+
filename=None,
|
|
49
|
+
file=DESCRIPTOR,
|
|
50
|
+
containing_type=None,
|
|
51
|
+
fields=[
|
|
52
|
+
_descriptor.FieldDescriptor(
|
|
53
|
+
name='game_version', full_name='gfootball.eval_server.GetEnvResultRequest.game_version', index=0,
|
|
54
|
+
number=1, type=9, cpp_type=9, label=1,
|
|
55
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
56
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
57
|
+
is_extension=False, extension_scope=None,
|
|
58
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
59
|
+
_descriptor.FieldDescriptor(
|
|
60
|
+
name='game_id', full_name='gfootball.eval_server.GetEnvResultRequest.game_id', index=1,
|
|
61
|
+
number=2, type=9, cpp_type=9, label=1,
|
|
62
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
63
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
64
|
+
is_extension=False, extension_scope=None,
|
|
65
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
66
|
+
_descriptor.FieldDescriptor(
|
|
67
|
+
name='username', full_name='gfootball.eval_server.GetEnvResultRequest.username', index=2,
|
|
68
|
+
number=3, type=9, cpp_type=9, label=1,
|
|
69
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
70
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
71
|
+
is_extension=False, extension_scope=None,
|
|
72
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
73
|
+
_descriptor.FieldDescriptor(
|
|
74
|
+
name='token', full_name='gfootball.eval_server.GetEnvResultRequest.token', index=3,
|
|
75
|
+
number=4, type=9, cpp_type=9, label=1,
|
|
76
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
77
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
78
|
+
is_extension=False, extension_scope=None,
|
|
79
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
80
|
+
_descriptor.FieldDescriptor(
|
|
81
|
+
name='model_name', full_name='gfootball.eval_server.GetEnvResultRequest.model_name', index=4,
|
|
82
|
+
number=5, type=9, cpp_type=9, label=1,
|
|
83
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
84
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
85
|
+
is_extension=False, extension_scope=None,
|
|
86
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
87
|
+
],
|
|
88
|
+
extensions=[
|
|
89
|
+
],
|
|
90
|
+
nested_types=[],
|
|
91
|
+
enum_types=[
|
|
92
|
+
],
|
|
93
|
+
serialized_options=None,
|
|
94
|
+
is_extendable=False,
|
|
95
|
+
syntax='proto3',
|
|
96
|
+
extension_ranges=[],
|
|
97
|
+
oneofs=[
|
|
98
|
+
],
|
|
99
|
+
serialized_start=72,
|
|
100
|
+
serialized_end=185,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
_GETENVRESULTRESPONSE = _descriptor.Descriptor(
|
|
105
|
+
name='GetEnvResultResponse',
|
|
106
|
+
full_name='gfootball.eval_server.GetEnvResultResponse',
|
|
107
|
+
filename=None,
|
|
108
|
+
file=DESCRIPTOR,
|
|
109
|
+
containing_type=None,
|
|
110
|
+
fields=[
|
|
111
|
+
_descriptor.FieldDescriptor(
|
|
112
|
+
name='env_result', full_name='gfootball.eval_server.GetEnvResultResponse.env_result', index=0,
|
|
113
|
+
number=1, type=12, cpp_type=9, label=1,
|
|
114
|
+
has_default_value=False, default_value=_b(""),
|
|
115
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
116
|
+
is_extension=False, extension_scope=None,
|
|
117
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
118
|
+
],
|
|
119
|
+
extensions=[
|
|
120
|
+
],
|
|
121
|
+
nested_types=[],
|
|
122
|
+
enum_types=[
|
|
123
|
+
],
|
|
124
|
+
serialized_options=None,
|
|
125
|
+
is_extendable=False,
|
|
126
|
+
syntax='proto3',
|
|
127
|
+
extension_ranges=[],
|
|
128
|
+
oneofs=[
|
|
129
|
+
],
|
|
130
|
+
serialized_start=187,
|
|
131
|
+
serialized_end=229,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
_STEPREQUEST = _descriptor.Descriptor(
|
|
136
|
+
name='StepRequest',
|
|
137
|
+
full_name='gfootball.eval_server.StepRequest',
|
|
138
|
+
filename=None,
|
|
139
|
+
file=DESCRIPTOR,
|
|
140
|
+
containing_type=None,
|
|
141
|
+
fields=[
|
|
142
|
+
_descriptor.FieldDescriptor(
|
|
143
|
+
name='game_version', full_name='gfootball.eval_server.StepRequest.game_version', index=0,
|
|
144
|
+
number=1, type=9, cpp_type=9, label=1,
|
|
145
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
146
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
147
|
+
is_extension=False, extension_scope=None,
|
|
148
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
149
|
+
_descriptor.FieldDescriptor(
|
|
150
|
+
name='game_id', full_name='gfootball.eval_server.StepRequest.game_id', index=1,
|
|
151
|
+
number=2, type=9, cpp_type=9, label=1,
|
|
152
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
153
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
154
|
+
is_extension=False, extension_scope=None,
|
|
155
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
156
|
+
_descriptor.FieldDescriptor(
|
|
157
|
+
name='username', full_name='gfootball.eval_server.StepRequest.username', index=2,
|
|
158
|
+
number=3, type=9, cpp_type=9, label=1,
|
|
159
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
160
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
161
|
+
is_extension=False, extension_scope=None,
|
|
162
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
163
|
+
_descriptor.FieldDescriptor(
|
|
164
|
+
name='token', full_name='gfootball.eval_server.StepRequest.token', index=3,
|
|
165
|
+
number=4, type=9, cpp_type=9, label=1,
|
|
166
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
167
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
168
|
+
is_extension=False, extension_scope=None,
|
|
169
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
170
|
+
_descriptor.FieldDescriptor(
|
|
171
|
+
name='action', full_name='gfootball.eval_server.StepRequest.action', index=4,
|
|
172
|
+
number=5, type=5, cpp_type=1, label=1,
|
|
173
|
+
has_default_value=False, default_value=0,
|
|
174
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
175
|
+
is_extension=False, extension_scope=None,
|
|
176
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
177
|
+
_descriptor.FieldDescriptor(
|
|
178
|
+
name='model_name', full_name='gfootball.eval_server.StepRequest.model_name', index=5,
|
|
179
|
+
number=6, type=9, cpp_type=9, label=1,
|
|
180
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
181
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
182
|
+
is_extension=False, extension_scope=None,
|
|
183
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
184
|
+
_descriptor.FieldDescriptor(
|
|
185
|
+
name='action_list', full_name='gfootball.eval_server.StepRequest.action_list', index=6,
|
|
186
|
+
number=7, type=5, cpp_type=1, label=3,
|
|
187
|
+
has_default_value=False, default_value=[],
|
|
188
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
189
|
+
is_extension=False, extension_scope=None,
|
|
190
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
191
|
+
],
|
|
192
|
+
extensions=[
|
|
193
|
+
],
|
|
194
|
+
nested_types=[],
|
|
195
|
+
enum_types=[
|
|
196
|
+
],
|
|
197
|
+
serialized_options=None,
|
|
198
|
+
is_extendable=False,
|
|
199
|
+
syntax='proto3',
|
|
200
|
+
extension_ranges=[],
|
|
201
|
+
oneofs=[
|
|
202
|
+
],
|
|
203
|
+
serialized_start=232,
|
|
204
|
+
serialized_end=374,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
_STEPRESPONSE = _descriptor.Descriptor(
|
|
209
|
+
name='StepResponse',
|
|
210
|
+
full_name='gfootball.eval_server.StepResponse',
|
|
211
|
+
filename=None,
|
|
212
|
+
file=DESCRIPTOR,
|
|
213
|
+
containing_type=None,
|
|
214
|
+
fields=[
|
|
215
|
+
_descriptor.FieldDescriptor(
|
|
216
|
+
name='env_result', full_name='gfootball.eval_server.StepResponse.env_result', index=0,
|
|
217
|
+
number=1, type=12, cpp_type=9, label=1,
|
|
218
|
+
has_default_value=False, default_value=_b(""),
|
|
219
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
220
|
+
is_extension=False, extension_scope=None,
|
|
221
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
222
|
+
],
|
|
223
|
+
extensions=[
|
|
224
|
+
],
|
|
225
|
+
nested_types=[],
|
|
226
|
+
enum_types=[
|
|
227
|
+
],
|
|
228
|
+
serialized_options=None,
|
|
229
|
+
is_extendable=False,
|
|
230
|
+
syntax='proto3',
|
|
231
|
+
extension_ranges=[],
|
|
232
|
+
oneofs=[
|
|
233
|
+
],
|
|
234
|
+
serialized_start=376,
|
|
235
|
+
serialized_end=410,
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
_GETCAPACITYREQUEST = _descriptor.Descriptor(
|
|
240
|
+
name='GetCapacityRequest',
|
|
241
|
+
full_name='gfootball.eval_server.GetCapacityRequest',
|
|
242
|
+
filename=None,
|
|
243
|
+
file=DESCRIPTOR,
|
|
244
|
+
containing_type=None,
|
|
245
|
+
fields=[
|
|
246
|
+
],
|
|
247
|
+
extensions=[
|
|
248
|
+
],
|
|
249
|
+
nested_types=[],
|
|
250
|
+
enum_types=[
|
|
251
|
+
],
|
|
252
|
+
serialized_options=None,
|
|
253
|
+
is_extendable=False,
|
|
254
|
+
syntax='proto3',
|
|
255
|
+
extension_ranges=[],
|
|
256
|
+
oneofs=[
|
|
257
|
+
],
|
|
258
|
+
serialized_start=412,
|
|
259
|
+
serialized_end=432,
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
_GETCAPACITYRESPONSE = _descriptor.Descriptor(
|
|
264
|
+
name='GetCapacityResponse',
|
|
265
|
+
full_name='gfootball.eval_server.GetCapacityResponse',
|
|
266
|
+
filename=None,
|
|
267
|
+
file=DESCRIPTOR,
|
|
268
|
+
containing_type=None,
|
|
269
|
+
fields=[
|
|
270
|
+
_descriptor.FieldDescriptor(
|
|
271
|
+
name='capacity_for_games', full_name='gfootball.eval_server.GetCapacityResponse.capacity_for_games', index=0,
|
|
272
|
+
number=1, type=5, cpp_type=1, label=1,
|
|
273
|
+
has_default_value=False, default_value=0,
|
|
274
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
275
|
+
is_extension=False, extension_scope=None,
|
|
276
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
277
|
+
],
|
|
278
|
+
extensions=[
|
|
279
|
+
],
|
|
280
|
+
nested_types=[],
|
|
281
|
+
enum_types=[
|
|
282
|
+
],
|
|
283
|
+
serialized_options=None,
|
|
284
|
+
is_extendable=False,
|
|
285
|
+
syntax='proto3',
|
|
286
|
+
extension_ranges=[],
|
|
287
|
+
oneofs=[
|
|
288
|
+
],
|
|
289
|
+
serialized_start=434,
|
|
290
|
+
serialized_end=483,
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
_CREATEGAMEREQUEST = _descriptor.Descriptor(
|
|
295
|
+
name='CreateGameRequest',
|
|
296
|
+
full_name='gfootball.eval_server.CreateGameRequest',
|
|
297
|
+
filename=None,
|
|
298
|
+
file=DESCRIPTOR,
|
|
299
|
+
containing_type=None,
|
|
300
|
+
fields=[
|
|
301
|
+
_descriptor.FieldDescriptor(
|
|
302
|
+
name='game_id', full_name='gfootball.eval_server.CreateGameRequest.game_id', index=0,
|
|
303
|
+
number=1, type=9, cpp_type=9, label=1,
|
|
304
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
305
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
306
|
+
is_extension=False, extension_scope=None,
|
|
307
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
308
|
+
_descriptor.FieldDescriptor(
|
|
309
|
+
name='left_player', full_name='gfootball.eval_server.CreateGameRequest.left_player', index=1,
|
|
310
|
+
number=2, type=9, cpp_type=9, label=1,
|
|
311
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
312
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
313
|
+
is_extension=False, extension_scope=None,
|
|
314
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
315
|
+
_descriptor.FieldDescriptor(
|
|
316
|
+
name='right_player', full_name='gfootball.eval_server.CreateGameRequest.right_player', index=2,
|
|
317
|
+
number=3, type=9, cpp_type=9, label=1,
|
|
318
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
319
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
320
|
+
is_extension=False, extension_scope=None,
|
|
321
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
322
|
+
_descriptor.FieldDescriptor(
|
|
323
|
+
name='include_rendering', full_name='gfootball.eval_server.CreateGameRequest.include_rendering', index=3,
|
|
324
|
+
number=4, type=8, cpp_type=7, label=1,
|
|
325
|
+
has_default_value=False, default_value=False,
|
|
326
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
327
|
+
is_extension=False, extension_scope=None,
|
|
328
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
329
|
+
_descriptor.FieldDescriptor(
|
|
330
|
+
name='track', full_name='gfootball.eval_server.CreateGameRequest.track', index=4,
|
|
331
|
+
number=5, type=9, cpp_type=9, label=1,
|
|
332
|
+
has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
333
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
334
|
+
is_extension=False, extension_scope=None,
|
|
335
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
336
|
+
],
|
|
337
|
+
extensions=[
|
|
338
|
+
],
|
|
339
|
+
nested_types=[],
|
|
340
|
+
enum_types=[
|
|
341
|
+
],
|
|
342
|
+
serialized_options=None,
|
|
343
|
+
is_extendable=False,
|
|
344
|
+
syntax='proto3',
|
|
345
|
+
extension_ranges=[],
|
|
346
|
+
oneofs=[
|
|
347
|
+
],
|
|
348
|
+
serialized_start=485,
|
|
349
|
+
serialized_end=606,
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
_CREATEGAMERESPONSE = _descriptor.Descriptor(
|
|
354
|
+
name='CreateGameResponse',
|
|
355
|
+
full_name='gfootball.eval_server.CreateGameResponse',
|
|
356
|
+
filename=None,
|
|
357
|
+
file=DESCRIPTOR,
|
|
358
|
+
containing_type=None,
|
|
359
|
+
fields=[
|
|
360
|
+
_descriptor.FieldDescriptor(
|
|
361
|
+
name='success', full_name='gfootball.eval_server.CreateGameResponse.success', index=0,
|
|
362
|
+
number=1, type=8, cpp_type=7, label=1,
|
|
363
|
+
has_default_value=False, default_value=False,
|
|
364
|
+
message_type=None, enum_type=None, containing_type=None,
|
|
365
|
+
is_extension=False, extension_scope=None,
|
|
366
|
+
serialized_options=None, file=DESCRIPTOR),
|
|
367
|
+
],
|
|
368
|
+
extensions=[
|
|
369
|
+
],
|
|
370
|
+
nested_types=[],
|
|
371
|
+
enum_types=[
|
|
372
|
+
],
|
|
373
|
+
serialized_options=None,
|
|
374
|
+
is_extendable=False,
|
|
375
|
+
syntax='proto3',
|
|
376
|
+
extension_ranges=[],
|
|
377
|
+
oneofs=[
|
|
378
|
+
],
|
|
379
|
+
serialized_start=608,
|
|
380
|
+
serialized_end=645,
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
DESCRIPTOR.message_types_by_name['GetEnvResultRequest'] = _GETENVRESULTREQUEST
|
|
384
|
+
DESCRIPTOR.message_types_by_name['GetEnvResultResponse'] = _GETENVRESULTRESPONSE
|
|
385
|
+
DESCRIPTOR.message_types_by_name['StepRequest'] = _STEPREQUEST
|
|
386
|
+
DESCRIPTOR.message_types_by_name['StepResponse'] = _STEPRESPONSE
|
|
387
|
+
DESCRIPTOR.message_types_by_name['GetCapacityRequest'] = _GETCAPACITYREQUEST
|
|
388
|
+
DESCRIPTOR.message_types_by_name['GetCapacityResponse'] = _GETCAPACITYRESPONSE
|
|
389
|
+
DESCRIPTOR.message_types_by_name['CreateGameRequest'] = _CREATEGAMEREQUEST
|
|
390
|
+
DESCRIPTOR.message_types_by_name['CreateGameResponse'] = _CREATEGAMERESPONSE
|
|
391
|
+
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
|
392
|
+
|
|
393
|
+
GetEnvResultRequest = _reflection.GeneratedProtocolMessageType('GetEnvResultRequest', (_message.Message,), {
|
|
394
|
+
'DESCRIPTOR' : _GETENVRESULTREQUEST,
|
|
395
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
396
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.GetEnvResultRequest)
|
|
397
|
+
})
|
|
398
|
+
_sym_db.RegisterMessage(GetEnvResultRequest)
|
|
399
|
+
|
|
400
|
+
GetEnvResultResponse = _reflection.GeneratedProtocolMessageType('GetEnvResultResponse', (_message.Message,), {
|
|
401
|
+
'DESCRIPTOR' : _GETENVRESULTRESPONSE,
|
|
402
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
403
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.GetEnvResultResponse)
|
|
404
|
+
})
|
|
405
|
+
_sym_db.RegisterMessage(GetEnvResultResponse)
|
|
406
|
+
|
|
407
|
+
StepRequest = _reflection.GeneratedProtocolMessageType('StepRequest', (_message.Message,), {
|
|
408
|
+
'DESCRIPTOR' : _STEPREQUEST,
|
|
409
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
410
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.StepRequest)
|
|
411
|
+
})
|
|
412
|
+
_sym_db.RegisterMessage(StepRequest)
|
|
413
|
+
|
|
414
|
+
StepResponse = _reflection.GeneratedProtocolMessageType('StepResponse', (_message.Message,), {
|
|
415
|
+
'DESCRIPTOR' : _STEPRESPONSE,
|
|
416
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
417
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.StepResponse)
|
|
418
|
+
})
|
|
419
|
+
_sym_db.RegisterMessage(StepResponse)
|
|
420
|
+
|
|
421
|
+
GetCapacityRequest = _reflection.GeneratedProtocolMessageType('GetCapacityRequest', (_message.Message,), {
|
|
422
|
+
'DESCRIPTOR' : _GETCAPACITYREQUEST,
|
|
423
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
424
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.GetCapacityRequest)
|
|
425
|
+
})
|
|
426
|
+
_sym_db.RegisterMessage(GetCapacityRequest)
|
|
427
|
+
|
|
428
|
+
GetCapacityResponse = _reflection.GeneratedProtocolMessageType('GetCapacityResponse', (_message.Message,), {
|
|
429
|
+
'DESCRIPTOR' : _GETCAPACITYRESPONSE,
|
|
430
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
431
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.GetCapacityResponse)
|
|
432
|
+
})
|
|
433
|
+
_sym_db.RegisterMessage(GetCapacityResponse)
|
|
434
|
+
|
|
435
|
+
CreateGameRequest = _reflection.GeneratedProtocolMessageType('CreateGameRequest', (_message.Message,), {
|
|
436
|
+
'DESCRIPTOR' : _CREATEGAMEREQUEST,
|
|
437
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
438
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.CreateGameRequest)
|
|
439
|
+
})
|
|
440
|
+
_sym_db.RegisterMessage(CreateGameRequest)
|
|
441
|
+
|
|
442
|
+
CreateGameResponse = _reflection.GeneratedProtocolMessageType('CreateGameResponse', (_message.Message,), {
|
|
443
|
+
'DESCRIPTOR' : _CREATEGAMERESPONSE,
|
|
444
|
+
'__module__' : 'cuju.gfootball.eval_server.proto.game_server_pb2'
|
|
445
|
+
# @@protoc_insertion_point(class_scope:gfootball.eval_server.CreateGameResponse)
|
|
446
|
+
})
|
|
447
|
+
_sym_db.RegisterMessage(CreateGameResponse)
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
_GAMESERVER = _descriptor.ServiceDescriptor(
|
|
452
|
+
name='GameServer',
|
|
453
|
+
full_name='gfootball.eval_server.GameServer',
|
|
454
|
+
file=DESCRIPTOR,
|
|
455
|
+
index=0,
|
|
456
|
+
serialized_options=None,
|
|
457
|
+
serialized_start=648,
|
|
458
|
+
serialized_end=1055,
|
|
459
|
+
methods=[
|
|
460
|
+
_descriptor.MethodDescriptor(
|
|
461
|
+
name='GetEnvResult',
|
|
462
|
+
full_name='gfootball.eval_server.GameServer.GetEnvResult',
|
|
463
|
+
index=0,
|
|
464
|
+
containing_service=None,
|
|
465
|
+
input_type=_GETENVRESULTREQUEST,
|
|
466
|
+
output_type=_GETENVRESULTRESPONSE,
|
|
467
|
+
serialized_options=None,
|
|
468
|
+
),
|
|
469
|
+
_descriptor.MethodDescriptor(
|
|
470
|
+
name='Step',
|
|
471
|
+
full_name='gfootball.eval_server.GameServer.Step',
|
|
472
|
+
index=1,
|
|
473
|
+
containing_service=None,
|
|
474
|
+
input_type=_STEPREQUEST,
|
|
475
|
+
output_type=_STEPRESPONSE,
|
|
476
|
+
serialized_options=None,
|
|
477
|
+
),
|
|
478
|
+
_descriptor.MethodDescriptor(
|
|
479
|
+
name='GetCapacity',
|
|
480
|
+
full_name='gfootball.eval_server.GameServer.GetCapacity',
|
|
481
|
+
index=2,
|
|
482
|
+
containing_service=None,
|
|
483
|
+
input_type=_GETCAPACITYREQUEST,
|
|
484
|
+
output_type=_GETCAPACITYRESPONSE,
|
|
485
|
+
serialized_options=None,
|
|
486
|
+
),
|
|
487
|
+
_descriptor.MethodDescriptor(
|
|
488
|
+
name='CreateGame',
|
|
489
|
+
full_name='gfootball.eval_server.GameServer.CreateGame',
|
|
490
|
+
index=3,
|
|
491
|
+
containing_service=None,
|
|
492
|
+
input_type=_CREATEGAMEREQUEST,
|
|
493
|
+
output_type=_CREATEGAMERESPONSE,
|
|
494
|
+
serialized_options=None,
|
|
495
|
+
),
|
|
496
|
+
])
|
|
497
|
+
_sym_db.RegisterServiceDescriptor(_GAMESERVER)
|
|
498
|
+
|
|
499
|
+
DESCRIPTOR.services_by_name['GameServer'] = _GAMESERVER
|
|
500
|
+
|
|
501
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# Copyright 2019 Google LLC
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# Modified by the cuju Authors in 2026, in the import lines that ci/port_gfootball.py lists.
|
|
15
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
18
|
+
import grpc
|
|
19
|
+
|
|
20
|
+
from cuju.gfootball.eval_server.proto import game_server_pb2 as gfootball_dot_eval__server_dot_proto_dot_game__server__pb2
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class GameServerStub(object):
|
|
24
|
+
# missing associated documentation comment in .proto file
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
def __init__(self, channel):
|
|
28
|
+
"""Constructor.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
channel: A grpc.Channel.
|
|
32
|
+
"""
|
|
33
|
+
self.GetEnvResult = channel.unary_unary(
|
|
34
|
+
'/gfootball.eval_server.GameServer/GetEnvResult',
|
|
35
|
+
request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultRequest.SerializeToString,
|
|
36
|
+
response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultResponse.FromString,
|
|
37
|
+
)
|
|
38
|
+
self.Step = channel.unary_unary(
|
|
39
|
+
'/gfootball.eval_server.GameServer/Step',
|
|
40
|
+
request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepRequest.SerializeToString,
|
|
41
|
+
response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepResponse.FromString,
|
|
42
|
+
)
|
|
43
|
+
self.GetCapacity = channel.unary_unary(
|
|
44
|
+
'/gfootball.eval_server.GameServer/GetCapacity',
|
|
45
|
+
request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityRequest.SerializeToString,
|
|
46
|
+
response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityResponse.FromString,
|
|
47
|
+
)
|
|
48
|
+
self.CreateGame = channel.unary_unary(
|
|
49
|
+
'/gfootball.eval_server.GameServer/CreateGame',
|
|
50
|
+
request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameRequest.SerializeToString,
|
|
51
|
+
response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameResponse.FromString,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class GameServerServicer(object):
|
|
56
|
+
# missing associated documentation comment in .proto file
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
def GetEnvResult(self, request, context):
|
|
60
|
+
"""Rpc for obtaining the current state.
|
|
61
|
+
"""
|
|
62
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
63
|
+
context.set_details('Method not implemented!')
|
|
64
|
+
raise NotImplementedError('Method not implemented!')
|
|
65
|
+
|
|
66
|
+
def Step(self, request, context):
|
|
67
|
+
"""Rpc for doing a step in the environment and obtaining a state after that.
|
|
68
|
+
"""
|
|
69
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
70
|
+
context.set_details('Method not implemented!')
|
|
71
|
+
raise NotImplementedError('Method not implemented!')
|
|
72
|
+
|
|
73
|
+
def GetCapacity(self, request, context):
|
|
74
|
+
"""Rpc for informing Master how many games can still be scheduled on this GS.
|
|
75
|
+
"""
|
|
76
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
77
|
+
context.set_details('Method not implemented!')
|
|
78
|
+
raise NotImplementedError('Method not implemented!')
|
|
79
|
+
|
|
80
|
+
def CreateGame(self, request, context):
|
|
81
|
+
"""Rpc to create a new game instance, only called by Master.
|
|
82
|
+
"""
|
|
83
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
84
|
+
context.set_details('Method not implemented!')
|
|
85
|
+
raise NotImplementedError('Method not implemented!')
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def add_GameServerServicer_to_server(servicer, server):
|
|
89
|
+
rpc_method_handlers = {
|
|
90
|
+
'GetEnvResult': grpc.unary_unary_rpc_method_handler(
|
|
91
|
+
servicer.GetEnvResult,
|
|
92
|
+
request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultRequest.FromString,
|
|
93
|
+
response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultResponse.SerializeToString,
|
|
94
|
+
),
|
|
95
|
+
'Step': grpc.unary_unary_rpc_method_handler(
|
|
96
|
+
servicer.Step,
|
|
97
|
+
request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepRequest.FromString,
|
|
98
|
+
response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepResponse.SerializeToString,
|
|
99
|
+
),
|
|
100
|
+
'GetCapacity': grpc.unary_unary_rpc_method_handler(
|
|
101
|
+
servicer.GetCapacity,
|
|
102
|
+
request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityRequest.FromString,
|
|
103
|
+
response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityResponse.SerializeToString,
|
|
104
|
+
),
|
|
105
|
+
'CreateGame': grpc.unary_unary_rpc_method_handler(
|
|
106
|
+
servicer.CreateGame,
|
|
107
|
+
request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameRequest.FromString,
|
|
108
|
+
response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameResponse.SerializeToString,
|
|
109
|
+
),
|
|
110
|
+
}
|
|
111
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
112
|
+
'gfootball.eval_server.GameServer', rpc_method_handlers)
|
|
113
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2019 Google LLC
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package gfootball.eval_server;
|
|
7
|
+
|
|
8
|
+
message StartGameRequest {
|
|
9
|
+
string game_version = 1; // string to check if client and server have matching versions
|
|
10
|
+
string username = 2;
|
|
11
|
+
string token = 3;
|
|
12
|
+
string model_name = 4;
|
|
13
|
+
bool include_rendering = 5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message StartGameResponse {
|
|
17
|
+
string game_server_address = 1;
|
|
18
|
+
string game_id = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
service Master {
|
|
22
|
+
// Starts a game, returns side id and game server address.
|
|
23
|
+
rpc StartGame(StartGameRequest) returns (StartGameResponse) {}
|
|
24
|
+
}
|
|
25
|
+
|