Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Progressive/Adaptive AI?  (Read 925 times)

Mesa

  • Bay Watcher
  • Call me River.
    • View Profile
Progressive/Adaptive AI?
« on: January 28, 2013, 01:55:53 pm »

Essentially, make AI of enemies, particularly the one of sieges in Fort mode, to react to one's playstyle and try to "counter" it.
But also adapt to it if it's not related to combat.

Got high walls and moats? Next time we're back with flying mounts.
Crossbowdwarves? Expect bowmen.
You sell a lot of booze? Good to know.

That said, civs should have seperate AIs in that part, so that one enemy may not realize you have lava moats while the other one already did and will come prepared next time.


I know that this might not be very easy to implement, but Kennedy said "We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, [...]"
Well, maybe the moon part is kinda pointless right now, but the idea is not.
Logged

10ebbor10

  • Bay Watcher
  • DON'T PANIC
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #1 on: January 28, 2013, 02:23:03 pm »

While certainly an interesting idea, I think we should first give the AI the capabilities to counter player defenses before programming it to use them in a meaningfull way.

Oh, and btw, having it detect stuff is hard, so maybe you could make a negative AI which reasons as follows. Going through the main killzone hallway got everyone killed, so let's not do that anymore, and look for alternatives. This allows it to react a bit better to player movements, as you don't need to preprogram it with one solution for each defense the player can come up with. You just need to give it a way to evaluate it's own progress and diversify it combat techniques.
Logged

CaptainLambcake

  • Bay Watcher
  • fabulous
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #2 on: January 28, 2013, 03:50:22 pm »

read devlogs before you post. planned.
Logged
You wake up in (suddenly) your room not somewhere Armok knows where. Travels in deserts and goblin forests turned up to be a dreams borned by procreation of your autistic imagination.

thburns

  • Bay Watcher
  • I came, I saw..... It sucked!
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #3 on: January 28, 2013, 08:08:54 pm »

Just so long as the knowledge a current siege or ambush force gains isnt carried over to their civ, if the none of the force escapes.
Logged
If only life and parenting were as easy as "Dwarf Fortress"

Starver

  • Bay Watcher
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #4 on: January 28, 2013, 08:20:54 pm »

And, even if it is, the next time round there ought to be no undue omniscience of a post-rebuild set of defences with a different layout.

(An assumption that there's a weapon trap here,, a killing zone there etc, which also means that unbuilding and rebuilding doesn't negate this knowledge.  Or even rebuilding a few tiles further up and down the corridor, necessarily, although perhaps it'd be fuzzy.  But open up a different entryway for the caravans to use[1], that wasn't seen by the prior raiding party (or at least by the surviving members of it), and it'd be fresh ground again.)


Artificial Stupidity is sometimes harder to do than Artificial Intelligence.  Meaningful stupidity, anyway.  You can always do 'oblivious' quite easily.  As we have now, within the context of this suggestion.


[1] I wish they'd learn that they can appear right next to a given entrance, rather than appear a quarter of the way round the map, next time.  Although then I'd also expect them to be unprepared for the altered entrance situation, as well, so that'd balance anti-hostile rebuilding against the inconvenience it puts the friendlies to.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #5 on: January 28, 2013, 08:29:39 pm »

The strategy discussed by Toady was to use the pathfinding code to weight any tile where siegers died as undesirable, to the point where they would look for alternative ways around. 

Hence, if a dead goblin on that tile counts as 40 points of weight, and the next entrance to the fort is 50 tiles further away, they'll try charging for one more goblin, then go for the back door.

(Oh, and siegers path to your meeting halls, by the way.)
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #6 on: January 28, 2013, 10:52:52 pm »

Oy. That sounds...painful. It's a good idea in theory, but just storing those little details seems like it would be a pain, let alone determining them and figuring out how to apply it...especially if there's ways to make sure only goblins or whatever who should know, do. It sounds like one of those ideas to put in the "Once computers can run DF better" pile.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

thburns

  • Bay Watcher
  • I came, I saw..... It sucked!
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #7 on: January 28, 2013, 11:24:56 pm »

Quote
"Once computers can run DF better"
Or we all have the money to upgrade to the highest end comps. I think that's as good as we'll ever get. With the scope and ideas they want to incorporate I don't think we'll ever see a computer that could run this gem without hiccups.
Logged
If only life and parenting were as easy as "Dwarf Fortress"

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #8 on: January 29, 2013, 12:35:33 am »

Oy. That sounds...painful. It's a good idea in theory, but just storing those little details seems like it would be a pain, let alone determining them and figuring out how to apply it...especially if there's ways to make sure only goblins or whatever who should know, do. It sounds like one of those ideas to put in the "Once computers can run DF better" pile.

It's exactly the same method used for the current traffic designations when using the modified A* with Manhattan - it just means having a different traffic designation map for siegers than dwarves.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #9 on: January 29, 2013, 11:31:45 pm »

Oy. That sounds...painful. It's a good idea in theory, but just storing those little details seems like it would be a pain, let alone determining them and figuring out how to apply it...especially if there's ways to make sure only goblins or whatever who should know, do. It sounds like one of those ideas to put in the "Once computers can run DF better" pile.
It's exactly the same method used for the current traffic designations when using the modified A* with Manhattan - it just means having a different traffic designation map for siegers than dwarves.
I should have been more specific.

Actual learning AI, as opposed to merely altering pathing costs, sounds painful, yadda yadda. (Although those pathing costs sound like a potential pain to implement properly, and don't really cover things well--they wouldn't do anything to cage traps, and would cause goblins to avoid areas where lots of goblins had fought dwarven axelords over a waterfall where no goblins had died [at the top].)
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #10 on: January 30, 2013, 01:56:27 am »

I should have been more specific.

Actual learning AI, as opposed to merely altering pathing costs, sounds painful, yadda yadda. (Although those pathing costs sound like a potential pain to implement properly, and don't really cover things well--they wouldn't do anything to cage traps, and would cause goblins to avoid areas where lots of goblins had fought dwarven axelords over a waterfall where no goblins had died [at the top].)

It depends on how short- or long-term you are keeping the weights active. 

If it's just within one siege, then having goblins start pathing away from where the axelords are may just make sense - just try to go around the legendary warriors instead of defeat them head-on. 

Likewise, a cage trap isn't going to be a threat again until it's reset. 

If you want longer-term weighting, known cage traps would of course need to be avoided as though there were goblins killed there, and kills from mobile melee units would need to be downplayed. 

You could, in fact, have two different weight maps for short- and long-term siege planning.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Naryar

  • Bay Watcher
  • [SPHERE:VERMIN][LIKES_FIGHTING]
    • View Profile
Re: Progressive/Adaptive AI?
« Reply #11 on: January 30, 2013, 09:40:06 am »

Excellent idea, but probably incredibly difficult to do.

Yet again DF is difficult by definition.