Why AI is so dumb?
It tries to hit villagers and TCs with its explorer alone. It doesn’t do much harm but it is just annoying.
Why AI is so dumb?
It does freak out newbs though, making you garrison villigers, wasting resource times, and on harder difficulty they gain an advantage this way.
I actually didn’t think this was intended… just a consequence of an explorer doing his exploring and then attacking whatever as he waits for his next point to go to. I could be wrong, though.
Nah, it’s coded in. How do I know? They only do it in specific conditions:
- They have aged up from 1 to 2 (and only in age 2)
- Their target has not yet reached age 2 and thus, has no military
- Their target is always the player. It will never do this to an AI opponent.
It’s an irritating nuisance that accomplishes nothing for the effort and often ends up with the AI losing it’s explorer and it remaining there dead for the rest of the game. It is suboptimal play and it should be removed from the coding.
worth noting once the explorer is down the AI will send random units to save them for the rest of the game, often into the middle of your base. Also, even if the AI doesn’t do this with an explorer they will always send 1 random age 2 military unit to your TC once they reach age 2 before you. I guess the idea is to simulate them scouting out your town to prepare to send armies?
I dunno man, I’m reading the AI script on this, it’s 20 lines long, and there’s nothing about intentionally doing any of that. There is something about quitting the exploration plan once they find your base so maybe the explorer doesn’t return fast enough when that happens and then the explorer just starts shooting whatever is around. In my experience that’s a more accurate description; the explorer finds the TC, then stops and starts shooting whatever is in range until he dies.
Thank goodness for people like you who can dig through the files and make something of it. The pattern of behavior is there, but the developers’ intent was clearly different. Regardless, the behavior the code produces is still in need of an upgrade.
Out of curiosity, could you post the file path to the script you’re looking at? I’d like to look at it, even though I probably can’t make much of it. Sometimes, just reading it like it’s pseudo-code and seeing the comments is enough for my novice self to get the gist of what the code is trying to do, and that itself is helpful.
Two thoughts come to mind:
- The trigger to end exploration mode comes too early. The explorers could be scouting the map and collecting more treasures for at least several more minutes. If your games are like most of mine, they’ll only take 1-2 at most right now.
- Perhaps the key here is that the main behavior of the unit needs to change so it doesn’t waste time pecking at things it can’t kill. They’ll do this with trade posts too, and 5 minutes later, if you can stand to ignore the irritating alarm sounds that long, they’ll eventually take out a trade post and build their own. If they’re in battle mode, they need to go in a group.
The AI files are in:
You’re looking for aiExploration.xs starting around line 689. You can open it up with Notepad though it’s not the most pleasant way to view it.
Maybe, I could still be wrong. It certainly wouldn’t be the first time.
My thesis is that the explorer is programmed to go to you base and scout around the mark of 4-6 minutes (Sort of like what a human would do), but the bot is kind of stupid and just end’s up attacking the vills.
The AI on this game do lot of stuff like this. Stuff that is probably to simulate a human blayer, but end’s up just doing stupid stuff. Like creeping treasures. Humans do this stuff and the AI kind of tries to replicate but ends up just stuck, no understanding how the circle works and always resetting the guardians.
The ai in this game is just bad in general. I’ve said it a couple of times, but ai armies won’t even bother returning fire if they’re attacked until they reached the building they went out to attack themselves. The explorer being dumb is only really annoying to me since he always seems to die where I want to build something. I still hope for an update that solely focuses on the ai.
That’s only on Moderate difficulty or lower. On Hard and above, it will absolutely fight you, and it will micro its units reasonably well as well. However, Moderate has many modifiers that make it too easy to the point where there is a really big step up to get to Hard.
- Moves armies instead of attack-moves
- Soft cap of population at 130
- Uses suboptimal decks
- Does not aggressively rush in Age 2
- Uses suboptimal micro, with the exception of artillery
When you step up to Hard difficulty, all of that goes away. It’s too big of a jump. Right now, IMO, the obvious solution is to take away some of those penalties and smooth out the difficulty curve as a player progresses. For me, the biggest thing is to simply use attack-move so their units will simply defend themselves.
If I think about Moderate difficulty, this is for players who have some idea of how to play but are still becoming familiar with both the economy and the military counter system. Avoiding rushes and having a lower population soft cap, this allows a player to imperfectly manage his economy and still field an army and advance through the ages on his own pace. If you know enough to turtle and focus on your economy, you can outlast the AI on Moderate. If you want to try rushing and end up doing a poor job with the economy, the AI won’t punish you too hard for it. All of that is a good thing. It lets you get a good experience through the campaign and a good introduction to the competitive game in Skirmish. But the armies need to defend themselves. The move-only command is something for Easy and Easiest. The Moderate player needs a bigger challenge in order to get ready for Hard.
EDIT: why do I keep getting censored when I’m writing codes? My original message:
There are minimum two layers for the AI:
- The script side that anyone can modify — simply requires some extremely basic modding knowledge and basic programming experience.
- The engine side that only the devs — and super skilled reverse engineers — can modify.
Take this example written in the script side:
int explore_plan = aiPlanCreate("Explore land with Hero units", cPlanExplore); aiPlanSetDesiredPriority(explore_plan, 15); aiPlanAddUnitType(explore_plan, ############# , 1 , 2 , 3); aiPlanSetActive(explore_plan, true);
In “normal”, non-programming words, it’s basically saying “Engine AI, darling, please grab 1-3 hero units and make them explore the map”. The engine-side AI will then do whatever it was programmed by the devs to do in accordance to the script’s requests.
The way I’m seeing it, the internal AI is clearly bugged. But if it’s not a bug, then this intended behavior is not good enough for my taste.
Out of all units that you’re telling the AI to use, the Explorer is always the one who causes the dumbest behavior:
- If you’re assigning “normal” units (e.g. Musketeer) to a
cPlanExplore, they explore normally. As soon as you assign an Explorer to that plan, the AI suddenly creates a
cPlanGatherNuggetsand proceeds to target a treasure they can’t properlly win.
- Speaking of treasures:
- it seems to be fixed in Definitive Edition but Explorers used to be kiting guardians inefficiently, which led them to die.
- when the AI’s explorer is kneeling to claim a treasure and you hit him, he systematically responds.
- in legacy, when the AI’s WarChief uses his ability to convert a treasure guardian and gets hit, he systematically aborts the conversion and starts fighting whoever hit him
- The Explorer is always the one who keeps harassing you. Lone scouts may randomly hit your villagers if they’re ever idle for a short moment, but it’s only as short and forgettable as any other random hit.
I think it’s worth nothing that modders are already given the ability to write their own
cPlanGatherNuggets, so I don’t understand why it’s embedded to
cPlanExplore when an Explorer is involved.
In this case I actually think it’s a surprisingly easy fix in the script (from what I briefly read). Instead of killing the explore plan when he finds the TC just tell him to go away first. I would do it myself but it sounds like a pain to test.
The AI is still bugged under the hood though. But at the end of the day, I guess what matters is that the Explorer stops harassing those poor villagers.
Something’s fishi here xD
Yeah I don’t know why I keep getting censored. It happened in another comment I posted as well. I’m forced to post screenshots, lol