Autor Beitrag
glotzer
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Sa 27.11.10 20:12 
Hallo alle zusammen,

das problem ist eigentlich ganz einfach:

(- leer, #wand, o anfangspunkt, x endpunkt)
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
----o-----
#--#####--
----###-##
#---##-###
###----###
####---###
#####--###
###x---###

(edit 2: thx Gausi)

das ganze ist in feldern aufgebaut

jetzt suche ich eine möglichkeit den kürzesten weg von o nach x zu finden, ohne durch wände zu rennen. mein problem: ich hab keine ahnung wie das gehen könnte.

man wird wohl irgendwie eine schleife brauchen die sämtliche möglichkeiten durchprobiert. nur wie geht das?

danke im vorraus


Moderiert von user profile iconGausi: Quote- durch Code-Tags ersetzt. Dann klappts mit der Länge. ;-)


Zuletzt bearbeitet von glotzer am Sa 27.11.10 20:23, insgesamt 1-mal bearbeitet
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Sa 27.11.10 20:18 
Ich glaub wenn du gesucht hättest, wärst du sicher auf den Begriff A*-Algorithmus gestoßen. (sollte für dich ideal sein)

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.

Für diesen Beitrag haben gedankt: glotzer
glotzer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Sa 27.11.10 20:24 
oho, dass klignt gut, danke!

edit: uff das sieht schwierig aus...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 27.11.10 20:44 
glotzer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Sa 27.11.10 21:10 
uhm, welche davon?
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 27.11.10 21:21 
AStar vielleicht? :roll:

Für diesen Beitrag haben gedankt: glotzer
glotzer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Sa 27.11.10 21:27 
lol, da hätt ich auch selbst drauf kommen können... hab nach "findway" oder "pathfind" gesucht

danke
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Sa 27.11.10 21:36 
Ich hab mir die Demo nicht angeschaut, aber werfe trotzdem mal das Tutorial Pathfinding der DelpihGL in den Raum. Es ist vor allem sehr anfängerfreundlich gestaltet, ich habe es damit sofort verstanden. Ist ja auch eigentlich nicht schwer.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19274
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 28.11.10 02:52 
Und hier noch eine ausführliche Erklärung von Daniel aus der DP:
www.delphipraxis.net...as-hillclimbing.html
Leider sind die Bilder verloren gegangen, aber vielleicht hilft es ja trotzdem, auch der Anhang. ;-)
glotzer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: So 28.11.10 15:09 
danke :D
werd ich mir alles mal durchlesen