diff --git a/carl/envs/mario/pcg_smb_env/__init__.py b/carl/envs/mario/pcg_smb_env/__init__.py index b6df4047..cdbbf357 100644 --- a/carl/envs/mario/pcg_smb_env/__init__.py +++ b/carl/envs/mario/pcg_smb_env/__init__.py @@ -1,9 +1,8 @@ from functools import partial -from gym.envs.registration import register, registry +from gym.envs.registration import register from .mario_env import MarioEnv -from .toadgan.toad_gan import generate_level for level in range(1, 16): level_file = f"lvl-{level}.txt" diff --git a/carl/envs/mario/pcg_smb_env/mario_env.py b/carl/envs/mario/pcg_smb_env/mario_env.py index 1a9b0d2c..369e815b 100644 --- a/carl/envs/mario/pcg_smb_env/mario_env.py +++ b/carl/envs/mario/pcg_smb_env/mario_env.py @@ -246,7 +246,7 @@ def _receive(self): while len(frameBuffer) != self.frame_size: frameBuffer += self.socket.recv(self.frame_size) return frameBuffer - + def get_action_meanings(self) -> List[str]: return ACTION_MEANING diff --git a/carl/envs/mario/pcg_smb_env/toadgan/modules/generator.py b/carl/envs/mario/pcg_smb_env/toadgan/modules/generator.py index b0914012..c99f6fca 100644 --- a/carl/envs/mario/pcg_smb_env/toadgan/modules/generator.py +++ b/carl/envs/mario/pcg_smb_env/toadgan/modules/generator.py @@ -1,7 +1,6 @@ # Code from https://github.com/Mawiszus/TOAD-GAN from argparse import Namespace -import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor diff --git a/carl/envs/mario/pcg_smb_env/toadgan/toad_gan.py b/carl/envs/mario/pcg_smb_env/toadgan/toad_gan.py index c409ced1..b31f57f6 100644 --- a/carl/envs/mario/pcg_smb_env/toadgan/toad_gan.py +++ b/carl/envs/mario/pcg_smb_env/toadgan/toad_gan.py @@ -2,7 +2,6 @@ import os import sys from dataclasses import dataclass -from typing import Optional import torch from torch import Tensor