In the octagon below all sides have the length $1$ and all angles are equal.
Determine the distance between the corners $A$ and $B$.
[img]https://1.bp.blogspot.com/-i6TAFDvcQ8w/XzXCRhnV_kI/AAAAAAAAMVw/rKrQMfPYYJIaCwl8hhdVHdqO4fIn8O7cwCLcBGAsYHQ/s0/2011%2BMogh%2Bp2.png[/img]
1. **Identify the properties of the regular octagon:**
   - All sides are of equal length, \( s = 1 \).
   - All internal angles are equal, each being \( 135^\circ \).

2. **Extend the non-parallel sides containing \( A \) and \( B \) to intersect at point \( C \):**
   - Since the octagon is regular, the angle between any two adjacent sides is \( 135^\circ \).
   - The lines extended from \( A \) and \( B \) will intersect at a right angle \( C \) because the internal angle of \( 135^\circ \) plus the external angle of \( 45^\circ \) (from the extension) sums to \( 180^\circ \).

3. **Calculate the lengths \( AC \) and \( BC \):**
   - The distance from \( A \) to the intersection point \( C \) can be broken down into two segments: the side of the octagon and the projection along the diagonal.
   - The projection along the diagonal of a unit square (formed by two adjacent sides of the octagon) is \( \frac{\sqrt{2}}{2} \).
   - Therefore, \( AC = 1 + \frac{\sqrt{2}}{2} \) and similarly \( BC = 1 + \frac{\sqrt{2}}{2} \).

4. **Use the properties of the \( 45^\circ-45^\circ-90^\circ \) triangle \( \Delta ACB \):**
   - In a \( 45^\circ-45^\circ-90^\circ \) triangle, the hypotenuse is \( \sqrt{2} \) times the length of each leg.
   - Here, the legs \( AC \) and \( BC \) are both \( 1 + \frac{\sqrt{2}}{2} \).

5. **Calculate the hypotenuse \( AB \):**
   \[
   AB = \sqrt{2} \left(1 + \frac{\sqrt{2}}{2}\right)
   \]
   \[
   AB = \sqrt{2} \cdot 1 + \sqrt{2} \cdot \frac{\sqrt{2}}{2}
   \]
   \[
   AB = \sqrt{2} + \frac{2}{2}
   \]
   \[
   AB = \sqrt{2} + 1
   \]

6. **Conclude the distance between \( A \) and \( B \):**
   \[
   AB = 1 + \sqrt{2}
   \]

The final answer is \( \boxed{1 + \sqrt{2}} \).