 |
|
Cavalier_13
|
|
Montreal
Nov 2001 time: 00:16
|
|
I went into detail of this in 2 prior posts in 2 different threads, and yet you say the same thing I did. Was a new thread really needed?
Cavalier
|
|
|  |
 |
|
justin_sayn
|
|
Actually Johnson's algorithm will find the shortest past between all squares in a time that is roughly proportional to (X*X)*lgX +XE (where E is the number of links, and a link is only counted between 2 squares)
I.E.: If there are 1000 squares on the map, the time of algorithm will be proportional to:
1000*1000*Lg1000 +1000*E=
Since each square is linked to 8 other squares then there are 8*1000 = 8000 links, so we have:
1000*1000*Lg1000 +1000*8000 = 1 000 000*10 + 8 000 000
Which is equal to 18 000 000.
Since the number of squares and links on the map is constant, there is no reason for the game to take an increasingly amount of time as more cities are developed. (if they were using that alogorithm of course).
Where did you ever get the X! idea?
Eitherway, whatever algorithm they use, the number of squares is always constant on the map.
|
|
|  |
 |
|
Archmage
|
|
Arizona Nevada border
Nov 2001 time: 23:16
|
|
Uuuuh....must find tylenol.......uhhhhghhhh
|
|
|  |
 |
|
Magician
|
|
quote: Originally posted by Nadexander
This is only for finding a path for any two given points (which worst case can never take more steps than the number of squares on the map. However It needs to calcualte the pairwise linking for any two cities (to see if it could be accessing a resource from that city. |
As far as I know Johnson's algorithm is capable of finding all pair shortest path. It is not limited to finding a path from two vertex alone.
Btw, I don't think this is a shotest-path problem. If you find a path (trade route) from one city to another, no matter it is the shortest or not, will be accepted. Using shortest path algo will enumerate all vertex which is a big overhead.
So playing on a large/huge map != long wait. although the chance is higher.
|
|
|  |
All times are GMT. The time now is 05:16. Apolyton Time is 00:16. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|