project-navigation
Personal tools

Author Topic: What may the AI see?  (Read 6078 times)

Offline Rodmar

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
What may the AI see?
« on: October 10, 2015, 12:28:27 am »
Hello,

I read some .lua files, and it looks like the actors (aliens, PHALANX, civilians, soldiers) only see each other, and think according to this shared (?) vision.

The syntax seems to be always:     ai.see("all", nameOfTeam)

May the AI see other items than team members?
May it see static, hand placed invisible actors? I'm thinking about the rescue zone, the exit of a transport or that of an UFO.
May it see dynamic items such as smoke/fire field, or a rendez-vous flare?
May it see (or rather, remember) past actions? Corpses, last seen enemies location, last wounded/shot locations, etc?

Also, by what value could the parameter "all" be replaced? ("self"?)

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: What may the AI see?
« Reply #1 on: October 10, 2015, 03:55:00 pm »
Note that whatever you see in the LUA files is only true if you use the LUA-AI. As far as I know, it is unfinished and we're still using the C-AI by default.

-geever

Offline Rodmar

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
Re: What may the AI see?
« Reply #2 on: October 13, 2015, 10:47:35 am »
Lol, such an idiot am I. At least, this explains why the explore function in those files seems to not work properly...
Still, I hope that one day, the AI could see more than living actors (but adding soldiers, pilots, and "mission objective" teams, and having them defend themselves or acting as the mission requires them to do, is perhaps top priority as compared to seeing one's environment).

I know, and I fell free to code it myself ;).

Offline ShipIt

  • Project Artist
  • Captain
  • ***
  • Posts: 906
    • View Profile
Re: What may the AI see?
« Reply #3 on: October 14, 2015, 06:30:24 am »
DarkRain improved the LUA-AI a lot. In 2.6-dev we use it, not sure about 2.5.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: What may the AI see?
« Reply #4 on: October 15, 2015, 03:28:08 am »
Actually the LUA AI is unused at the moment in any version of the game, you can activate it by setting the g_luaai cvar, but if you want to test it you really should try 2.6, as the LUA AI in 2.5 is utterly useless, the current capabilities of the 2.6 LUA AI API are described at the start of the alien lua script which you can see here