added <random> for better random numbers, added position based edge cost