Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Pathfinding  (Read 5360 times)

0 Members and 1 Guest are viewing this topic.

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Pathfinding
« Reply #15 on: 14 Oct 2002, 01:14:54 »
1 Comment:

How do you travel by car through a country that has thousands of cities ? Are you travelling city to city ? No.

You travel through states. You *mostly* won't need to worry about the city you need to get to at first because states are *mostly* connected by major routes.
You've got time to think how to get to the city when you're in the destination state.

In OpF Cities are the little towns. If there are too many of them to get a solution just search for a way to use big sectors (states) instead. Search the main route and try to put all alternative routes into sectors.

If this is possible you'll get a much simpler solution at first. When you got ur destination sector, you need a 2nd calculation how to get to the destination city, but the advantage is that you only need to calculate within a single sector.

It's like guessing a certain number somebody chooses out of 1-1000. How to do it ? Start guessing in big terms (states/sectors): "Is it 500 ?"

"Naah, it's lower" (This is your main target sector)

"Is it 250 ?"

"Lower"

"125?"

"Higher"

"188?"  (125 + 63)

"Close, but higher"

"190?"

"Yep"


-------------
Just an idea. It depends how good you can organize cities on the map + their connections into bigger sectors.

CareyBear

  • Guest
Re:Pathfinding
« Reply #16 on: 15 Oct 2002, 16:03:39 »


[attachment deleted by admin]