Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 20th, 2005, 03:20 PM
KlimBo KlimBo is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 KlimBo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Pathfinding Algorithm

Exuse me for my bad english, please.
The solution of following problem is very important for me:
I have a square map with size N x M (4<N<129, 4<M<129) and it's
divided into N X M squares. Each of this squares have value (0, 1, 2, or 3):
0 - this squares are impassable (something like wall).
1, 2, 3 - the cost of passable squares.
I also have a goal point on this map with coordinates (x,y) and I must go to it.
I don't know where I am on the map, but I can view an eight squares around me.
I'm able to move in four directions (up, down, left, right). If you can help me
with an algorithm, which finding shortest(costless) path to goal, I'll be much thankful.
I don't know my start position and it's the huge problem for me.
Thank you!
This is one examle of map with size 10 x 12:
1. Map:
0 0 0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 0
0 1 1 2 1 1 2 1 1 0
0 1 1 0 1 1 0 1 1 0
0 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 0
0 1 1 2 1 1 2 1 1 0
0 1 1 0 1 1 0 1 1 0
0 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 0
0 0 0 0 0 0 0 0 0 0

2. Goal coordinates: x=4, y=4
3. My view (I can view an eight squares around me, i.e. I'm in the middle of this showed below):
1 1 1
1 1 1
1 2 1

Reply With Quote
  #2  
Old January 26th, 2005, 12:43 PM
a9192shark a9192shark is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 12 a9192shark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 14 sec
Reputation Power: 0
I will think about coding this in Excel as it interests me, however try a Google search for "Dijkstra's Algorithm" and you should get some ideas.

HTH,

Alan.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Pathfinding Algorithm


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway