Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AI and Deep Learning by (50.2k points)

I am writing some code to participate in an AI challenge. The main objective of the AI challenge is to take a simulated robot and navigate it through a maze to a destination zone. The secondary objective which is optional is to find a recharger placed in the maze at an unknown location. This is all done in a 2D grid.

My program can call a method to get a distance measurement from the recharger. So using trilateration I should be able to locate the recharger by calling this method, recording my ai's current position and the distance the recharger is away from that point 3 times over.

I found this example of trilateration on Wikipedia http://en.wikipedia.org/wiki/Trilateration but this applies to a 3d space. I'm only dealing with a 2D space. Also, I don't understand how to use the formula shown in Wikipedia, searching the web for a working example with numbers plugged in and boiling down to the final coordinates is scarce with Google searches.

I'm not a math major; I am just an enthusiast exploring AI problems.

An explanation and step by step example of how to calculate the problem are what I need as mathematics is not my strong point. Below is some sample data:

  • Point 1: x=39, y=28, distance=8

  • Point 2: x=13, y=39, distance=11

  • Point 3: x=16, y=40, distance=8

Any example using my sample data would be greatly appreciated. The programming to this will be very straight forward once I can wrap my head around the mathematics.

closed

1 Answer

0 votes
by (107k points)
selected by
 
Best answer

The theory of trilateration is easy to understand through an example. Assume that you are driving through an unfamiliar country and that you are lost. A road sign shows that you are 500 km from city A. But this information is not of much help, as you could be anywhere in a circle of 500 km radius from the city A. A person you stop by to inquire for directions then volunteers that you are 450 km from city B. Now you are in a more approving position to locate yourself- you are at one of the two intersecting points of the two circles surrounding city A and city B. Now if you could also get your distance from another place say city C, you can locate yourself very precisely, as these three circles can intersect each other at just one point. This is the principle behind 2D trilateration.

For knowing the calculation of a 2D Trilateration Step by Step, refer to the following link:

https://www.physicsforums.com/threads/how-to-calculate-2d-trilateration-step-by-step.874246/

If you want to learn more about 2d Trilateration then visit this Python Course.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...