MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

graphs/greedy_best_first.py:107–117  ·  view source on GitHub ↗
(
        self, grid: list[list[int]], start: tuple[int, int], goal: tuple[int, int]
    )

Source from the content-addressed store, hash-verified

105 """
106
107 def __init__(
108 self, grid: list[list[int]], start: tuple[int, int], goal: tuple[int, int]
109 ):
110 self.grid = grid
111 self.start = Node(start[1], start[0], goal[1], goal[0], 0, None)
112 self.target = Node(goal[1], goal[0], goal[1], goal[0], 99999, None)
113
114 self.open_nodes = [self.start]
115 self.closed_nodes: list[Node] = []
116
117 self.reached = False
118
119 def search(self) -> Path | None:
120 """

Callers

nothing calls this directly

Calls 1

NodeClass · 0.70

Tested by

no test coverage detected