Shortest pathway across a snakes and ladders board (Update)
Named tuples are a good idea here. If you need to mutate the data you should instead use dataclasses.dataclass. But as there is no need here it's good.
I'd suggest changing your nodes to contain snakes, ladders, and the start and end of the board. This is as you don't need to build the empty spaces as they are only used as distances.

Since you need the distance between two nodes, then you need to calculate the distance at creation, not during the calculations.
I've simplified calculating the distance between each node. You should take into account the following special cases:


If the distance between two nodes is 12, and there is a snake or ladder halfway between them, it takes 3 rather than 2 turns to travel between the nodes.
If there are 6 snakes or ladders after a node it's impossible to pass them without visiting those nodes.

Currently you have Edge with a start, end and cost. I would suggest you instead split this into a Node with a start, end and edges. And an Edge that has a distance and a node.

It should be noted that the start and end should only be used when creating the graph. The node will then just turn into glorified list.
It should be noted that Node should be called Vertex if you want to keep with 'pure' graph theory naming.
Please ignore my implementation of Dijkstra's algorithm, it's not great. And half way I came across some hashing problems, hence the path[node[:2]] ickyness. I don't recommend you take inspiration from it - unless it's how not to code.

This means if the graph is setup, incorrectly, to have two ladders over the same space, then some bugs may appear.


All of this together can look like:

from collections import namedtuple
from dataclasses import dataclass, field
from typing import *  # Against best-practice but shhh
import math

Edge = namedtuple('Edge', 'distance node'.split())


class Node(namedtuple('Node', 'start end edges'.split())):
    def __str__(self):
        return f'{self.start} -&gt; {self.end}'


@dataclass(order=True)
class Path:
    distance: int
    current: Node=field(compare=False)
    previous: Node=field(compare=False)


@dataclass
class Graph:
    nodes: List[Node]

    def shortest_paths(self, start: Node) -&gt; Dict[Node, Path]:
        if start not in self.nodes:
            raise ValueError("Graph doesn't contain start node.")
        paths = {}
        queue = []
        for node in self.nodes:
            path = Path(float('inf'), node, None)
            paths[node[:2]] = path
            queue.append(path)

        paths[start[:2]].distance = 0
        queue.sort(reverse=True)
        while queue:
            node = queue.pop()
            for neighbor in node.current.edges:
                alt = node.distance + neighbor.distance
                path = paths[neighbor.node[:2]]
                if alt &lt; path.distance:
                    path.distance = alt
                    path.previous = node
            queue.sort(reverse=True)
        return paths

    def shortest_path(self, start: Node, end: Node) -&gt; List[Tuple[int, Node]]:
        if end not in self.nodes:
            raise ValueError("Graph doesn't contain end node.")
        paths = self.shortest_paths(start)
        node = paths[end[:2]]
        output = []
        while node is not None:
            output.append((node.distance, node.current))
            node = node.previous
        return list(reversed(output))


def build_nodes(snakes: List[Tuple[int, int]], size: int) -&gt; List[Node]:
    return [
        Node(1, 1, []),
        Node(size, size, [])
    ] + [
        Node(start, end, [])
        for start, end in snakes
    ]


# There are some edgecases that will need to be handled.
def calculate_distance(start: Node, end: Node, nodes: List[Node]):
    distance = int(math.ceil((end.start - start.end) / 6))
    start.edges.append(Edge(distance, end))


def add_edges(nodes: List[Node]):
    for start in nodes:
        for end in nodes:
            if end.start &gt; start.end:
                calculate_distance(start, end, nodes)


def build_graph(edges: List[Tuple[int, int]], size: int):
    nodes = build_nodes(edges, size)
    add_edges(nodes)
    start, end = nodes[:2]
    return Graph(nodes), start, end


if __name__ == '__main__':
    graph, start, end = build_graph(
        [
            (  2, 520),
            (530, 500),
            (510, 999)
        ],
        1000,
    )
    for dist, node in graph.shortest_path(start, end):
        print(dist, node)


This outputs:

0 1 -&gt; 1
1 2 -&gt; 520
3 530 -&gt; 500
5 510 -&gt; 999
6 1000 -&gt; 1000