ADDITIONAL EXPLANATION:
Lets assume there is a robot in a room, and for every position in the room (a,b,c,d,e,f) the robot performs a scanning around it with a sonar to see if there is any obstacles. if the value is low, then there is an obstacle (low value means the sound from the sonar got back quickly, high value means that the sound from the sonar traveled longer distance before it went back to robot so there is not obstacle). the robot took 5 measurements for every position (a,b,c,d,e,f) . at the end there is that array i wrote, and then you place the robot at the position a, and you want to go to position f. so the robot must calculate which path to choose. i know that euclidean distance is used to see what point "looks similar" to the target in order to choose the correct path, but i dont know how exatcly it works. if you need more explanation i will respond as quickly as i can, i really need this help!!!
p.s. robot is in 2 dimensional space
p.s.2 an answer will be like "ABEF" like that
p.s. 3 for example the array of position a, a = [3 5 9 8 2] means that in the first measurement which could be e.g. north, the value "3" means there is an obstacle near... the third value "9" could be e.g. "SOUTHEAST" and means there is not obstacle near...