project-navigation
Personal tools

Author Topic: Artificial Intelligence  (Read 36747 times)

Offline Latino210

  • Squad Leader
  • ****
  • Posts: 161
  • UFORadiant mapper
    • View Profile
Artificial Intelligence
« on: May 22, 2012, 12:41:38 pm »
Hi

I am trying some mapping and I was wondering about the artificial intelligence of the aliens. In my map the aliens spend a turn slaughtering all civilians on sight, then they proceed to charge towards my soldiers pinpointing them like IR guided missiles. They all behave the same, no matter their race and/or equipment. Is this behavior normal? It's because the map is so small and streamlined? Sometimes in the game an uninjured alien just "get lost" and waits in a corridor to be found and slaughtered. I d'like to know more about enemy AI because I am building another map and I want to know how the enemy will act.

If anyone is interested, my map is here: http://ufoai.org/forum/index.php/topic,6428.msg52284.html#msg52284

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Artificial Intelligence
« Reply #1 on: May 22, 2012, 03:17:08 pm »
Alien AI is very basic. What you describe is roughly what aliens will do: they will generally target the nearest enemy (soldier or civilian). They will move towards the enemy they are targeting. If they can not move without moving closer, they will not (this is why they often get "stuck" in the Harvester).

There is no independent AI for different alien races.

Of course, we hope to develop the AI in the future.

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: Artificial Intelligence
« Reply #2 on: May 23, 2012, 01:38:58 pm »
do aliens have a completely "individualistic" ai, as in, there's no common "team ai" to coordinate them in any way?

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Artificial Intelligence
« Reply #3 on: May 23, 2012, 04:27:21 pm »
do aliens have a completely "individualistic" ai, as in, there's no common "team ai" to coordinate them in any way?

I believe so, yes. But morale effects them, so teammate deaths matter. There is no, "you go that way, I'll go this way, and we'll flank them."

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: Artificial Intelligence
« Reply #4 on: May 23, 2012, 07:05:07 pm »
I believe so, yes. But morale effects them, so teammate deaths matter. There is no, "you go that way, I'll go this way, and we'll flank them."

imho if ai gets a complete overhaul (which it needs) it should be a "team ai", as they're supposed to share the same consciousness and even if it wasn't that they're still soldiers of some kind and should work as a unified group.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Artificial Intelligence
« Reply #5 on: May 23, 2012, 07:28:55 pm »
imho if ai gets a complete overhaul (which it needs) it should be a "team ai", as they're supposed to share the same consciousness and even if it wasn't that they're still soldiers of some kind and should work as a unified group.

Patches are welcome, as always...

-geever

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: Artificial Intelligence
« Reply #6 on: May 23, 2012, 08:30:09 pm »
Patches are welcome, as always...

-geever

I know, I know  :-X

Offline Latino210

  • Squad Leader
  • ****
  • Posts: 161
  • UFORadiant mapper
    • View Profile
Re: Artificial Intelligence
« Reply #7 on: May 24, 2012, 12:06:51 pm »
Don't ask me, I am an electrician and I cannot tell a line of code from a wheelbarrow!

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: Artificial Intelligence
« Reply #8 on: May 24, 2012, 03:19:20 pm »
Don't ask me, I am an electrician and I cannot tell a line of code from a wheelbarrow!

if we constructed an intelligent wheelbarrow, would Geever implement it to the game?

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Artificial Intelligence
« Reply #9 on: May 24, 2012, 07:33:16 pm »
Maybe we should first search an artist modeler for the wheelbarrow, before thinking about his AI.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Artificial Intelligence
« Reply #10 on: May 24, 2012, 11:50:40 pm »
Imho the current AI is even a little worse than the one in 2.3 coz the guy who worked on it was MIA half way down :(

I don't think we'll have a 'team AI' anytime soon. I have put some thoughts into it and have to say it is *incredibly* difficult. Here's a small example (just to give you an idea):
Try to write down the rules to *precisely* detect whether an actor is inside or outside a building. Oc those rules must work for *every* map and every sort of building.

Don't be afraid to post them. Even a 'stupid' rule might give *me* an idea for the perfect rule ;)


Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: Artificial Intelligence
« Reply #11 on: May 25, 2012, 02:38:35 pm »
Try to write down the rules to *precisely* detect whether an actor is inside or outside a building. Oc those rules must work for *every* map and every sort of building.

Writing those rules down: we shouldn't. It is not important when unit is inside, or outside. Amount of cover is. You want to have a unit to have maximal angular range of opening in front, and have a minimal linear range of openings all around.
That's the key to good tactical position.

Don't be afraid to post them. Even a 'stupid' rule might give *me* an idea for the perfect rule ;)

See above :)

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Artificial Intelligence
« Reply #12 on: May 25, 2012, 11:27:35 pm »
You want to have a unit to have maximal angular range of opening in front, and have a minimal linear range of openings all around.

What does that mean?

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Artificial Intelligence
« Reply #13 on: May 26, 2012, 12:07:43 am »
It mean you must be a sniper in a turret.
If you only have a knife... no luck.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Artificial Intelligence
« Reply #14 on: May 26, 2012, 12:27:44 am »
Ok, here goes my stupid idea:

Duke, IIRC you're trying to help the poor aliens get out of their UFO, instead of crowding in some place inside and get slaughtered by through-wall weapons, right?

Forget about inside/outside -- even if both sides are outside (or inside for that matter) they could still be lured to the other side of a wall or some other large (and concave) obstacle -- instead, if they can shoot their intended target from their intended destination good, if not, use the routing/pathing system to check how long they'd need to walk form their intended destination to the target position, and pick the one with the shortest route (yes, I know its probably extremely costly, stupid idea I said), maybe have them prefer destinations from where they can shoot their target but cannot walk to it (they probably have some sort of cover).