Пример #1
0
 def test_scenarios_are_at_least_loading(self):
   cfg = config.Config()
   for l in scenario_builder.all_scenarios():
     cfg['level'] = l
     unused_game_cfg = cfg.ScenarioConfig()
Пример #2
0
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Google Research Football."""

from gfootball.env import scenario_builder

import gym
from gym.envs.registration import register

for env_name in scenario_builder.all_scenarios():
    register(
        id='GFootball-{env_name}-SMM-v0'.format(env_name=env_name),
        entry_point='gfootball.env:create_environment',
        kwargs={
            'env_name': env_name,
            'representation': 'extracted'
        },
    )

    register(
        id='GFootball-{env_name}-Pixels-v0'.format(env_name=env_name),
        entry_point='gfootball.env:create_environment',
        kwargs={
            'env_name': env_name,
            'representation': 'pixels'