Click here to Skip to main content
15,891,951 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Shortest path related Pin
Alivemau528-Oct-09 12:57
Alivemau528-Oct-09 12:57 
GeneralRe: Shortest path related Pin
Member 419459328-Oct-09 15:55
Member 419459328-Oct-09 15:55 
GeneralRe: Shortest path related Pin
Alivemau528-Oct-09 16:29
Alivemau528-Oct-09 16:29 
GeneralRe: Shortest path related Pin
Member 419459328-Oct-09 17:26
Member 419459328-Oct-09 17:26 
GeneralRe: Shortest path related Pin
Alivemau528-Oct-09 18:48
Alivemau528-Oct-09 18:48 
GeneralRe: Shortest path related Pin
Member 419459329-Oct-09 5:02
Member 419459329-Oct-09 5:02 
GeneralRe: Shortest path related Pin
Alivemau530-Oct-09 5:09
Alivemau530-Oct-09 5:09 
GeneralRe: Shortest path related [modified] Pin
Alivemau530-Oct-09 5:50
Alivemau530-Oct-09 5:50 
It wasnt that hard =P

pseudocode:

First I orientate myself so that to my left is the obstacle.

Then i call M:
M:
   if there is wall to the left:
       if there is no wall to my diagonal left:
              move there
              rotate 90º left
              M()
       else:
              if there is wall infront:
                       rotate 90º to the right
                       M()
              else:
                       move there.
    else:
        throw exception


modified on Friday, October 30, 2009 1:23 PM

GeneralRe: Shortest path related Pin
Alivemau530-Oct-09 11:19
Alivemau530-Oct-09 11:19 
GeneralRe: Shortest path related Pin
Member 419459330-Oct-09 6:05
Member 419459330-Oct-09 6:05 
GeneralRe: Shortest path related Pin
Rozis29-Oct-09 12:31
Rozis29-Oct-09 12:31 
GeneralRe: Shortest path related Pin
novice__geek29-Oct-09 23:34
novice__geek29-Oct-09 23:34 
AnswerRe: Shortest path related Pin
ely_bob27-Oct-09 6:28
professionalely_bob27-Oct-09 6:28 
GeneralRe: Shortest path related Pin
Alivemau527-Oct-09 10:37
Alivemau527-Oct-09 10:37 
GeneralRe: Shortest path related Pin
Luc Pattyn27-Oct-09 11:23
sitebuilderLuc Pattyn27-Oct-09 11:23 
GeneralRe: Shortest path related Pin
Alivemau527-Oct-09 12:58
Alivemau527-Oct-09 12:58 
GeneralRe: Shortest path related Pin
Member 419459329-Oct-09 13:31
Member 419459329-Oct-09 13:31 
GeneralRe: Shortest path related Pin
Luc Pattyn29-Oct-09 13:36
sitebuilderLuc Pattyn29-Oct-09 13:36 
AnswerRe: Shortest path related Pin
Member 419459327-Oct-09 14:05
Member 419459327-Oct-09 14:05 
AnswerRe: Shortest path related Pin
Member 419459327-Oct-09 14:17
Member 419459327-Oct-09 14:17 
AnswerRe: Shortest path related Pin
Member 419459327-Oct-09 18:02
Member 419459327-Oct-09 18:02 
QuestionBinary Search Tree "Floor" Search Pin
Bachowny22-Oct-09 1:44
Bachowny22-Oct-09 1:44 
AnswerRe: Binary Search Tree "Floor" Search Pin
Alan Balkany22-Oct-09 3:45
Alan Balkany22-Oct-09 3:45 
AnswerRe: Binary Search Tree "Floor" Search Pin
Member 419459322-Oct-09 7:02
Member 419459322-Oct-09 7:02 
AnswerRe: Binary Search Tree "Floor" Search Pin
ely_bob27-Oct-09 6:58
professionalely_bob27-Oct-09 6:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.