Autor Beitrag
kuzmich
Hält's aus hier
Beiträge: 1



BeitragVerfasst: Do 13.07.06 14:22 
Too stupid to think out what could be the algorithm to solve this problem.
I`v got an maze, that consist of "0" and "1". I`ve got a start point and a end point. Is that possible to make an algorithm that finds out if there is a free way from starting to end point?

Example

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
S
10000
10000
11111
00001
00001
00011
00010
   E


In this example the waqy exists. Where S- starting and E-ending. The way is showed as 1`s. The zeros are for example walls.
crowley
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 406

Win XP, Win Vista, Mandriva, Ubuntu
Delphi 4-8, Delphi 2006, Delphi 2007
BeitragVerfasst: Do 13.07.06 14:26 
there was a similar problem posted some days ago:

you probably should try to use the pathfinding algorithm... a usable implementation you can find here: www.hanisch-software...iges/pathfinding.php