Click here to Skip to main content
15,887,214 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: searching and order of aalgorithm Pin
Ian Shlasko29-Oct-09 13:31
Ian Shlasko29-Oct-09 13:31 
GeneralRe: searching and order of aalgorithm Pin
Alan Balkany29-Oct-09 16:29
Alan Balkany29-Oct-09 16:29 
GeneralRe: searching and order of aalgorithm Pin
Luc Pattyn29-Oct-09 13:17
sitebuilderLuc Pattyn29-Oct-09 13:17 
GeneralRe: searching and order of aalgorithm [modified] Pin
khomeyni29-Oct-09 21:34
khomeyni29-Oct-09 21:34 
QuestionShortest path related Pin
Alivemau526-Oct-09 4:02
Alivemau526-Oct-09 4:02 
AnswerRe: Shortest path related Pin
Alan Balkany26-Oct-09 4:37
Alan Balkany26-Oct-09 4:37 
GeneralRe: Shortest path related Pin
Alivemau526-Oct-09 5:20
Alivemau526-Oct-09 5:20 
GeneralRe: Shortest path related Pin
Alan Balkany26-Oct-09 5:36
Alan Balkany26-Oct-09 5:36 
Treat several obstacles as one big obstacle, and make a bigger circle.

One way to do this is with a direction vector, the pair of x,y offsets in the direction of your spiral. When you hit an obstacle, you rotate this direction vector 90 degrees (45 degrees if diagonal moves are permitted). When you find a free cell around the obstacle, you rotate back in the other direction.

Intuitively, it's like going through a maze, always keeping your right hand on the right wall, as you circle around obstacles.
GeneralRe: Shortest path related Pin
Alivemau526-Oct-09 7:22
Alivemau526-Oct-09 7:22 
GeneralRe: Shortest path related Pin
Alan Balkany26-Oct-09 8:20
Alan Balkany26-Oct-09 8:20 
GeneralRe: Shortest path related Pin
Alan Balkany26-Oct-09 8:23
Alan Balkany26-Oct-09 8:23 
GeneralRe: Shortest path related Pin
Alivemau527-Oct-09 6:19
Alivemau527-Oct-09 6:19 
GeneralRe: Shortest path related Pin
ely_bob27-Oct-09 6:32
professionalely_bob27-Oct-09 6:32 
GeneralRe: Shortest path related Pin
Alan Balkany28-Oct-09 5:06
Alan Balkany28-Oct-09 5:06 
GeneralRe: Shortest path related Pin
Alivemau530-Oct-09 11:20
Alivemau530-Oct-09 11:20 
GeneralRe: Shortest path related Pin
Alan Balkany28-Oct-09 5:11
Alan Balkany28-Oct-09 5:11 
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 
GeneralRe: Shortest path related Pin
Alivemau530-Oct-09 11:19
Alivemau530-Oct-09 11:19 

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.