-4
\$\begingroup\$

When trying to program hostile AI units for a war strategy game using pathfinder methods, do programmers ever have one algorithm for the unit to move and a separate algorithm for the unit to actively listen for nearby objectives (e.g. opposing warriors, power ups, opposing team's fortress, treasure, etc)?

Any insights as to how these methods function would make me happy.

\$\endgroup\$
4
  • \$\begingroup\$ just search path-finding in this site! it gives you all the information you need about currently available algorithms. \$\endgroup\$
    – Ali1S232
    Commented Feb 18, 2012 at 5:36
  • \$\begingroup\$ possible duplicate of Real Time Dynamic Pathfinding? \$\endgroup\$
    – Ali1S232
    Commented Feb 18, 2012 at 5:38
  • 1
    \$\begingroup\$ It's not clear what's being asked here. The title implies "pathfinding algorithms for higher dimensions" (3D? 4D?) whilst the question is asking about an AI will move and listen. Yes, they have separate algorithms, since an algorithm for movement just moves the enemy and has nothing to do with listening, and if it did also do listening, it would still just be a movement and listening algorithm running side by side. So what are you actually asking? How would you create an AI which keeps an eye out for objectives, and readjusts its path to incorporate them? Please clarify. \$\endgroup\$ Commented Mar 19, 2012 at 10:00
  • \$\begingroup\$ If it's about an AI which keeps an eye out for objectives and readjusts its path, this is definitely a duplicate of @Gajet's link. \$\endgroup\$ Commented Mar 19, 2012 at 10:02

1 Answer 1

0
\$\begingroup\$

You can use the same algorithms as normal, for example this is my version of A* in 3D: http://roy-t.nl/index.php/2011/09/24/another-faster-version-of-a-2d3d-in-c/

All you have to do is to make the 'is adjacent' function fetch 3 dimensions.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .