void run() {
		Vertex[] vertices = new Vertex[SIZE * SIZE];

		for (int x = 0; x < SIZE; x++) {
			for (int y = 0; y < SIZE; y++) {
				vertices[index(x, y)] = new Vertex(x, y);
			}
		}

		for (int x = 0; x < SIZE; x++) {
			for (int y = 0; y < SIZE; y++) {
				Vertex v = vertices[index(x, y)];
				// add left
				if (x > 0) {
					int target = index(x - 1, y);
					v.adjacencies
							.add(new Edge(vertices[target], MATRIX[target]));
				}
				// add right
				if (x < SIZE - 1) {
					int target = index(x + 1, y);
					v.adjacencies
							.add(new Edge(vertices[target], MATRIX[target]));
				}
				// add bottom
				if (y > 0) {
					int target = index(x, y - 1);
					v.adjacencies
							.add(new Edge(vertices[target], MATRIX[target]));
				}
				// add top
				if (y < SIZE - 1) {
					int target = index(x, y + 1);
					v.adjacencies
							.add(new Edge(vertices[target], MATRIX[target]));
				}
			}
		}
		int minimum = Integer.MAX_VALUE;
		computePaths(vertices[index(0, SIZE - 1)]);
		Vertex finish = vertices[index(SIZE - 1, 0)];
		if (finish.minDistance < minimum) {
			minimum = finish.minDistance;
		}
		print(minimum);
	}