Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: A more "human" enemy Keeper

  
  1. #1

    Default A more "human" enemy Keeper

    Hi everyone. I think it would be great to have a more "human" enemy Keeper: a CPU Keeper that knows and exploits bugs, that use Possession spell (for examle trying to attack directly an Enemy Keeper heart), use Cave-in, Armageddon, Destroy Walls, use the Temple sacrifices... Maybe not all the Keeper should have those skills, maybe just one of the various COMPUTER_PLAYER settings should give to a Keeper such an human intelligence. What do you say?

  2. #2
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: A more "human" enemy Keeper

    Yikes! It depends. What do you mean by "that knows and exploit bugs", because preferably, bugs are bugs and shouldn't be exploited. What are the bugs you want them to exploit?
    For the Possession thing, the computer really has to have a good reason for using it. Doing such feature would require some extra coding. We'd have to tell the computer player what creature to possess, when, where to lead the creature, when to stop. Considering the computer player already has so many tasks to do, I don't think it would be pertinent to do such thing.
    For using Cave-In, that can be possible, but in what circumstances.
    For Armageddon, that's tricky. Most of the times, the computer players are generally stronger than us for a certain period of time. Would it be that fun that, during the time you train your creatures and reinforce your dungeon, the Armageddon pop-up would appear and you'd have to deal with it, either winning or losing. In both cases, the level would end quickly, and it would be worst if you lose. BUT, it could be an interesting feature to add in Skirmish games. The question would be: when should the computer player casts that spell?
    For Destroy Walls, that could be interesting, but only if the level designer wants it to happen on his level, because often, you really don't want the enemy Keeper to perform a breach in your dungeon.
    About the temple sacrifices, I think the computer already knows them and use them, I'm not sure. The only thing I know is, when his creatures become annoyed, the computer drops them in the middle of the Temple, directly in the pool, resulting as weird sacrifices and sometimes, even leading to the crash of the level.
    Last edited by DragonsLover; August 31st, 2012 at 18:33.
    I like dragons! They're the center of my life! I'll never forget them...



  3. #3
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: A more "human" enemy Keeper

    Quote Originally Posted by friscmanseby View Post
    Hi everyone. I think it would be great to have a more "human" enemy Keeper: a CPU Keeper (...) that use Possession spell (for examle trying to attack directly an Enemy Keeper heart)
    Good luck coding that

  4. #4

    Default Re: A more "human" enemy Keeper

    Bugs like the guard post over water/lava, wind over skew direction, and all the Ancient Keeper advanced strategies. For the enemy stronger than you or the enemy that not should enter in your Dungeon, I agree with you, in fact I'm proposing such an advanced Keeper only for the "balanced" challenges the ones in which the enemy starts like you with just the Heart and a bunch of Imps...

  5. #5
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: A more "human" enemy Keeper

    Okay, I'll write out a more detailed post about the problems with most/all of this. I've seen this sort of posts before, and frankly, they really bug me. I know some things are already said by DragonsLover, but I'll still include all of my points for completeness' sake.

    So, let's break down the exploits and tools one by one.

    Guard post over water/lava: Performing this doesn't seem too tricky in theory. AI would need to detect whether it has claimed land adjacent to water or lava tiles, and then place Guard Posts there appropriately. I don't think there's a function to determine whether a tile has certain adjacent tiles to it (I doubt there is), so one would need to write that function first. Probably not infeasible either. But the next problem is utilizing it properly. Sure, the obvious first step is to just place them everywhere a tile is adjacent to water/lava. But then what if, say, a creature crosses the one-way ride down? Pick it up and place it back? That would require an AI routine to detect creatures who are unable to return back to the dungeon (though there's a mentor function which does just that, so it doesn't seem too hard on paper), and then place them back into the dungeon. But where would they have to be placed? Placing them right next to the guard post wall probably doesn't help matters much, especially if the creature is a scout or an Imp hoping to do something on elsewhere terrain (which they would be, most of the time). Especially Imps would just effectively enter a loop of running into the water and getting picked up, which is kinda useless. They could be placed in a suitable working room, but it would require additional routines to figure out where they would be useful (which would be especially tricky with Imps, who are, again, common targets for this). This all for a small blockade which, frankly, doesn't do much. It seems pointless to pit this AI against heroes, other AIs don't have much to do with this (especially another "human" AI which could well avoid this), and a human can easily avoid the issues.

    Wind over skew direction: (I assume you mean the bug to blow creatures through diagonal wall blocks) I don't think this has any use outside of Possession (which, as I'll later describe, has its own share of issues as well). Even then, its setup is very specific. It requires placing down one creature, hoping it stays there, putting down another, utilizing/emulating possession and blow it through there, and then continue on with the other creature. Writing this all to work together sounds like a quite aggravating job, considering it also depends on placing creatures with positions in relation to each other as well as a tile's corner, which no other function to drop creatures does. (It would, for starters, already be difficult enough to find a situation where the AI keeper can actually do this, especially because it's also very situational, depending on select tiles crossing select other tiles. It would take some processing to analyze every single 2x2 block on the map to check if there's such an instance at any time). And then, of course, after finding such a situation, there's also a point to be made about what to even use it for. The only things I can think of are some of the possession deals, which I'll write more about below. Either way, very situational use and requires a lot of things in order to even work.

    "All the Ancient Keeper advanced strategies": I don't know if you realize this, but computers are not humans. They don't have human deduction skills. Even strategies which can seem patently obvious to most humans can be way beyond the grasp of computers, without or even with extensive calculations and/or bruteforcing. Especially something like Ancient Keeper, which requires very specific utilizations of tricks (as far as I know/have heard) is an example which you will never get an AI to even work at all in. Forget it.

    Possession Spell: Boy howdy. One thing to remember is that an AI isn't literally playing the game. It doesn't have the concept of seeing things like a player does, such as viewing certain points on the map, seeing what things are going on, it lacks a concept of fog of war, but most importantly here, it doesn't have the concept of viewing things through a creature, as that was never programmed in. So to start with, a possession function would require a way of understanding how viewing through a creature works. This is an entirely different form of gameplay, which pretty much requires an AI in itself. An AI which would have to be written from scratch, mind. This new AI would require perception of its location, pathfinding (although it could borrow from the actual engine for that one), and functions to actually move properly and use abilities. Once we have all of that figured out, we still need to get the AI to use it properly.

    In what kind of instance would we have an AI using possession? As mentioned above, Ancient Keeper style strategies are not going to be possible because AI lacks human deduction. It can't do complex human strategies. Now, directly attacking the enemy heart actually seems to be one of the more feasible options, in terms of deciding to actually use it. It still has some complicated issues, though. One of them is picking the most suitable creature, although it seems workable (though it requires writing some functions to calculate creature effectiveness in that regard, and on what variables would you have such a function even work with?), dropping it to the closest spot to enemy dungeon heart (provided there are pathfinding means to access, of course), use the engine's prebuilt pathfinding to go there, and if the enemy Heart is in sight, obviously, attack it. But there are still some other issues that arise with it. What if the possessed unit finds another creature? Or rather, if a creature finds the possessed unit? Would the AI need to determine whether to fight it or not, flee, or exit "possession" and jack out the creature, or what have you? This would require analyzing the creature(s) it has around itself, and finding out if it's better to fight or to do something else (something I don't think the AI can by default, so that's another function to write there). And this is just one, relatively trivial, utilization of possession. I could fill an entire book if I had to write down about all, or even just most utilizations of Possession, and what struggles an artificial intelligence would have if it were to attempt to do them.

    Cave-in: I assume you're only going for situations where Lightning isn't pretty much superior, which I assume means using it for holding off enemy creatures/imps going through corridors towards one's dungeon. A very good question to start with is, how is the AI going to detect what creatures to use it on? Pretty much a given would be that they're on the AI's territory, or at least in close enough proximity (otherwise it would attempt to use it on basically anything, which is hell to go with especially as AIs have map omniscience, including the player's dungeon). So it would need to find those creatures going towards its dungeon. Then in order to effectively use the spell, it would need to be used a bit in advance to the enemy creatures' position (otherwise they'd just go past). Would require an additional algorithm to predict where the enemy creature would be based on its current position, direction and speed (is that even possible within the engine? If not, we're going to have quite an issue). And even then it would not always work. So yeah, unlikely there's going to be a reliable method to effectively use this.

    Armageddon: Two issues with this. The problem isn't with actually using this, as that would be easy enough. Part one of the issue is, when to use this? I suppose calculating creature superiority (determined by level, creature counts and maybe some other things (specific creatures? Creature strengths?)) is possible, and using it when the computer finds a significant lead over the others doesn't sound as hard as some of the other things in here. The second part is slightly different, however: it would be very annoying and/or frustrating to a player if an AI (seemingly) randomly decides to do this. This would be because of its instant-victory nature of the spell. If you're just building your dungeon, patiently waiting your time, and suddenly, bam, enemy uses Armageddon and you either win or lose, it's frustrating because either you lose everything you've spent time building for, or you've managed to win and now have little to do, and would probably be not very satisfying either. That's why this is a player-only spell: Because it wouldn't be (nearly as much) fun if the AI decided to throw it out.

    Destroy Walls: Doesn't seem to be very much of a problem, actually. Determining when an attempted dig fails is the first issue; there would definitely need to be an AI function written for that, and it doesn't seem to be trivial to determine such a thing. Then if this is determined, find out if it's an enemy wall, and then if there's good reason to (AI wouldn't want to be suicidal, after all), break the wall. Not as hard as some of the other things, it seems. Though it would still require some tricky algorithms to actually decide whether it's worth breaking through - the AI would need to compare its own units' strength to that of any other creature that could be at the other end of the wall. That could be tricky, as there would be possibly a truckload of enemy units to individually analyze (if that's even possible) and then compare all that to the AI's own creature force. Have fun calculating what would be superior or not. And there's also the issue that it's actually kind of annoying to have an AI smash through your walls, though I suppose the novelty of the AI actually using Destroy Walls may make up for that one.

    Using Temple Sacrifices: Actually, some AIs do this, although by accident: when creatures get angry they'd drop them in the temple, but because they by default drop creatures into the center of a room, down the pool they go. Obviously dropping creatures into a room isn't a large issue. The biggest issue would be determine which units to sacrifice and when, which would require complicated algorithms involving evaluating the values of the current creatures and the values of what would be the result (how are you even going to determine this?) and if this happens to turn out positive, make a selection of specific creatures (does the current AI even do this to any significant extent? I don't think it does. That would require writing additional functions to determine the qualities of specific creatures that are around in the dungeon, which is another complicated matter), and then take those creatures and into the temple they go. I don't see this being helpful in a lot of cases, and it would be a large strain to make the AI make intelligent decisions to throw creatures into the pool.

    To summarize, most of these instances would be a very large load of work, if they're even possible. Otherwise you could just forget it outright. And then, realize that many of these cases, which I need to stress again require a lot of work, are very insignificant. For most things, the uses are specific and don't occur often. To put it more bluntly, none of these would be worth the effort. Not nearly they would. This is exactly the reason most of these things actually are unused by the AI: because it's not possible to write sensible intelligence for any of these in any reasonable amount of time. (Remember especially that within the professional business there's such things as deadlines, which means you won't be having free time to do everything. As a matter of fact, the reason for many of DK2's problems are related to deadlines. DK1 has some of this as well; unused features (e.g. ghosts going through doors) not being implemented because of deadline issues, et al.). Now, mefistotelis isn't working a professional business here, but we're talking about one guy, who would spend ridiculous amounts of time at this, if he ever decided to do some of these. Also keep in mind that the Dungeon Keeper/KeeperFX fanbase is rather small, so mef would do this for not even many people, much less people even who actually care about something like this. So yeah, I don't see much of this happen. Far too much effort for far too little gain.

    tl;dr: AI coding is not a trivial matter. At all.
    Last edited by Mothrayas; September 1st, 2012 at 00:38.

    The Awakening


  6. #6

    Default Re: A more "human" enemy Keeper

    So, Mothrayas, thanks to you for such a great analysis of the problem, it's not sarcasm: I don't want to flame or troll all I want is solve problems: I think we need a little more challenging enemy Keeper because sometimes he is a very strong guy, other times (when we start in the same conditions) he can't build a proper dungeon. So, how to solve this? At first I think that must be eliminated the bug that sometimes he don't manage to build his dungeon (if an obstacle is on his way he cannot recalculate another dungeon layout). Then, he should be able to throw out from the portal useless creatures (even if, I know, the concept of useless creature is very subjective). Then he should at least manage the rivalries between creatures (he just cast a call to arm near fighting creatures). I know that the AI has many limits, also because Dungeon Keeper is more complex than other strategy games (in which the AI doesn't seem so bad). In this post I proposed more reasonable things, so, what you propose to improve the enemy AI?

  7. #7
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: A more "human" enemy Keeper

    Quote Originally Posted by friscmanseby View Post
    So, Mothrayas, thanks to you for such a great analysis of the problem, it's not sarcasm: I don't want to flame or troll all I want is solve problems: I think we need a little more challenging enemy Keeper because sometimes he is a very strong guy, other times (when we start in the same conditions) he can't build a proper dungeon. So, how to solve this? At first I think that must be eliminated the bug that sometimes he don't manage to build his dungeon (if an obstacle is on his way he cannot recalculate another dungeon layout). Then, he should be able to throw out from the portal useless creatures (even if, I know, the concept of useless creature is very subjective). Then he should at least manage the rivalries between creatures (he just cast a call to arm near fighting creatures). I know that the AI has many limits, also because Dungeon Keeper is more complex than other strategy games (in which the AI doesn't seem so bad). In this post I proposed more reasonable things, so, what you propose to improve the enemy AI?
    Those are much better and much more feasible ideas. Thanks for getting the point of my post

    I've seen very inconsistent AI throughout Dungeon Keeper 1. Sometimes the AI would never do anything, sometimes the AI would entirely fail to dig any gold at all, but I have seen times where it's actually quite competent, as far as gold digging goes. I think the issue with DK1's AI is not that it's bad per se, but in practical situations it seems to have issues detecting things such as gold nearby, causing it to lock up and do nothing. I don't know how the gold detecting algorithms work in Dungeon Keeper or KeeperFX - only mefistotelis knows - but there are probably some area for improvement so that it can always reliably detect the closest veins of gold. If that gets fixed, we'd already have a much more capable AI.

    The other problems could potentially be fixed as well (though I imagine the lair creatures one may be trickier to fix, because the AI detects that a battle is going on, but doesn't recognise a situation of creature infights).

    As for the useless creatures, maybe the AI can be programmed to drop insects into the temple when he gets one. This not only rids him of the useless creatures, but also makes a boost with Research (2 flies sacrifice), manufacturing (2 beetles sacrifice) and creatures (spiders sacrifice).

    Other than that, I think the AI should be made to handle individual creature types better, make them use their specialties better. That is, don't toss in creatures in the Library/Workshop that aren't good at it, and also generally focus more on training because AI tends to have its creatures underleveled.

    (Short-ish post because I haven't got much time now, I may put more here later)

    The Awakening


  8. #8

    Default Re: A more "human" enemy Keeper

    Uhm, if you will put more post, then I'll wait to answer to you. The only thing I say to you now is that the mentor can recognize a battle and a fight between your own creatures, so I think that is not impossible to create a way (for the enemy Keeper) to handle the problem...

  9. #9
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: A more "human" enemy Keeper

    Quote Originally Posted by friscmanseby View Post
    Uhm, if you will put more post, then I'll wait to answer to you. The only thing I say to you now is that the mentor can recognize a battle and a fight between your own creatures, so I think that is not impossible to create a way (for the enemy Keeper) to handle the problem...
    Yeah, I was thinking that too. Still would need to get the AI an appropriate action, though - not doing the usual combat procedure (as that's normally triggered as well), but instead taking away one of the two fighting creatures and doing... what exactly with it? Not sure about that one. I suppose it could be placed in another lair, but what if the keeper doesn't have another lair?


    Also, I think I've already made most of my points in that one post, I don't think I have much to add there.

    The Awakening


  10. #10

    Default Re: A more "human" enemy Keeper

    So, I think the only think to do is wait that Mefisto choose his way to improve enemy AI...

Similar Threads

  1. Replies: 2
    Last Post: August 13th, 2012, 09:50
  2. Evil Keeper Campaign Level 14 "Hameln"
    By JAM35 in forum KeeperFX
    Replies: 5
    Last Post: August 29th, 2011, 00:19
  3. Replies: 2
    Last Post: June 5th, 2011, 12:00
  4. Replies: 2
    Last Post: November 11th, 2010, 10:00
  5. Replies: 37
    Last Post: February 19th, 2010, 17:54

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •