As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
AI

(February 19th, 2019, 01:15)Seravy Wrote:
Quote:The ai can independently target that city regardless of scouting with its stacks (confirm if this is correct please).
Correct.

I'm pretty sure that it doesn't curse it or volcano its resources if it doesn't scout it first though.

Do you mean target as in send troops there? Yes that's unfortunate but probably unavoidable. What else can it do?
Reply

Yes, I mean send troops.

Specifically, the AI CANNOT target the city with curses (or if the curse targets a tile then the tiles around the city) if it's not scouted. For every other purpose, AI scouting is not implemented, so the AI can do anything else. Curses that do not target a city or tile, but target units, use no scouting either, so Fire Storm can still target your garrison.
Reply

(February 20th, 2019, 04:41)Seravy Wrote: if the curse targets a tile then the tiles around the city

Speaking about that, does nightshade work on those? I don't think so, I've never seen a spell protected but maybe it works in the background...

If not then I think it should. It's not like nightshade does much, it could at least try to dispel corruptions and volcanoes.
Reply

Nightshade can only counter spells if they target the tile the city is on. So yes, it can counter Raise Volcano, or Fire Storm, but only if they are targeted at the city tile itself.
Reply

Is that a technical limitation? Otherwise I don't see why it shouldn't likewise protect the city territory .
Reply

Any idea what 2 AIs are doing at the north pole with their best stacks? Looks a bit buggy. They seem to stay too...


Attached Files
.gam   SAVE3.GAM (Size: 151.96 KB / Downloads: 2)
.gam   SAVE4.GAM (Size: 151.96 KB / Downloads: 2)
Reply

They aren't doing anything in particular.

As for how they ended up there, it's simple - Diagonals are equal cost to horizontal movement so the "shortest" path from the yellow and green continents to each other leads through there.

The units did move though - they are not on the exact same tile in the files. The first file worried me a little because they were around the 0,0 tile but in the other they seem to mostly gather 2 tiles to the east from it so that seems unrelated.

I see a very good chance the AI can't pick a main action continent, and without one, intercontinental stacks can't do anything, except attacking nearby (range of 10) targets and building up into a doomstack.

On this map, most continents belong to at least one of these, which cannot be chosen :
-The AI's own continent(s)
-An allied continent (I'm unsure if that's an actual thing but probably)
-A continent already marked no targets : your own has only strong lairs left, and the green one is cut to 3 separate parts blocked by units or a volcano so there is a high chance the AI already marked it no targets
-The single tile island with the neutral has no ship landing position.

Ask green to declare war on red and they'll start heading towards red territory. This shows they simply had no valid continents to invade.

Short answer, none of the AI's currently have an enemy to attack with those stacks.
Reply

Thanks, I wonder whether something could be done for this kind of situation. Splitting up stacks forcedly when they have nothing to do perhaps? Then there would be a chance to form better ones with the heroes, no?

Have you considered extending nightshade to protect city territory as well for curses like volcanoes and corruption?
Reply

Is the AI's 'where's the best place to settle?' algorithm easy to modify? I think the AI could do better if it was optimized for its strengths, rather than trying to emulate a human. For example, mithril is really valuable for human players, but the AI seems to prefer summoned units rather than regular, so mithril is less valuable. I see the AI sending settlers quite a long way for a location that seems only slightly better, and harder to assist in defending. They might do better if minimum travel time was given higher priority. Given how COM's buildings tend to have high fixed returns (magic market = 6 mana), cities 4 spaces apart generally provides more resources than fewer cities with higher pop caps. Instead of just changing a multiplier, maybe a more complex formula can be used, with distance^2 or some such thing to make longer distances less desirable.

Maybe restart an old game with these new settings and see if their production is significantly higher at turn whatever.

I also see the AI settling islands with only one city where I'd place two or three less-ideal cities. However, I doubt that the AI can be modded to solve that.
Reply

It's easy to modify as long as it's the numbers only.

Code:
mov     ax, [bp-20h] ; 10* Max POP
mov     dx, 0Ah
imul    dx
add     ax, [bp-22h] ; 1* Production bonus
add     ax, [bp-24h] ; 1* Gold % bonus
add     ax, [bp-26h] ; 1* Unit%reduction bonus
push    ax
mov     ax, [bp-28h] ; 4* Gold generated from ores
mov     dx, 4
imul    dx
mov     dx, ax
pop     ax
add     ax, dx
push    ax
mov     ax, [bp-2Ah] ; 6* Power generated
mov     dx, 6
imul    dx
mov     dx, ax
pop     ax
add     ax, dx
push    ax
mov     ax, [bp-2Ch] ; 5* Nightshades available
mov     dx, 5
imul    dx
mov     dx, ax
pop     ax
add     ax, dx
cmp     [bp-32h], 0
jz      short loc_F0708
add     ax, 78h ; 'x' ; Adamantium +120
jmp     short loc_F0711
loc_F0708:
cmp     [bp-30h], 0
jz      short loc_F0711
add     ax, 50h ; 'P' ; Mithril +80
loc_F0711:

push    ax
mov     ax, [bp-12h]  ; Shore available +40
mov     dx, 28h ; '('
imul    dx
mov     dx, ax
pop     ax
add     ax, dx
cwd
idiv  word ptr  [bp-10h]


[20*MaxPop+Production%+Gold%+UnitCost%+4*gold+6*power+5*Nightshades+120 if adamant+80 if mithril+40 if shore]/(8+Distance)

Mithril and Adamantium is valuable for the AI : they prioritize building units in cities that have those significantly higher. Mithril and Adamantium units have a much better chance to conquer lairs and get the AI new spells or resources as well as being more expensive to kill in combat for the human player.

Arranging cities in a way that uses the available area in a way that results in the highest number of cities is much more complex than simply looking at the distance, and isn't not possible for the AI currently or probably ever : it would require looking at all possible arrangement of cities on the map and finding the set with the highest overall value AND would require all AI's to follow this exact same plan. Simply building the closest isn't always guaranteed to give you the highest number of cities.

AIs wasting city spots isn't necessary detrimental to their efficiency either : building more cities takes more time so such optimizing opens up more chances for enemy players to steal the spots from them. Unless the AI already has multiple settlers ready to send which they don't (there is a limit how many they build at the same time), leaving more spots open means a high chance other players will get there first.
Reply



Forum Jump: