let dist_euclid ((x,y) : pos) ((x',y') : pos) =
       sqrt ((float (x-x') ** 2.0) +. (float (y-y') ** 2.0))