Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 33

Thread: commenting keepcompp.cfg

  
  1. #21

    Default Re: commenting keepcompp.cfg

    The 1st [computer#] value.
    ; <workload> - how much the AI takes into consideration the imp workload before tagging gold and rooms; to be precise it defines the percent of total dungeon area to be compared against the total number of imp tasks to determine whether to tag gold and rooms; a higher value means waiting for less imp tasks to completed and lower means waiting for more

    When set to 10000: no consideration given, won't wait before tagging.
    When set to 0: if there's even 1 wall that needs reinforcing then gold and rooms will not be tagged and the AI will wait until all imp tasks are completed before continuing. If the AI is in the process of tagging a large room, what can happen is an imp will begin digging it thus an imp task is created and the tagging will stop half way through. Then will only continue tagging the rest when imps have reinforced every single wall in your dungeon and there are no tasks remaining. So it definitely behaves awkwardly when set to 0.

    This is only for gold and rooms, other forms of digging can still occur, such as digging to an entrance or building a hallway to a room that is waiting to be created.

    There is a distinction to be noted between "imp tasks" and "busy imps", even if you sacrifice all your imps the tasks are still there waiting to be performed. List of imp task types:
    DigTsk_ImproveDungeon
    DigTsk_ConvertDungeon
    DigTsk_ReinforceWall
    DigTsk_PickUpUnconscious
    DigTsk_PickUpCorpse
    DigTsk_PicksUpSpellBook
    DigTsk_PicksUpCrateToArm
    DigTsk_PicksUpCrateForWorkshop
    DigTsk_DigOrMine
    DigTsk_PicksUpGoldPile
    Last edited by rainlizard; February 7th, 2018 at 11:56.

  2. #22

    Default Re: commenting keepcompp.cfg

    Is the 10000 just some random large value you came up with, or the actual max?

    Quote Originally Posted by burntonion View Post
    You'll notice I didn't list "water" in the blocking space list. That's because it bugs out the AI! Imps cross the water, dig out the space, refuse to build a bridge, and then the AI's completely stuck on that build process because it's unable to claim the dug space. There's another obscure bug for you.
    I've listed it here with some maps for reproduction.
    Last edited by YourMaster; February 7th, 2018 at 22:27.

  3. #23

    Default Re: commenting keepcompp.cfg

    Quote Originally Posted by YourMaster View Post
    Is the 10000 just some random large value you came up with, or the actual max?
    if ((digger_tasks > 0) && (total_area * (value / 100) <= digger_tasks)) {then stop tagging gold and rooms}

    The math is peculiar, the value is a percent, but 100% is not enough to always be tagging in all situations. For example when you have a small dungeon area but have a lot of walls (more than your dungeon area) that need reinforcing, plus ground to be claimed and a lot of dead bodies to move, etc.

    I'm having trouble getting a crystal clear view from testing, I'm getting some inconsistent results as there's a lot of factors like imp tasks seemingly taking a while to populate and imp tasks seemingly not increasing when the imps are too far from the dungeon heart. It's enough for me to know that low numbers prioritize tasks before tagging and high numbers don't. It's all dependent on your total dungeon area after all.
    Last edited by rainlizard; February 8th, 2018 at 00:52.

  4. #24

    Default Re: commenting keepcompp.cfg

    Quote Originally Posted by burntonion View Post
    if ((digger_tasks > 0) && (total_area * (value / 100) <= digger_tasks)) {then stop tagging gold and rooms}
    What file of the code is this in?

    I knew the computer player is bad, but I didn't realize how many issues there are. In one play watching computer15 (balanced skirmish computer), here are the other issues I've noted:

    - Never digging to claim a very closeby second available portal
    - Not seeking out the gold that requires the shortest path
    - not exploring in general
    - not seeking gold once gems are tagged
    - past a certain point, imps stop fortifying

    Also, do any of the skirmish (or standard) computer players actually ever go on the offensive and seek out to kill a rival player?

    If they're incapable right now of seeking to go on the offensive against the rival keeper(s), do they ever even make use of Armageddon? That one would be easy to implement.

    Man I'm excited to get all of this working. We might actually see a decent skirmish computer AI with several changes implemented.

  5. #25

    Default Re: commenting keepcompp.cfg

    What file of the code is this in?
    player_comptask.c, inside task_dig_to_gold{} and task_dig_room{}. I wrote the line in an easy to understand way.

    - Never digging to claim a very closeby second available portal
    Interesting, DigEntrn process will tell the AI to dig to only 2 neutral portals, never 3 or more. Even if there's multiple neutral portals close in proximity it still won't get more than 2. Enemy portals is a different story because that uses Attck1.

    "CHECK FOR NEUTRAL PLACES" honestly sounds like it should allow AI to look for neutral rooms and portals to dig to but I'm having trouble getting it working. It's funny, there's SEVEN of those checks (NeutPlc1-NeutPlc7) and I have no idea how they work. Can you guys fill me in?

    - Not seeking out the gold that requires the shortest path
    Isn't that the difference between DigGold/DigClGold/DigGrGold/DigGrGld2? The distance at which gold is targeted. I haven't had any issue with it.

    - not exploring in general
    The ultimate purpose of exploring to gain an advantage would be to find neutral places to claim and get free neutral creatures so maybe "check for neutral places" is the answer, I don't know. Exploring for the sake of exploring isn't of utmost importance in my eyes, going after gold and attacking enemy entrances is enough.

    - not seeking gold once gems are tagged
    Not a precise truth, but true in practice. It's because of <money_below>, the AI stops tagging gold until money falls below that amount. But with gems it will never fall below.
    Honestly I think that value is stupid, only poor players ever think "oh I've got enough gold now" and stop tagging, personally I tag all gold when I play. Just set it to 9000000 or whatever the maximum allowed value is so AI never stops tagging new gold.

    - past a certain point, imps stop fortifying
    I don't know about that, AI's imps do fortify when they've got nothing to do. I've seen AI interrupt fortifying imps by slapping them and picking them up. I think it's a low priority job by intentional design, I'm not a fan of players turtling in the first place so I don't really care.

  6. #26

    Default Re: commenting keepcompp.cfg

    Quote Originally Posted by spartahawk View Post
    What file of the code is this in?

    I knew the computer player is bad, but I didn't realize how many issues there are. In one play watching computer15 (balanced skirmish computer), here are the other issues I've noted:

    - Never digging to claim a very closeby second available portal
    - Not seeking out the gold that requires the shortest path
    - not exploring in general
    - not seeking gold once gems are tagged
    - past a certain point, imps stop fortifying

    Also, do any of the skirmish (or standard) computer players actually ever go on the offensive and seek out to kill a rival player?

    If they're incapable right now of seeking to go on the offensive against the rival keeper(s), do they ever even make use of Armageddon? That one would be easy to implement.

    Man I'm excited to get all of this working. We might actually see a decent skirmish computer AI with several changes implemented.


    That's player_comptask.c.

    - Computers might not dig to a second portal, but that's a moot point since a second portal doesn't do anything
    - Compters do actually attack, the quick_attack and Attack plan 1 do work. And they also often go to your gold so they'll have confrontations that way.
    - They don't explore much, but they don't have anything to gain yet from exploring. If they find a special or heroes they wont use/convert them. And there are actually processes to have the computer dig into neutral area's.
    - Armageddon isn't used, but I'm not sure how much fun that spell is since it ends the game immediately and you can't do anything against it. Destroy Walls also isn't used when available. So when they want to attack they'll just run into a wall and give up.

    And it wasn't an exaggeration. They literally went 'oops, we still need a Computer AI' 2 months before going gold and Molyneux personally coded something in real quick. Before DD/Gold on many campaign maps the computers just froze from the start. Like they did not dig a single tile.

    EDIT: Added quote. burtonion's post just appeared out of nowhere because of his junior status.
    Last edited by YourMaster; February 9th, 2018 at 00:51.

  7. #27

    Default Re: commenting keepcompp.cfg

    Thanks. And that particular issue tag will be useful as I continue to consider AI-related things to work on ... https://github.com/dkfans/keeperfx/l...ent-CompPlayer

    Good to know certain AIs do go on the offensive. As long as they can do that, yeah, it would be better to usually have them use Armageddon I was thinking that Armageddon would at least be a last resort to make the computer threatening at all if it didn't do anything else to actively try to kill you.

  8. #28

    Default Re: commenting keepcompp.cfg

    Destroy Walls you mean? Because that indeed makes a difference and would actually be quite fun to go against.
    I'd say improved mining and prison-management are higher priorities since they will make the computer actually be somewhat strong enough to actually challenge you - there's no point for the computer to break down your wall when that means you can instantly take him out, if he could afford it in the first place - but after that it enables the computer to attack a turtling player and do so actually quite late into the game.
    It also gives a mapmaker an additional tool in determining when a CP will attack, as you can give (access to) the spell through the script when you want.

  9. #29

    Default Re: commenting keepcompp.cfg

    Quote Originally Posted by burntonion View Post
    "CHECK FOR NEUTRAL PLACES" honestly sounds like it should allow AI to look for neutral rooms and portals to dig to but I'm having trouble getting it working. It's funny, there's SEVEN of those checks (NeutPlc1-NeutPlc7) and I have no idea how they work. Can you guys fill me in?

    Isn't that the difference between DigGold/DigClGold/DigGrGold/DigGrGld2? The distance at which gold is targeted. I haven't had any issue with it.

    The ultimate purpose of exploring to gain an advantage would be to find neutral places to claim and get free neutral creatures so maybe "check for neutral places" is the answer, I don't know. Exploring for the sake of exploring isn't of utmost importance in my eyes, going after gold and attacking enemy entrances is enough.
    I don't think I've ever seen the 'Dig to Neutral' in action either. And not just neutrals of course, it should also find heroes to attack and convert. It's just that the converting doesn't work.

    With the mining to close gold Sparta refers to this issue on the feature list, where gold is mined that is closest to the dungeon hearth, not closest to the AI dungeon which causes the CP to die to heroes.

  10. #30

    Default Re: commenting keepcompp.cfg

    That was poorly tested when I said DigEntrn only captured 2 portals max.

    DigEntrn
    ; When the interval occurs, digging to an entrance is only executed when either of these conditions apply to AI:
    ; 1. Entrance count is less than a third of [neutral entrances + own entrances]
    ; 2. An opponent has more portals
    ; Upon execution will dig to the nearest portal; which can include digging to a closer enemy portal but only if there's a gap in their fortification (neither Attck1 nor EnEntrn1 required for this)

    It's interesting to see another method of attack, works a bit different than Attack Plan since it requires a fortification gap before digging.

    About "Check for Neutral Places" if you put Frame Skip on 512 eventually you will see AI dig to a Neutral room, it just takes a very very long time, but I'm having no luck altering anything with the values and params. It's a bit of a brick wall.

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
  •