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

Create an account  

 
AI

(February 25th, 2017, 12:02)Catwalk Wrote: How about simply relaxing your 3 rules? Say, multiplying hero swords and shields by 1.5 for purposes of the above calculations.

Would you be able to come up with a factor that estimates a wizard's magic strength in combat? You'd be able to use that for a lot of stuff.

That would get the hero killed against multi-figure units. That way a 8 shield hero could attack a 18 sword unit which is not safe at all if that unit has 6 figures. Might be better to leave it as is.

A wizard's magic strength? Well, strategic combat uses the number of books owned multiplied by casting skill for that - not very accurate because it ignores research. Every spell in the game is situational - some units are immune to them - so a generic "strength" rating is not possible. That Fire Bolt I used would have been useless if the AI had Fire Immunity on the hero, or if they could have healed more than my damage output.
For casting spells that are anti-magic, unless enemy units have related attacks, the AI checks for book realms only : for example Resist Magic is used against wizards that have any Death books, or Elemental Armor against those who have Chaos or Nature if there is nothing better to do.
Reply

Are your rules concerned with stats per figure or stats * figures?
Reply

Quote:not very accurate because it ignores research.

i was actually thinking about this. can it use the current turn number as a rough extimate? then you can make the books besided the first ones matter more, but only after a certain turn. maybe we can think of some more weghts. hell, even casting skill could be a (very rough) extimate of about how far the wizard has proceeded.
Reply

not really. i've seen very rares in 1407; and games where no AI had very rares in 1418. While humans probably don't have QUITE that much spread, it's still a massive spread. (Sagemaster halfling vs barbarian playstyle for instance.)
Reply

i could (probably) still hepl more often than hinder, if correctly weighted.
Reply

I'm observing early game AI choices right now. Two things stand out to me:
1) It settles very aggressively (probably a good thing, it suffers economically but it can afford it)
2) It keeps suiciding groups of 1-3 units into strong neutral cities, killing hardly anything

Can someone code savvy explain why it decides to target a city that seriously outguns it? What's more, it could take the city easily if it formed a stack. I assume it is difficult to teach it to do this, but I was wondering where exactly the problem lies.

Also, wtf with building a fighter's guild on turn 10 after 2 settlers? I get the settlers, but the AI is totally throwing away its economic advantage with these shenanigans. It uses this fighter's guild to produce berserkers that suicide into a city of 9 nomad pikemen. It also sends 1-2 ghouls at a time.
Reply

I think I've found it:
Quote:(new in 2.9) and checks if there is Jihad hostility towards anyone. If yes, the stack is at least as strong as 9 halberdiers, and the capital is on the continent and reachable, they are ordered to move there. During Jihad hostility, enemy troops are not considered roadblocks and the AI will try to move through them - though considers these tiles more expensive to enter than mountains. During any other level of hostility, enemy troops are considered roadblocks.
...and sends each to the highest (priority/distance) target that is weaker than 1.33 times the power of the AI's stack to attack it then erases the target from the list by setting its priority to -1
But the target is way stronger than the AI's stack? What causes this behaviour?
Reply

Quote:2) It keeps suiciding groups of 1-3 units into strong neutral cities, killing hardly anything

Bug? Can you show me some examples?
The AI is not supposed to attack unless their stack power>=0.75*target stack power.
Note that the calculated stack power might not be a 100% accurate representation of actual chances to win.

Quote:What's more, it could take the city easily if it formed a stack. I assume it is difficult to teach it to do this, but I was wondering where exactly the problem lies.

It would do that but it thinks the smaller stacks are enough so it attacks.

Quote:Also, wtf with building a fighter's guild on turn 10 after 2 settlers?

This was added for several reasons :
-because people wanted the AI to produce less settlers, and this can interrupt them doing so - the time spent on the fighter's guild was meant to delay that. This is probably still relevant on low difficulty games but on high difficulty the AI will buy the FG with gold so it's not slowing them down anywhere nearly as much.
-it ensures the AI has decent units that stand a chance against early attacks (swordsmen aren't very effective at that - halberdiers are at least relevant)
-Having the Fighter's Guild mandatory makes them pick a top tier military building happen a lot earlier, as the AI doesn't need to randomly pick a specific building twice in a row out of 20 possible choices. The FG is required for the Armorer's Guild and the Fantastic Stables, so if it's already built the AI has 2/~20 chance to pick one (unless other factors modify chances - the current AI is a lot smarter regarding this but under normal conditions the chance of each building is the same), while if the FG wasn't semi-mandatory, it would require to both roll a 1/20 choice and a 2/20 choice afterwards, easily pushing up the time when they start producing the best units by 50 or more turns - or even 100+ on lower difficulties.

Jihad hostility has nothing to do with it, only targeting enemy capitals are affected by it.

Effectively, the AI is forced to do a fighter's guild (or another unit unlocker for some races) every time they have 2 active settlers on a continent.
Reply

(March 12th, 2017, 11:46)Seravy Wrote:
Quote:2) It keeps suiciding groups of 1-3 units into strong neutral cities, killing hardly anything

Bug? Can you show me some examples?
The AI is not supposed to attack unless their stack power>=0.75*target stack power.
Note that the calculated stack power might not be a 100% accurate representation of actual chances to win.
It was a bersker, a ghoul, a skeleton or something similar against 9 nomad pikemen. Over and over. I'll see if I still have the save.

Quote:
Quote:What's more, it could take the city easily if it formed a stack. I assume it is difficult to teach it to do this, but I was wondering where exactly the problem lies.

It would do that but it thinks the smaller stacks are enough so it attacks.
Which instruction tells it to form stacks, and how?
Quote:
Quote:Also, wtf with building a fighter's guild on turn 10 after 2 settlers?

This was added for several reasons :
-because people wanted the AI to produce less settlers, and this can interrupt them doing so - the time spent on the fighter's guild was meant to delay that. This is probably still relevant on low difficulty games but on high difficulty the AI will buy the FG with gold so it's not slowing them down anywhere nearly as much.
Aha! I just caught you making the AI pull its punches smile You told me elsewhere you weren't going to do that. But even so, why not have it rush early economic buildings to further develop its economic advantage?
Quote:Effectively, the AI is forced to do a fighter's guild (or another unit unlocker for some races) every time they have 2 active settlers on a continent.
I guess I will need to look at the behaviour rules in more depth before commenting further, but this does seem inefficient.
Reply

Don't have the save, sorry. Already started another test game, I'll be more alert next time I see something strange. It was highly noticeable, he was throwing units away left and right for no reason at all.
Reply



Forum Jump: