[MOD] More Naval AI

Here's an installer for v1.8 beta. (not compatible with previous saves). Not sure when the official release will be but this version is fully playable with no known crashes or gamestopping bugs.

Here are some of the changes (and a big thanks to ChrisAdams3997 for volunteering his help):

  • Fix for crash caused by the AI trying to cast area effects near the map edge
  • Overhaul of AI tech evaluation
  • A few BUG elements (promotion outline, actual building effects, more detailed city mouseover) (ChrisAdams3997)
  • Hawks can only rebase to cities within twice their air range and can only rebase once per turn
  • Fix for AI stacks moving back and forth outside target cities
  • New Barbarian AI (ChrisAdams3997)
  • Passive Spellcaster XP gain now scales with game speed
  • Fix for Ocean grid display
  • Objects no longer give visibility beyond their tile; they are also not affected by spells and should not cost any maintenance
  • AI will actively seek out dungeons and lairs to explore
  • Human players can now be vassals
  • AI will sometimes use slaves to hurry production of wonders
  • Fix for AI accidentally Scorching lands of civs they aren't at war with
  • Power ratings have been adjusted; techs and buildings no longer give any increase in power ratings; most units have been given new power ratings
  • HN units should no longer display info about the owning civilization in the combat log text
  • AI tech values to be displayed in debug mode (CTRL-SHIFT over an owned plot) (ChrisAdams3997)
  • Religions can no longer be spread to Barbarian cities
  • Numerous tweaks and adjustments to unit, city and player AI
 
Hi, I'm new to using this amazing AI mod. I've never seen an AI do the Mines of Galdur rush. Makes me very happy to see.
Anyways, I was wondering if any balance tweaks were planned for this mod or if it's strictly AI.
 
First off, thanks for all your work. I've enjoyed playing the game with this mod, and can't go back to vanilla FfH.

Comments on two of the changes:

  • Hawks can only rebase to cities within twice their air range and can only rebase once per turn

Definitely a step in the right direction. If you could remove the ability to rebase into foreign cities belonging to civs with whom you have open borders, I'd be happy. Question: do the same rules apply for rebasing to a unit (i.e. hunter)?

  • AI will actively seek out dungeons and lairs to explore

I think I understand why you did this (dungeons/lairs were free goodies for the player), but now the pendulum has swung too far in the other direction (free goodies for the AIs). I've played some 100 turns into my first (Immortal difficulty) game and haven't seen a single lizardman (presumably because the AI explorers popped all the ruins). I think it would make more sense to put a guardian on top of lairs and graveyards, so they worked like goblin forts: you can still clear the guardian and explore the fort, but it takes some effort.
 
Eventually will you be putting in civ specific strategies like Illian early Priests of Winter rush etc ? Or religion strats like cultist/stygian stacks etc?

Also, will you be teaching the AI bulbing strategies?

These kinds of things would really bump up the AI.

Otherwise, looking forward to the non-beta 1.8 :)
 
I have to disagree on the "put guardians on top of lairs idea", it is probly the thing i dislike the most about RifE and MoM, everything is clustered with stupid guardians.
 
Anyways, I was wondering if any balance tweaks were planned for this mod or if it's strictly AI.

I try to avoid making gameplay changes, but there are a few tweaks such as the changes to how hawks can rebase

If you could remove the ability to rebase into foreign cities belonging to civs with whom you have open borders, I'd be happy. Question: do the same rules apply for rebasing to a unit (i.e. hunter)?

Hawks should only be able to rebase to their own cities now (forgot to mention it in the beta release notes). Not sure how it works with hunters (I dont think you can 'rebase' to hunters. I think they have to be 'loaded' instead. Also, it looks like I may have also made it so that units can only rebase to cities that have their prerequisite buildings (I kind of set this code aside before I finished working on it so it hasn't been fully tested).

I think I understand why you did this (dungeons/lairs were free goodies for the player), but now the pendulum has swung too far in the other direction (free goodies for the AIs).

I see it as free goodies for both the player and the AI. You can always try adjusting the LairSpawnRate tag in Handicapinfos to make it so that lairs will get a defender sooner. Taking a quick glance at the code, I see that the Raging Barbarians option doesn't affect lair spawn rate. That's something I might consider changing.

Eventually will you be putting in civ specific strategies like Illian early Priests of Winter rush etc ? Or religion strats like cultist/stygian stacks etc?

Civ specific strats are tough. My hope that as the AI becomes more intelligent, som of those strats will naturally come about.

Also, will you be teaching the AI bulbing strategies?

This would be nice but I don't even know what a good strategy is for using Great People to bulb techs. It's not something I do very often myself in a game.


Thanks to everyone for their comments and feedback!
 
I have to disagree on the "put guardians on top of lairs idea", it is probly the thing i dislike the most about RifE and MoM, everything is clustered with stupid guardians.

Check back with me after the AIs pop a mistform near your borders. There's a reason people agree not to pop lairs in MP games. I'm not talking about MoM style guardians, just a T2 unit with the Held promotion that would have to be defeated before you could explore the lair. An alternative would be to hack the python to disallow lair exploration before turn 100 (the standard for MP, I think).

Massive lair popping by the AI isn't just imbalancing because your game can be completely screwed by the AI popping a BigBad near your city, but also because it gives the AIs lots of free goodies (Order founded on turn 25?), and because it gimps skeletons and lizardmen, who can't spawn if their lairs are removed.
 
I see it as free goodies for both the player and the AI. You can always try adjusting the LairSpawnRate tag in Handicapinfos to make it so that lairs will get a defender sooner. Taking a quick glance at the code, I see that the Raging Barbarians option doesn't affect lair spawn rate. That's something I might consider changing.

The problem is, at Immortal difficulty the AIs start with four warriors and two scouts, so they can do a lot more exploring than I can, especially with their 25% bonus against barb units.

I don't think increasing the spawn rate is the answer, because it would push the game in the direction of the MoreMana mod, where the early game was just about survival against the barbs: first 3-4 builds *had* to be warriors, don't even think about improving tiles or building more cities.
 
Very nice work :) and thanks a lot.


I must say that I'm curious about the seek lair tweak. I was already seeing the AI explore those things at a good rate on deity. If they do that even more consistently then the player will not have to worry about Lizardmen and skeletons in the diety early game (fine with me, it will be easier most of the time).
I also expect that in lower difficulties the AI will be crippled by barbarian lair spawns more often.
Of course, I still have to play first so I may be wrong.

Sometimes the human player will be crippled by the barbarian terrible spawns, but the human player can handle that much better and only the early ogre is a real menace (sometimes the mistform), everything else can be handled.

I don't understand why you say that the lairs are free goodies to both the human and the AI. Most of the time you just get below average results. Exploring lairs is part of the role-playing experience and the AI should have little to do to prevent that, imo. What has that to do with difficulty?

Again, they were already exploring lairs at good enough rates. If it's the same it's fine with me, if they explore even more, I'll be happy to be lizard men free and unhappy when they get crippled by that active exploration.


Also, you should at least make the AI bulb religions. Then simply make the philosophical leaders use bulbs from the GP when using guilds or scholarship with big cities (they should be inclined to use this in the late game for sure, and really, the AI is so inclined to use specialists even early on...).
The AI will never be clever enough to use bulbs to do a monk rush or to rush sanitation, sorcery with a great bard, etc, but the philosophical trait should not be entirely wasted.


A few things that I wanted to say for the previous patch:
-the Malakim should not spam light bringers early on. This is one of the reasons that they are one of the civilizations that are more often conquered early in the game. Once they have tier two units Van may do it but not Decius (he is not spiritual).

-I still find mages alone too often, they should always be in a group and never attack directly (although I was checking out this game where the AI was on autoplay and just saw a couple of mages beating 2 treants....:eek:)

- the AI should use summons more consistently and in large numbers so that they can be more competitive in late game wars.

-late in the game the AI can truly use a great number of catapults or cannons, but early on I still don't think they build enough.

- water walking units don't cross the ocean often enough and in a good enough group to do a good attack in water maps.

I leave it at that for now. You can pretty much do whatever you want, of course. I really appreciate and that you and Chris are putting some effort into this.
Cheers
 
I could certainly see placing a held skeleton upon each barrow and a held lizardman on each ruins.

other than that, *perhaps* tweaking spawn rate slightly for difficulty.
 
Few things I noticed in my game today (1.8 beta, Prince):
Sidar built the Catacombs Librarius really early while only having one city. Doesn't seem like a good priority early game. Does appear to be settling wanes, as his city had 2 sages and a bard when I captured it.

When hovering mouse over a city, one of the buildings in the pop-up is displayed as a pink square (misplaced graphics?) It think it's the Catacomb created Mages guild, but I'm not completely certain.

Basium was summoned and same turn completed Pact of the Nilhorn. I'm guessing he was summoned in a city that had the wonder in it already. Don't know if he got the Stooges or not as he's on another continent.

The Hippus have odd unit choices. I saw them with a cultist, even casting Typhoon once, but many turns later they are using Zealots with a few promos. Also had warriors running around and being used as defenders even though there were plenty of archers are horsemen around.
 
Here's a save from my first game with the beta. I wrote my own bit of hackery to add lair guardians to the worldbuilder file :p, so that's the source of all the held hill giants. At turn 123, the AIs have hardly expanded at all (and have lost at least one city to the barbs). I'm not sure if the lack of expansion is due to having toroidal wrap turned on (something I got in the habit of doing with the previous version to get around the edge of map casting bug), or something else.
 

Attachments

my autoexploring scout milked broken sepulchre - next to my city - mercilessly, til my "empire" was conquered.

Damn traitor!
 
-the Malakim should not spam light bringers early on. This is one of the reasons that they are one of the civilizations that are more often conquered early in the game. Once they have tier two units Van may do it but not Decius (he is not spiritual).

This, and similar comments. I'm going to be looking at the AI's code for choosing production, which covers units and buildings, but I'll be focused on type and number of units (relative to their economic capacity to support them, something sorely missing right now). The current code varies only very little from BBAI code designed for a much more constricted choice of Unit AI's and a much more narrow tech tree and often gives poor results. The new units AIs are also added in very haphazardly to the pre-existing code.

A good example I'll point to is that during very early wars when only warriors and scouts are available, the AI will often build scouts as attack units along with warriors, contrary the obvious flaw in such logic to a human player.

What I'm going to try to set up is a more centralized look for the AI at what kind of units it has compared to what it needs for different roles as well as what it's specialized in. I'd also like to tie this into their military research priorities, but that's further down the road. In the above example (or with the LightBringers example) the concept is that comparing scouts to warriors should be compared in terms of what they have to offer compared to what's needed. Since the scout is clearly inferior for combat purposes (and yes, they are building them and assigning them to 'conquest' stacks, not to exploring), it'd never be picked if that's the priority.
 
A minor thought on the lair business, I don't think automatically adding skeletons to barrows, etc, is a great solution, partly because it's a fairly large diversion from the base FfH rules, partly because it dilutes the flavor difference of starting next to a goblin fort versus most other lairs, and also because for the player it's nice to have the option of taking the risk of popping that barrow right next to your newly built capital before it gets the chance to spawn a defender.

Maybe a compromise is code increasing the spawn chance for the lair if it doesn't have a defender on it. This would still give a brief window to explore them before they are defended, but reduce how many the AI could get to before that happens. This would be very easy code to implement.
 
I just paid more attention to this:
[*]Hawks can only rebase to cities within twice their air range and can only rebase once per turn

You guys are aware that units with hawks or just the hawks cannot enter boats, right? This hinders play in maps with a lot of landmasses. Now if I settle in a new continent I can't immediately use hawks to fog bust. Or if I start a war in a different continent and take an enemy city I have to wait until the rebellion ends, get a hunting lodge (with a lot of angry citizens) and then build a hawk - it's just too many turns during a war to be able to finally have enough vision and to see invisible units.
If you can make units with hawks enter boats, that's fine with me but otherwise I have my doubts about this.

A good example I'll point to is that during very early wars when only warriors and scouts are available, the AI will often build scouts as attack units along with warriors, contrary the obvious flaw in such logic to a human player.
Since the scout is clearly inferior for combat purposes (and yes, they are building them and assigning them to 'conquest' stacks, not to exploring), it'd never be picked if that's the priority.

In early wars, a scout for each, I don't know, group of 10 warriors might be okay. The thing is with scouts you can harass workers more effectively and catch wounded units that are trying to retreat because of their higher mobility. This is especially true of civilizations that have the raider trait; sometimes I get distracted and voilà a scout coming from out the fog of war just nails my worker near my border.

Everything considered is much better that they never build scouts (for conquest stacks) than do what they do now.

With the exception of the Svartalfar, Of course.

A minor thought on the lair business, I don't think automatically adding skeletons to barrows, etc, is a great solution, partly because it's a fairly large diversion from the base FfH rules, partly because it dilutes the flavor difference of starting next to a goblin fort versus most other lairs, and also because for the player it's nice to have the option of taking the risk of popping that barrow right next to your newly built capital before it gets the chance to spawn a defender.


I agree. Do not add held units. A goblin fort has defenders so that a barbarian leader can use them to buy units without them being destroyed too early and that's it.

Can you increase the spawn chance for the lair according to the difficulty level (I don't think that at noble a player will want to see a lizard man too early)?

But there's still dungeons that will never get a defender. The thing is, is the AI aware of the risk of exploring the lair like a human? That's my problem with this tweak.

I myself will explore the lairs around my capital early on (if they are too close, but I hesitate sometimes and simply leave a unit on top of it) but I usually wait until I have strong units or at least a good number of (weak) units so that I can explore the remaining lairs.

If the AI insists on exploring a lair close to it's border with just a scout or warrior it will be asking for trouble on lower difficulty levels and will sometimes get crippled by the barbarian spawns. Seriously, lairs are not free goodies, they are a risk and reward kind of thing – and you usually get negative or “meh” results (truth be said, in large maps, one can probably expect a "late" religion early on more often...).
In consequence, you must make the AI explore lairs with a group of units not just a scout or another weak unit.

Really, I think it was fine as it was...

I try to avoid making gameplay changes, but there are a few tweaks such as the changes to how hawks can rebase

But if you want to make the game challenging you must make some changes for balance. Your work made archipelago maps playable but if you are playing seriously you can just crush everything on such maps by abusing tsunami...
 
Can you increase the spawn chance for the lair according to the difficulty level (I don't think that at noble a player will want to see a lizard man too early)?

Yes, that's doable. Just need to add a new tag to the handicaps xml.

I haven't discussed the lair seeking code with Tholal, but I tend to agree that it can take some of the fun out of the game, and even get the AI's into trouble if they are too aggressive with it. I don't think we want to force the player to feel like he/she has to explore all the nearby lairs now!now!now! even though they only have warriors and scouts just to beat the AI to it. But that part of the code is all in Tholal's hands.

In early wars, a scout for each, I don't know, group of 10 warriors might be okay

It'd be smart to keep some units around that can see invisibles certainly too. The AI just needs to be aware of where it's strengths and weaknesses are. If they have the technology to build champions in the melee line, but only basic 'missionary' priest units (e.i. thane of kilimorph for example), they shouldn't fill out their ranks with the weaker unit just because some arbitrary code says they need x amount of priests, and leave them with no budget left for the more effective units they could build (purely hypothetical example by the way). They should just build enough for some medics. Since unlike vanilla BTS the tech tree allows heavy specialization in one direction without having to go far in the others, it's much more susceptible to these kinds of mistakes.
 
Back
Top Bottom