# Minecraft Stronghold finder

Find a stronghold without wasting Eyes of Ender!
Instructions below.

## Instructions

Write your coordinates in *Initial X* and *Initial Z*. Throw the eye of
ender and place yourself right under it when it's hovering in the air.
Write your new coordinates in *Final X* and *Final Z* and
press *Add measurement*.

You'll get an estimate of the Stronghold's position as soon as you
have two measurements. In order to improve its accuracy, you should take your measurements far away from each other. After
taking the first measurement, move several hundred blocks to either
side. This prevents bearings which are close to parallel (bad
for estimation). Taking additional measurements also improves accuracy.

**Bad: **Close starting points amplify measurement
errors, giving you a bad estimate.

**Good: **Far away measurements give you an accurate
estimate.

**Better: **Additional measurements give you an even
better bearing.

## How it works

Each time you throw an Eye of Ender, the game is telling you that the
Stronghold is somewhere on a line that passes through the throwing
point and the landing point. So if you throw twice, from different
locations, you know the Stronghold is in the intersection of those two
lines.

However, there is a certain amount of error associated with each
measurement. To combat this, you can take more than two measurements,
which makes errors tend to cancel out. Since three or more lines don't
usually intersect in a single point, the assistant looks for the
point which is closest to all of the lines. It does this using a
mathematical technique called Linear
Least Squares