Jump to content

Hazardous Tile Avoidance for AI (and player)


Recommended Posts

IDEA: Make the AI units avoid hazardous tiles (always for civilians, and if they can help it for aliens and local forces, depending on the alien unit) and, since there now is a pathing algorithm for ignoring hazard tiles (the current) and one for avoiding hazard tiles (the new one) give the player the choice between which one to use, via a setting "Avoid Hazardous Tiles" defaulted to off.

EXPLANATION:

So, the AI should be, well, intelligent, right?

Walking straight into a fire or a column of stun gas isn't intelligent behavior, and should not happen, especially for civilians (who are pansies and would probably run away from the scary purple gas, not walk into it).

Solarius Scorch brought up an issue of the Xenonaut pathing not taking into account fires and other hazardous tiles, but simply having the soldier walk straight though it. He suggested forcing them to circumvent the tile, but that would limit player choice too much, since some of us don't care if we walk into fire, stun gas, etc due to advanced armors, high health, whatever.

I disagreed with his specific idea, but liked the concept of avoiding hazard tiles for the obvious AI benefit such a pathing system would have. This is what I had to say on that other post:

I am against your specific idea for the implementation of the idea, Solarius (ie force the player to circumvent the tile) but the idea does have merit. I'm warming to it. (No, that wasn't just a silly pun. ;)).

Just a quick clarification: Hazardous tiles include fire and stun gas. Smoke shouldn't be classified as a hazardous tile, since any effects are generally minimal.

The way I see it, the only reason the developers would be concerned with this is for the AI. If the AI avoids hazardous tiles, it appears to be so much more intelligent and will make the game all the better.

If I were to do it, civilians would never walk into hazardous tiles, and local forces and aliens would try to avoid them, unless there was no other easy path through them. Later aliens that can take more of a hit, and maybe androns since they're more single minded, would be more willing to walk through fire since it either won't hurt them as bad, or they simply don't care (in the case of the androns).

This would make stun weapons less effective, since the aliens could simply not walk into the columns of gas. In the case of stun grenades this could be a good thing, since they're so OP at the moment, but perhaps we would want to make the stun weapons have a more uniform blanket of gas if it caused them to be totally ineffective.

Fires would also be nerfed somewhat, since aliens would rarely walk into them (as you'd expect. No sane alien is going to walk into a fire. Duh.)

Being sane brings up another point, if the AI unit is panicked, they should have no qualms about walking into hazardous tiles, since they're panicking.

Anyway, if this system were implemented, there would now be two different pathing algorithms. One, the current one where the path doesn't notice hazardous tiles, and two, where the path avoids the hazards. The AI for aliens and local forces would have to choose between which path to take, whereas the civilians would always take path two.

Since there would be two paths, why not give the player the option of which path algorithm to use? Have it be in the settings, disabled by default, "Avoid Hazardous Tiles."

Since the AI units should act intelligent and avoid hazardous tiles, such a pathing system needs to be made anyway.

Based on what little I know about the pathing system, we could just make the tiles with fire and gas on them unpassable to the unit, so it would look like they're avoiding the tile but in reality they simply cannot walk on to it, or so their pathing algorithm thinks.

Again, civilians would always have this "Avoid Hazardous Tiles" system in place. The aliens and local forces would have to have a system in place to choose which method to use. Perhaps a simple probability thing would work, where there's an X% chance they'll use one pathing system over the other. This X% could be changed based on various factors, like morale, HP, TUs, etc. I think that if they have a lot of HP they'd be more willing to risk walking through hazard tiles, if they have more TUs then walking around would be better, and if they are shaken and panicky they would me more likely to "not notice" the hazard since they're not thinking clearly, but are trying to run away or whatever.

Would this work? I think it'd be an excellent addition to the AI, and make it much more convincingly realistic.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...