Announcement

Collapse
No announcement yet.

Discussion about AI and switchable lights

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Discussion about AI and switchable lights

    The discussion so far:
    Originally posted by The_Dan
    Originally posted by Slappy
    I did read your comments in another thread about how the mapper of Aquatone could've made the AI turn the lights on.

    However, I'm assuming this would make the AI run directly to a light and turn it on. A human would not do this. A human, when confronted with the darkened hallway, would toss some flares first to make sure a thief isn't right there by the lightswitch, waiting to KO. I'm assuming that this flare-tossing behavior is in ElJoelio's realm, and not the mappers.
    Right, but I tend to see things on a sliding scale of human-AI realism:

    Current AI = Completely ignore deactivated lights = Bad

    Proposed AI = Run towards lights & then switch them on = Improved

    Humans = Check out the area, then switch lights on = Eventual target for AI


    The proposed method isn't that easy to ambush the AI, as you'd think. When bots see a TSuspiciousThing, their overall awareness goes up & so they will be more sensitive to nearby thieves.

    Eg. On most normal groud surfaces, you can easily run up behind an AI for a easy Blackjack KO, since his awareness is pretty low. However, if you let that AI see an unlit torch, & then run in for the BJ while he's relighting it, he'll quite likely turn around & look for you since his awareness of his surroundings has been raised.

    The same thing applies to using TSuspiciousThing for electric lights. I've tried it out


    Also, I think there is a trigger available that is activated by a bot gaining Line-Of-Sight to it. By placing this on a light switch, & then connecting that trigger to a TOrdersChanger (set to investigate), you can get a bot to investigate an area when he sees that the switch has been turned off.

    Even if Joel does program AI to be more humanlike when dealing with darkened areas, I doubt he'll program them to check every switch in the map & see what switch the bot must locate to reactivate the light. Mappers need to give bots a helping hand in understanding what they must do in order to keep an area well-lit.
    Originally posted by The_Dan
    Originally posted by Slappy
    Perhaps, The_Dan, some map standards could be worked out regarding pathnoding and AI triggers (and locationIDs while we're at it)? Are there any standards the dev team places on maps before they can become an official TUT map?
    Currently, as long as a map has been properly pathnoded, it's playable.

    To try & implement all these extra AI considerations on a new map isn unreasonable. However, I wouldn't mind see-ing them slowly phased into existing maps, I'd like to see the AI play more of a role in multi-player & provide a good human substitute in single-player.

    The stuff I'm suggesting applies more to some maps than others. I keep mentioning aquatone, because it contains no torches (which AI can handle) but lots of electric lights (that are beyond the comprehension of current AI). This makes the single-player way too easy, & so the multi-player feels especially harder by comparison.

    I'd like to be able to get as realistic as possible Thievery practise in single-player, so that I can stay sharp when I don't play online for a while.

  • #2
    It seems to me that a switchable light isn't that rare of a thing to put in a map. As such, it would make sense for the AI code to handle switching these back on, instead of requiring the mapper to make those TsuspiciousThing,TOrdersChanger, etc. objects. I assume the mapper would have to make several objects PER LIGHT - that is entirely too much work.

    After what The_Dan said above about ElJoelio not making the AI code check through every switch to find the right one, I did some looking in UED at the Aquatone lights. Right now, the light fixture object doesn't have a pointer back to the switch that turned it on. I was thinking that perhaps some field of the light fixture object could be given the name of the switch that turns it on - with the express purpose of making it easier for ElJoelio to have the AI turn the light back on. This would require minimal work of the mapper (just filling out one more field instead of making several objects), and it would make sense for the AI code itself to handle turning on the lights, because really they aren't any different than torches (except the more complicated mechanism to turn them on/off).

    In a nutshell, the reason for the AI code to handle the switchable lights rather than the mapper is this - the AI should handle "standard" situations, and dealing with lights is definitely a standard one - all maps have it. The mapper should only be required to deal with the TSuspicious, etc. when his map has some custom (ie non-standard) construction.

    Obviously I'm just beginning to look at this situation so my understanding is probably flawed.

    Comment


    • #3
      Torches themselves use TSuspiciousThing, it's just created on-the-fly when the torch is extuinguished. Theoretically, it shouldn't be too hard to create a toggle switch that automatically creates a TSuspiciousThing when it is switched off & destroys it when it is switched back on.

      I could script it, but I'm busy at the moment

      Comment


      • #4
        I had planned to code a special switch that would automatically 'bind' to the nearest lamp at level startup, and then spawn the extra objects needed to get the bots to react to the disabled light. This was designed for Aquatone, where the switches for the lights are immediately below the lights themselves - Orgy would only need to remove the old switches and put my new ones in their place.

        Something like this would be handy for TH-Spider, too: the bots could react to the disabled watchers, and head down to the switch in the barracks to turn them back on.

        It's on the todo list and isn't really that much work, but it fell victim to 'get bumped down the todo list and then eventually forgotten'. I'll try to get it into the next patch.
        AI Programmer,
        Thievery UT

        Comment


        • #5
          Sounds cool, ElJoelio!

          That'll make for less work for mappers, so all switchable lights can be AI-controlled even on maps by lazy mappers!

          Comment


          • #6
            Great idea, but hopefully only one guard would go down to fix it. Would be stupid, and completely unbalancing if every AI who noticed the watchers off went downt to fix the problem. When a guard goes to reactivate the watchers, what happens if he is intercepted and disabled before he gets there?

            Comment


            • #7
              Once a bot finished investigating and turning a light back on they should also ideally continue with their previous orders.
              One of the three LANers of the Apocalypse!
              -
              The Unforgiven Casual Gaming Group - New Members Welcome

              Comment


              • #8
                in TH-CityMuseum, AIs switch on the lights when they passes by them

                Comment

                Working...
                X