aliens

Author Topic: Differences in AI for alien species?  (Read 5540 times)

Offline kharille

  • Colonel
  • ****
  • Posts: 370
    • View Profile
Differences in AI for alien species?
« on: May 12, 2015, 06:56:26 am »
Not sure what is already implemented.  I'd imagine the reaper has quite a different .. programming compared to gun wielding aliens.  Is it possible to implement something unique to every race?  Maybe the sectoids might move further away, which would work out well in night missions? 

I'm not into coding or anything complex like that, but would it be good to implement specific alien behavours?  Maybe that has already been implemented in the original?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Differences in AI for alien species?
« Reply #1 on: May 13, 2015, 10:03:51 am »
this is the purpose of intelligence, aggression, and differences in armament. the AI is generic across all races, and the differences you will observe between them will be according to these variables.

Offline kharille

  • Colonel
  • ****
  • Posts: 370
    • View Profile
Re: Differences in AI for alien species?
« Reply #2 on: May 14, 2015, 04:31:27 am »
Good to know.  Not too technical myself so I never saw what the AI is composed of. 

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Differences in AI for alien species?
« Reply #3 on: May 14, 2015, 04:44:50 am »
Basically, intelligence is how many turns an alien will remember a soldier that it has seen previously. The higher the number, the longer an alien can remember a soldier (an alien who remembers a soldier knows the soldier's exact position, so can target the soldier even though it can't see the soldier, throwing a grenade through smoke or moving to just the right spot to get the perfect shot).

I am not sure if aliens remember soldiers that other aliens have seen as well, but there is a shared awareness, at least when it comes to psi-attacks. The alien doing the psy attack doesn't have to be the one who spotted the target.

Aggression is just how likely an alien is to risk itself to kill a soldier. Chryssalid for example are very aggressive, so they will rush your soldiers even though that might leave them exposed. I am not sure which is the least aggressive, but sectoids always seem a bit skittish to me, taking shots and then getting back into a hiding spot.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Differences in AI for alien species?
« Reply #4 on: May 14, 2015, 08:02:07 pm »
Any melee unit will be much more aggressive, because sometimes it fires up the "melee charge" routine. That btw is also the source of the "reaction fire scared off the Chryssalid" myth. A Chryssalid advanced, because advancing is usually the first thing to do (especially if you have no ranged weapon), then decided it has not enough TUs for a good solid charge, so it moved to cover instead. Incidentally it was also fired upon when advancing but it was irrelevant. Notice that when Chryssalids DO charge, they're almost always able to deliver many attacks to the target: lots of TU.

Also I've noticed that AI units with lots of TU tend to behave in a more complex (and aggresive) way since they're not constrained by TU saving that much.
« Last Edit: May 14, 2015, 08:06:15 pm by Dioxine »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Differences in AI for alien species?
« Reply #5 on: May 14, 2015, 09:14:44 pm »
So there is nothing in the AI that differentiate charging a lone soldier with charging 20 of 'em firing reactions shots at you? That surprises me.. I did think that there was a "taking too many reaction shots/seeing too many enemies, abort attack and hide for a turn" decision in the AI.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Differences in AI for alien species?
« Reply #6 on: May 14, 2015, 11:10:42 pm »
So there is nothing in the AI that differentiate charging a lone soldier with charging 20 of 'em firing reactions shots at you? That surprises me.. I did think that there was a "taking too many reaction shots/seeing too many enemies, abort attack and hide for a turn" decision in the AI.

Seeing too many enemies, yes, in a way, because - as far as I know and really I don't know the engine all too well, only Warboy can answer these questions with any real authority - the AI does track every soldier when chosing where to hide. This naturally can be used to your advantage - if the AI unit is well-flanked, it will use up the TUs in a futile attempt to hide. But I'm pretty sure the numbers or reaction fire make no difference to the "fight or flight" decision. Oftentimes I "hugged" an AI unit when I had no chances of survival otherwise, and the AI oftentimes ran into cover, certainly very uncomfortable with my 0 TU, completely harmless and unarmored soldier standing next to them. Would my soldier stayed 4-5 tiles away, the AI would most certainly used autofire instead. Naturally if the AI is armed with melee or - especially - grenades, hugging is much less effective (if at all).

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Differences in AI for alien species?
« Reply #7 on: May 15, 2015, 12:54:10 am »
Yeah.. I got that in my last terror site. Failing to stun a "sure" target and ending up stranded next to her. She throws a grenade and runs for cover, leaving my gal standing all by herself on top of a grenade..  >:(

Didn't know it would work well with enemies that don't have grenades though. I assumed they would autofire me from point blank. Seen that after an enemy steps out of a door that a gal is "watching" but failing to melee react to.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Differences in AI for alien species?
« Reply #8 on: May 16, 2015, 12:59:14 am »
If they advance and find you, they will most likely mow you down. But if you advance and end your turn next to them, not neccesarily so.