+ 1
How can one write an algorithm to get to some location in your home town eg for a local friend or a friend from out of town
21 ответ
+ 1
there are some pathfinding algorithms like "A* pathfinding algorithm" for that sort of stuff.
+ 1
A follow up to my question. Using python programming language.
+ 1
Simple
+ 1
Let me check it. But I am not familiar with java. And I have just started learning python.
+ 1
Not yet. I can make grocery lists
+ 1
So for a Pathfinding algorithm you will need to know what 2dimensional lists are and it would be good if you knew what objects are.
You can find multiple tutorials on A* or others on the web ...
+ 1
well you probably could somehow insert a map but it's easier if you just have a grid with cells and some cells in there are obstacles.
the second question i don't really get...
do you mean that the algorithm works on any point in the grid or what?
+ 1
definitly yes
+ 1
That's great. Let me c if I can find my way. I will post tomorrow. Thanks for your time
0
well it depends on how acurate you want it.
if you want sth. with geolocation and that I can't help you.
If you mean simple like in a grid from point A to B with obstacles, then I can help you
0
great 😂
well I made an algoritm once like that, but with Javascript ...
https://code.sololearn.com/WKrgz25kab1z/?ref=app
its not super efficient but its not hard
0
how well do you know lists and objects?
Oh and don't worry the code looks complicated but thats only because I'm really bad at structuring my code(s) 😅
0
List I can
0
ok ...can you make 2dimensinal lists?
0
since you don't know objects yet you will have to make multiple 2d lists and store some information in them
0
Can you give me what I should know so that I can research on it. The thing is I don't have a clue of how to solve that problem
0
ok a 2d list is sth like this
[
[0, 1],
[1, 2]
]
its basicly a list of lists; this way we can represent a grid
0
Let me check on this. Do you have to have a map inserted. Can the program be used from an point or its for a single path/ way only?????
0
Was saying is it possible to have an input of the starting point anywhere on the grid then the program leads U to the destination.
0
I get the impression you gave up... 😅😅😅