Dataset Viewer
Auto-converted to Parquet Duplicate
repo
stringlengths
2
91
file
stringlengths
14
211
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
1.36M
extension_type
stringclasses
1 value
TiKick
TiKick-main/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
1,788
35.510204
74
py
TiKick
TiKick-main/tmarl/__init__.py
__version__ = "0.0.3"
21
21
21
py
TiKick
TiKick-main/tmarl/networks/policy_network.py
import torch import torch.nn as nn from tmarl.networks.utils.util import init, check from tmarl.networks.utils.mlp import MLPBase, MLPLayer from tmarl.networks.utils.rnn import RNNLayer from tmarl.networks.utils.act import ACTLayer from tmarl.networks.utils.popart import PopArt from tmarl.utils.util import get_shape_...
5,558
41.113636
181
py
TiKick
TiKick-main/tmarl/networks/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
638
34.5
74
py
TiKick
TiKick-main/tmarl/networks/utils/distributions.py
import torch import torch.nn as nn from .util import init """ Modify standard PyTorch distributions so they are compatible with this code. """ # # Standardize distribution interfaces # # Categorical class FixedCategorical(torch.distributions.Categorical): def sample(self): return super().sample().unsque...
3,466
27.891667
86
py
TiKick
TiKick-main/tmarl/networks/utils/mlp.py
import torch.nn as nn from .util import init, get_clones class MLPLayer(nn.Module): def __init__(self, input_dim, hidden_size, layer_N, use_orthogonal, activation_id): super(MLPLayer, self).__init__() self._layer_N = layer_N active_func = [nn.Tanh(), nn.ReLU(), nn.LeakyReLU(), nn.ELU()]...
2,116
32.603175
98
py
TiKick
TiKick-main/tmarl/networks/utils/popart.py
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class PopArt(torch.nn.Module): def __init__(self, input_shape, output_shape, norm_axes=1, beta=0.99999, epsilon=1e-5, device=torch.device("cpu")): super(PopArt, self).__init__() self.bet...
3,796
38.968421
119
py
TiKick
TiKick-main/tmarl/networks/utils/util.py
import copy import numpy as np import torch import torch.nn as nn def init(module, weight_init, bias_init, gain=1): weight_init(module.weight.data, gain=gain) bias_init(module.bias.data) return module def get_clones(module, N): return nn.ModuleList([copy.deepcopy(module) for i in range(N)]) def che...
426
21.473684
76
py
TiKick
TiKick-main/tmarl/networks/utils/act.py
from .distributions import Bernoulli, Categorical, DiagGaussian import torch import torch.nn as nn class ACTLayer(nn.Module): def __init__(self, action_space, inputs_dim, use_orthogonal, gain): super(ACTLayer, self).__init__() self.multidiscrete_action = False self.continuous_action = Fal...
7,195
46.342105
121
py
TiKick
TiKick-main/tmarl/networks/utils/rnn.py
import torch import torch.nn as nn class RNNLayer(nn.Module): def __init__(self, inputs_dim, outputs_dim, recurrent_N, use_orthogonal): super(RNNLayer, self).__init__() self._recurrent_N = recurrent_N self._use_orthogonal = use_orthogonal self.rnn = nn.GRU(inputs_dim, outputs_dim...
2,816
34.2125
132
py
TiKick
TiKick-main/tmarl/drivers/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/drivers/shared_distributed/base_driver.py
import numpy as np import torch def _t2n(x): return x.detach().cpu().numpy() class Driver(object): def __init__(self, config, client=None): self.all_args = config['all_args'] self.envs = config['envs'] self.eval_envs = config['eval_envs'] self.device = config['device'] ...
4,244
39.04717
126
py
TiKick
TiKick-main/tmarl/drivers/shared_distributed/football_driver.py
from tqdm import tqdm import numpy as np from tmarl.drivers.shared_distributed.base_driver import Driver def _t2n(x): return x.detach().cpu().numpy() class FootballDriver(Driver): def __init__(self, config): super(FootballDriver, self).__init__(config) def run(self): self.trainer.prep_...
4,315
42.16
102
py
TiKick
TiKick-main/tmarl/envs/env_wrappers.py
""" Modified from OpenAI Baselines code to work with multi-agent envs """ import numpy as np from multiprocessing import Process, Pipe from abc import ABC, abstractmethod from tmarl.utils.util import tile_images class CloudpickleWrapper(object): """ Uses cloudpickle to serialize contents (otherwise multiproc...
15,351
32.373913
118
py
TiKick
TiKick-main/tmarl/envs/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/envs/football/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
638
34.5
74
py
TiKick
TiKick-main/tmarl/envs/football/football.py
import numpy as np import gym from ray.rllib.env.multi_agent_env import MultiAgentEnv import tmarl.envs.football.env as football_env class RllibGFootball(MultiAgentEnv): """An example of a wrapper for GFootball to make it compatible with rllib.""" def __init__(self, all_args, rank, log_dir=None, isEval=Fals...
11,164
38.038462
116
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/11_vs_11_kaggle.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
2,396
39.627119
77
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/11_vs_11_lazy.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
2,506
41.491525
77
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_3_vs_1_with_keeper.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,324
31.317073
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_empty_goal.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,179
30.052632
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_run_to_score_with_keeper.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,422
32.093023
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_counterattack_hard.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
2,186
36.706897
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_run_to_score.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,421
32.069767
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_empty_goal_close.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,180
30.078947
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_corner.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
2,118
35.534483
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/__init__.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,198
38.966667
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_pass_and_shoot_with_keeper.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,278
30.975
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_run_pass_and_shoot_with_keeper.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
1,278
30.975
74
py
TiKick
TiKick-main/tmarl/envs/football/scenarios/academy_counterattack_easy.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
2,185
36.689655
74
py
TiKick
TiKick-main/tmarl/envs/football/env/football_env_core.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
17,067
37.269058
91
py
TiKick
TiKick-main/tmarl/envs/football/env/script_helpers.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
4,449
32.712121
81
py
TiKick
TiKick-main/tmarl/envs/football/env/scenario_builder.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
4,305
33.725806
100
py
TiKick
TiKick-main/tmarl/envs/football/env/config.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
4,590
28.811688
92
py
TiKick
TiKick-main/tmarl/envs/football/env/__init__.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
11,541
41.748148
80
py
TiKick
TiKick-main/tmarl/envs/football/env/football_env.py
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
8,348
36.272321
80
py
TiKick
TiKick-main/tmarl/algorithms/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/algorithms/r_mappo_distributed/mappo_algorithm.py
import torch from tmarl.utils.valuenorm import ValueNorm # implement the loss of the MAPPO here class MAPPOAlgorithm(): def __init__(self, args, init_module, device=torch.device("cpu")): self.device = device self.tpdv = dict(dtype=torch.float32, ...
2,234
38.210526
147
py
TiKick
TiKick-main/tmarl/algorithms/r_mappo_distributed/mappo_module.py
import torch from tmarl.networks.policy_network import PolicyNetwork class MAPPOModule: def __init__(self, args, obs_space, share_obs_space, act_space, device=torch.device("cpu")): self.device = device self.lr = args.lr self.critic_lr = args.critic_lr self.opti_eps = args....
1,050
41.04
135
py
TiKick
TiKick-main/tmarl/algorithms/r_mappo_distributed/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
638
34.5
74
py
TiKick
TiKick-main/tmarl/loggers/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
1,011
27.914286
74
py
TiKick
TiKick-main/tmarl/loggers/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/loggers/TSee/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/replay_buffers/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/replay_buffers/normal/shared_buffer.py
import torch import numpy as np from collections import defaultdict from tmarl.utils.util import check,get_shape_from_obs_space, get_shape_from_act_space def _flatten(T, N, x): return x.reshape(T * N, *x.shape[2:]) def _cast(x): return x.transpose(1, 2, 0, 3).reshape(-1, *x.shape[3:]) class SharedReplayBuff...
28,769
52.081181
231
py
TiKick
TiKick-main/tmarl/replay_buffers/normal/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
638
34.5
74
py
TiKick
TiKick-main/tmarl/configs/config.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
10,665
55.734043
146
py
TiKick
TiKick-main/tmarl/configs/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 The TARTRL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
638
34.5
74
py
TiKick
TiKick-main/tmarl/wrappers/__init__.py
0
0
0
py
TiKick
TiKick-main/tmarl/wrappers/TWrapper/__init__.py
0
0
0
py
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
3