Skip to content

Commit

Permalink
Fix TID252 Relative imports from parent modules are banned
Browse files Browse the repository at this point in the history
  • Loading branch information
woctezuma committed Feb 5, 2023
1 parent 1a25b3a commit 3a1e14a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions puissance4/agent/ai.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from ..configs.parameters import (
from puissance4.agent.ai_interface import InterfaceAI
from puissance4.configs.parameters import (
get_default_bias_to_obvious_steps,
get_default_max_num_steps_to_explore,
)
from .ai_interface import InterfaceAI


class AI(InterfaceAI):
Expand Down
4 changes: 2 additions & 2 deletions puissance4/agent/ai_interface.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from ..configs.parameters import (
from puissance4.configs.parameters import (
get_default_check_obvious_plays,
get_default_player_symbol,
)
from ..env.win_conditions import look_for_obvious_steps
from puissance4.env.win_conditions import look_for_obvious_steps


class InterfaceAI:
Expand Down
6 changes: 3 additions & 3 deletions puissance4/agent/mc.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import operator

from ..configs.parameters import (
from puissance4.agent.ai import AI
from puissance4.configs.parameters import (
get_default_action_sampling_strategy,
get_default_num_tirages_MC,
)
from ..env.grille import Grille
from .ai import AI
from puissance4.env.grille import Grille


class MC(AI):
Expand Down
8 changes: 4 additions & 4 deletions puissance4/agent/uct.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from math import log, sqrt
from random import choice

from ..configs.parameters import (
from puissance4.agent.mc import MC
from puissance4.configs.parameters import (
get_default_facteur_uct,
get_default_num_descentes_dans_arbre,
)
from ..env.grille import Grille
from ..lib.node import Node
from .mc import MC
from puissance4.env.grille import Grille
from puissance4.lib.node import Node


class UCT(MC):
Expand Down
6 changes: 3 additions & 3 deletions puissance4/play.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from random import shuffle

from .agent.uct import UCT
from .env.grille import Grille
from .lib.utils import (
from puissance4.agent.uct import UCT
from puissance4.env.grille import Grille
from puissance4.lib.utils import (
convert_player_input,
convert_to_column_display,
get_possible_player_inputs,
Expand Down
10 changes: 5 additions & 5 deletions puissance4/training.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from random import shuffle

from .agent.ai import AI
from .agent.mc import MC
from .agent.uct import UCT
from .env.grille import Grille
from .lib.utils import convert_to_column_display
from puissance4.agent.ai import AI
from puissance4.agent.mc import MC
from puissance4.agent.uct import UCT
from puissance4.env.grille import Grille
from puissance4.lib.utils import convert_to_column_display


def main():
Expand Down

0 comments on commit 3a1e14a

Please sign in to comment.