Jump to content
Sign in to follow this  
liq3

Please fix the pathfinding

Recommended Posts

I wonder if a cheap fix for this would be for the devs to widen the radius of where the walrus decides it's at a waypoint (even if is only increased for every waypoint but the last). From the map being used to create the waypoints, there's no need to be as exact as it is; and this would lessen the back-and-forwards-with-endless-turning that the walruses suffer from. It won't fix everything, but it probably would help without being much strain on the engine (which spline paths would be)

Against the wide spread opinion around here I don't think the pathfinding is that bad I've seen worse vehicle AI pathfinding in early Arma 2, especialy trucks :). I've been playing from the tactical map a lot lately and normally they get their job done. I lost one Walrus in a lava river on Magma, a few times they got stuck on a cliff or the pier. But what you can see from the tactical map is that waypoint are dynamically created between the position of the unit and the final waypoint. And sometimes they are created behind a unit. That's even true for Mantas. So increasing completion radius and distance from units present position to dynamically created waypoints may do the trick.

Share this post


Link to post
Share on other sites

I have a friend who recently bought CC via amazon and is awaiting shipment. He mentioned that he had heard of the glitchy AI and was considering not opening and re selling. I persuaded him not to and told him the game is good as it stands plus has lots of potential. This is a bit concerning as I'm sure that reports of the Walrus AI are feeding into the gaming community and will surely put people off of buying. I don't want to see this happening as I am finding it a blast to play..just needs the AI working on.

Share this post


Link to post
Share on other sites

I disagree that doing pathfinding AI that works is hard.

The hard part is making it fast and resouce friendly.

But all the programming in the world wont help you if you screw up your node placements ( or Nav mesh ) on the map.

Share this post


Link to post
Share on other sites
I have a friend who recently bought CC via amazon and is awaiting shipment. He mentioned that he had heard of the glitchy AI and was considering not opening and re selling. I persuaded him not to and told him the game is good as it stands plus has lots of potential. This is a bit concerning as I'm sure that reports of the Walrus AI are feeding into the gaming community and will surely put people off of buying. I don't want to see this happening as I am finding it a blast to play..just needs the AI working on.

As long as Bohemia works on this (it's annoying more of the path finding isn't exposed to us as I really want to know if widening the completion radius helps) then it's definitely worthwhile. So convince him as much as possible. Unfortunately this is going to hurt sales and the public at large are hearing about it. The history of games shows that notorious buggy releases tend to have low sales even if they get fixed later. This is a fun game, and there's a much better game in there - it's just this is a very visible issue that most people will pick up on.

The big issue is that the AI pathfinding is actually pretty good in this (!?!). It does seem to handle bridges, and does a pretty good job at devising the route it needs. The thing is that it has several flaws which makes it all fall down. As soon as they are fixed then the system will be fantastic.

Pathfinding really isn't that difficult (A* is a very simple algorithm really) but as TonTow said the hard part is doing it fast and on low ram. The XBox release isn't helping as they have a tiny amount of ram in comparison to the pc and it doesn't look like there's much difference in the code between the two versions. The pathfinding with that taken into account works nicely; it just has issues with recognizing when it's hit a waypoint and with dynamically generating new ones in wrong places. These should be fixable, though that could cause other issues to bubble up.

Share this post


Link to post
Share on other sites
Pathfinding really isn't that difficult (A* is a very simple algorithm really)

...and we come back to the fact that it has been criticized for ages, so there must be whatever kind of problem here.

Share this post


Link to post
Share on other sites

The A* algorithm may be relatively simple, but remember that we're dealing with wheeled vehicles here, not magic pixies that can float from point A to point B to point C etc. without having to make turns or navigate terrain.

They have to take several other factors into account, most notably the fact that the Warluses have a turn radius (they can't turn around on the spot). That's the biggest issue at the moment.

Share this post


Link to post
Share on other sites

By saying pathfinding isn't difficult, I mean if you had infinite resources and cpu-power. In games, you almost never have that kind of ideal situation; especially with 3d terrain. So you have be really clever to get pathfinding which works in the much-less-than-ideal conditions you have - and that's where the difficulty quickly builds up.

Share this post


Link to post
Share on other sites
The A* algorithm may be relatively simple, but remember that we're dealing with wheeled vehicles here, not magic pixies that can float from point A to point B to point C etc. without having to make turns or navigate terrain.

When going accrost a bridges, the AI seems to forget this, but taking into account turn radius and how fat the unit is easy to fix if you through a little math into the mix.

For turning radius, it is a given that anything that is inside that radius is out of bounds and you can project an imaginary cone out the front and back to see if you can turn tight enough to hit the node.

For having a fat unit; ) this can get a little tricky. - You would need to draw a rectangle (that is centered on that one pixle path the AI has picked) and see if there is any none pathable areas in that rectangle and then error correct from there.

But the easyest fix for vehicles falling off bridges is to fix the node placement on the brides (center them and move them out from the ends of the bridge a little bit and remove any nodes near the edge of the bridge that are on the bridge) and lower the move cost a bit (lower move cost = the AI more likely to move there).

Right now the AI can handle trees farly well, so why not make the edge/railing of the bridges none pathable?

Share this post


Link to post
Share on other sites

I hope you guys can find some solutions, because besides the abysmal walrus pathfinding, the game itself is great and a blast to play :)

Share this post


Link to post
Share on other sites
By saying pathfinding isn't difficult, I mean if you had infinite resources and cpu-power. In games, you almost never have that kind of ideal situation; especially with 3d terrain. So you have be really clever to get pathfinding which works in the much-less-than-ideal conditions you have - and that's where the difficulty quickly builds up.

I can easly knock out a pathfinding AI that can find a perfict route, but it would be a huge resource hog.

You don't need infinite resources and cpu-power - that is the one trick that has to be mastered. ( Pathfinding AI is easy. Optimization is the hard part of it. )

You do, however, need to limit the amount of area you check at a time; if you watch the path the AI draws out (and zoom way in on the unit), you will see that the AI already does this. And there are several other tricks you can use to extreamly cut down the amount of resources and cpu-power, like heuristics. http://en.wikipedia.org/wiki/Heuristic

---------- Post added at 05:55 ---------- Previous post was at 05:53 ----------

Hello everyone, after a thorough discussion and investigation, AI pathfinding will be addressed. Please refer to this announcement:

http://forums.bistudio.com/showthread.php?141129-Carrier-Command-Gaea-Mission-AI-pathfindng-to-be-addressed&p=2235543#post2235543

Take care

:D Nice, keep up the hard work.

I hope the patch includes opening up the Pathing AI for modding.

Share this post


Link to post
Share on other sites

Pathfinding is easy, but negotiating the actual path in a physical environment (with gravity, friction, and not to mention explosions and bullet impacts) is quite tricky.

I think, however, that the game screws up in two places:

a) peaceful pathing is too clumsy

b) comat pathing is too crazy with its strange "into cover/out of cover" system considering it can't even follow a road reliably.

Share this post


Link to post
Share on other sites

Lots of excellent comments here!

Thygrrr, also a very astute observation- very few have so far pointed out the difference in peaceful and combat pathing.

I think we can all come to these agreements though:

-Increasing the size of the waypoints to be triggered will be a quick fix for now (though it might introduce other problems)

-Allowing the vehicle to turn on the spot when being controlled by the AI would also be a quick fix. (Plus, it'd be more realistic, there's a lot of robots out there that turn on the spot)

-One of the causes is the fact that the short-distance recalculated waypoints are sometimes placed BEHIND the unit. Coupled with the inability to turn on the spot causes most of the malfunctions.

Does that sound accurate?

I'd like to know how the walrus detects inaccessible terrain. I've got a feeling it might have to do with measuring the angles of the surrounding surfaces. So if the waypoint navigation grid is coarse, it would fail to pick up building wreckage, wrecks and small boulders and such, as they can easily fall through the holes in the grid mesh. Increasing the resolution of the grid mesh would cause the requirements on the RAM to go up steeply though.

If I'm right with my assumptions, I'd look more in the direction of "smoothing out" wreckage. So when a walrus fails to detect it, he would actually be able to pass over/through it.

This would also mean one can no longer use it as cover though- a wreck/boulder would look like it's there but one would be able to drive/shoot through it on manual.

Share this post


Link to post
Share on other sites

Good luck then, BI in fixing it :) Hopefully sending 4 AI Walrusses isn't a PITA one day any more.

Share this post


Link to post
Share on other sites

I am glad to see there is a patch coming to fix this issue. During the first parts of the campaign walrus AI just sucks. Its been getting better as im playing because i take that factor of micromanaging them to keep them in line. It would be nice to see implementation of squad line up like delta, line, triangle. Just like what Arma 2/OA has.

Share this post


Link to post
Share on other sites
You have to remember that pathfinding AI is horrendously difficult.

Agreed, but it has been well established since the early 90s by the fine work of Mr Reynolds of OpenSteer, Boids, SGI, Sony and EA fame, not to mention an open library is available. [1]

[1] http://www.red3d.com/cwr/steer/

http://www.red3d.com/cwr/

http://opensteer.sourceforge.net/

---------- Post added at 07:13 AM ---------- Previous post was at 07:09 AM ----------

I disagree that doing pathfinding AI that works is hard.

The hard part is making it fast and resouce friendly.

But all the programming in the world wont help you if you screw up your node placements ( or Nav mesh ) on the map.

perhaps, but thats generally not the way to do it since it makes things behave like a AFX model racecar track.[1]

[1] http://www.red3d.com/cwr/steer/

Share this post


Link to post
Share on other sites

I am really really disappointed. I do not really care that I have to unstuck them from trees or walls but come one they cannot even drive a straight road and even if all 4 of them will make it they are SO SLOW. Can't you just add something like follow command where AI copies your movement until you stop or engage enemy? It would be so much better especially for the bridges.

Share this post


Link to post
Share on other sites

I have to agree - it's painful watching your walruses act like lemmings and try to find a cliff to fall off, not fire at targets, or charge headlong into a mass of turrets to try to get to a location on the exact opposite side of the map :(

I just hope they can patch it soon.

Share this post


Link to post
Share on other sites
Setting up manual waypoints would be a lot quicker.

Why don't you do it then? Just use shft click ... :rolleyes:

Share this post


Link to post
Share on other sites

Because the pathfinder keeps adding its own way-points as the vehicle moves, I'm talking about direct way-points done manually.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×