class SearchStats:
    def __init__(
        self,
        strategy_name,
        elapsed_ms,
        visited_cells,
        path_length
    ):
        self.strategy_name = strategy_name
        self.elapsed_ms = elapsed_ms
        self.visited_cells = visited_cells
        self.path_length = path_length

    def __str__(self):
        lines = [
            f"Strategy: {self.strategy_name}",
            f"Time: {self.elapsed_ms:.3f} ms",
            f"Visited: {self.visited_cells}",
            f"Path length: {self.path_length}"
        ]

        return "\n".join(lines)