Once more: FFH and the AI

(if elf or dwarf: respective tech)
Education -> Writing
... -> Alchemy
(sometimes a number of small techs: fishing, hunting, masonry, mining) (NEVER BW)
knowledge -> all low tier magic techs
Here things seem to fork; either they go for the gold line (mathematics, currency) or ships (what the hell!) optics and so on, OR sometimes they go into BW. I've yet to see an AI beeline bowyers for instance or tracking.

Alchemy is highly valued due to the following:
FfH Typhoid Mary (Hero)
is worth 300+ (300 +(300 if at war))(/2 if hasn't met anyone)(*2/3 if there's nothing but the capitol in this area) + (if the path length is <= 1, and the population is > 5, and she hasn't been built 0-399 (randomly) + 200 if the capitol is alone in this area)

Alchemy Lab is worth: 100, (+300 if the capitol is alone in this area).

Perhaps the better way to go about this is to describe the basic algorithm for tech evaluation:

If the tech is within its maximum path length (this seems to max out at 3),
Value = 1 + rand(0-1999) + any research progress
  • Then a number of modifiers are added for special abilities. Most of them are in the range of 100-800.
  • Then modifiers are added for the ability to trade new bonuses (resources). Non-water resources are worth 1000 each.
  • Then a modifier is added for each improvement, where each yield change is multiplied by an AI yield weight %, and summed together (*50).
  • Then a modifier is added for each new build. The minimum appears to be 200, 300 if it results in an improvement (unless the player has no workers).
  • Then there's a modifier for each unit that this civilization can build. Sea escorts are worth 50-100, whereas Settlers are worth 1200.
  • Then a modifier is added for each newly available building. Typically, they're worth 100 each; unlike most of the previous categories, there aren't a lot of modifiers here.
  • Then a modifier is added for each project; the minimum is 1000, even if the player can't build it (!)
  • Then at least 100 is added for each process (like changing production to science)
  • Then 200 or 1000 is added per civic.
  • Then, if the path is less than or equal to 2, there's a modifier for unfounded religions (up to 1000), and a modifier for any free great people (assuming it's not taken) of rand(200-3399) +200 if the capitol is alone in this area. And there's a positive modifier for a free tech rand(200-3399) +200 if the capitol is alone in this area.
  • Then, the tech's AI weight is added (from the CIV4TechInfos.xml, field <iAIWeight>).
  • Then (if non-human), any flavors of the leader (from their XML file) are multiplied by 20 times the flavor weight of that tech (from their XML file).
  • Then, if this is a repeatable tech, the current sum of the value is divided by 10.
  • Then, if this is a free tech, the value is increased by the number of turns it would have taken to research * 100.
  • Then, if this isn't a free tech, the value (if positive) is multiplied by 1000/(the turns left to research it + 5)
  • And the minimum value for a tech is always 1.

I suspect that the basic reason that flavors don't appear to be having an effect is because they're too small, and they're only used when they match the leader. If you pump them up to the range of at least 100 (when multiplied together), you should start to see some effect.
 
:wow: This is incredibly valuable information. It's beyond me to make use of it, but its usefulness is still very apparent.

You could print it out and rub it over yourself.
But then you'd have to admit to being a crazy person.
-Qes
 
Then modifiers are added for the ability to trade new bonuses (resources). Non-water resources are worth 1000 each.


Is this for any potential resources? Or for resources currently within the cultural boudries of the Civ?
 
And this, ladies and gentlemen, is why xanaqui is the new ffh ai guy, and I'm just the dude who fiddles with the knobs and goes "d'uh!". (btw, where's the "any" key?)

I've been seriously dreading to read the sdk and you seem to read it like a Stephen King novel. My sincerest thanks!

Some questions! (of course)

Are there XML modifiers for the bonuses that buildings and units and projects give?

Can all i<something> variables be negative too? (I would assume so since they're just integers, but assuming starts with ass...)

I think this is both bad and good news for us. It's good news because Firaxis did a hell of a job letting the AI consider about any-****ing-thing we could wish for (short of direct counters of units encountered so far; definitely on my AI todo list, as in: omg the enemy is building lots of melee, let's beeline to iron working to counter them!), and it's bad news because just turning some knobs will apparently not easily result in better AI behaviour.

Thanks again for your work, xanaqui, especially seeing that in theory you shouldn't even have the time to be doing anything yet ;)
 
If you two plan on messing around with the AI, I suggest that you first enable cheat mode so that you could see exactly what the AI by pressing Ctrl-z. You could also just let the AI play only by pressing ~ and typing into the console that appears "game.aiplay x" where x is the number of turns you want the AI to play for. Just don't set x to be 500 or something like that because once you start, you can't stop it without terminating the game.
Spoiler :
To enable cheat mode if you do not already know, go into the config file and on the line that says "CheatCode" make sure the entire line reads "CheatCode = chipotle"

:confused: All that happens to me when I input "game.aiplay x" is that my Civ loses all its units and cities and I take control of Abashi the Black Dragon somewhere in the polar icecaps.
 
I've been seriously dreading to read the sdk and you seem to read it like a Stephen King novel. My sincerest thanks!
You're welcome; I just wish I had the time to write the whole thing out.
Some questions! (of course)

Are there XML modifiers for the bonuses that buildings and units and projects give?
Buildings/projects:
If the building is of a special building type (this is from XML, I believe), it's worth less (100 if the capitol is alone in its area; 25 if it's not). Otherwise, it's worth (400 if the capitol is alone in its area; 100 if it's not), unless it's a wonder or project (which I describe above, other than the capitol alone in its area bonus, which is 400 for a wonder, 100 for a project). In other words, the short answer is "no".

Spoiler :

Code:
								for (iJ = 0; iJ < GC.getNumBuildingClassInfos(); iJ++)
								{
									eLoopBuilding = ((BuildingTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationBuildings(iJ)));

									if (eLoopBuilding != NO_BUILDING)
									{
										if (isTechRequiredForBuilding(((TechTypes)iI), eLoopBuilding))
										{
											if (GC.getBuildingInfo(eLoopBuilding).getSpecialBuildingType() != NO_BUILDING)
											{
												iValue += ((bCapitalAlone) ? 100 : 25);
											}
											else
											{
												iValue += ((bCapitalAlone) ? 400 : 100);
											}

											if (GC.getBuildingInfo(eLoopBuilding).getPrereqAndTech() == iI)
											{
												if (iPathLength <= 1)
												{
													if (getTotalPopulation() > 5)
													{
														if (isWorldWonderClass((BuildingClassTypes)iJ))
														{
															if (!(GC.getGameINLINE().isBuildingClassMaxedOut((BuildingClassTypes)iJ)))
															{
																iValue += ((bAsync) ? GC.getASyncRand().get(800, "AI Research Wonder Building ASYNC") : GC.getGameINLINE().getSorenRandNum(800, "AI Research Wonder Building"));

																if (bCapitalAlone)
																{
																	iValue += 400;
																}
															}
														}
													}
												}
											}
										}
									}
								}

								for (iJ = 0; iJ < GC.getNumProjectInfos(); iJ++)
								{
									if (GC.getProjectInfo((ProjectTypes)iJ).getTechPrereq() == iI)
									{
										iValue += 1000;

										if (iPathLength <= 1)
										{
											if (getTotalPopulation() > 5)
											{
												if (isWorldProject((ProjectTypes)iJ))
												{
													if (!(GC.getGameINLINE().isProjectMaxedOut((ProjectTypes)iJ)))
													{
														iValue += ((bAsync) ? GC.getASyncRand().get(200, "AI Research Wonder Project ASYNC") : GC.getGameINLINE().getSorenRandNum(200, "AI Research Wonder Project"));

														if (bCapitalAlone)
														{
															iValue += 100;
														}
													}
												}
											}
										}
									}
								}
Units:
The primary factors are the default AI for the unit, if there is a war plan, if the AI has met another civilization, if the capitol is alone, and if it is a world unit.
There is also a bonus for units where the player does not have, and is not presently training units that presently have the AI type of the new unit's default AI type and another bonus on top of that for exploration units.
In other words, the short answer is "no"; it looks like (for the purposes of choosing tech) a Strength 1 unit with an AI that the computer really likes should be more valuable than a Strength 999 unit with an AI that the computer dosen't like very much.
Spoiler :
Code:
											iValue += 200;

											if (GC.getUnitInfo(eLoopUnit).getPrereqAndTech() == iI)
											{
												iMilitaryValue = 0;

												switch (GC.getUnitInfo(eLoopUnit).getDefaultUnitAIType())
												{
												case UNITAI_UNKNOWN:
												case UNITAI_ANIMAL:
													break;

												case UNITAI_SETTLE:
													iValue += 1200;
													break;

												case UNITAI_WORKER:
													iValue += 800;
													break;

												case UNITAI_SPELL://shouldn't matter - spells can never be built
												case UNITAI_ATTACK:
													iMilitaryValue += ((bWarPlan) ? 600 : 300);
													iValue += 100;
													break;
/*FfH: Added by Chalid AIMage 06/10/2006*/
                                                case UNITAI_MAGE_OFFENSIVE:
													iMilitaryValue += 500;
													iValue += 400;
													break;

                                                case UNITAI_MAGE_MISC:
													iMilitaryValue += 250;
													iValue += 400;
													break;

                                                case UNITAI_MAGE_BUFF:
													iMilitaryValue += 450;
													iValue += 200;
													break;
/*FfH: End Add*/
												case UNITAI_ATTACK_CITY:
													iMilitaryValue += ((bWarPlan) ? 800 : 400);
													iValue += 100;
													break;

												case UNITAI_COLLATERAL:
													iMilitaryValue += ((bWarPlan) ? 200 : 100);
													break;

												case UNITAI_PILLAGE:
													iMilitaryValue += ((bWarPlan) ? 200 : 100);
													break;

												case UNITAI_RESERVE:
													iMilitaryValue += ((bWarPlan) ? 200 : 100);
													break;

												case UNITAI_COUNTER:
													iMilitaryValue += ((bWarPlan) ? 600 : 300);
													break;

												case UNITAI_CITY_DEFENSE:
													iMilitaryValue += ((bWarPlan) ? 800 : 400);
													iMilitaryValue += ((!bCapitalAlone) ? 400 : 200);
													iValue += ((iHasMetCount > 0) ? 800 : 200);
													break;

												case UNITAI_CITY_COUNTER:
													iMilitaryValue += ((bWarPlan) ? 800 : 400);
													break;

												case UNITAI_CITY_SPECIAL:
													iMilitaryValue += ((bWarPlan) ? 800 : 400);
													break;

												case UNITAI_EXPLORE:
													iValue += ((bCapitalAlone) ? 100 : 200);
													break;

												case UNITAI_MISSIONARY:
													iValue += ((getStateReligion() != NO_RELIGION) ? 600 : 300);
													break;

												case UNITAI_PROPHET:
												case UNITAI_ARTIST:
												case UNITAI_SCIENTIST:
												case UNITAI_MERCHANT:
												case UNITAI_ENGINEER:
													break;

												case UNITAI_SPY:
													iMilitaryValue += ((bWarPlan) ? 100 : 50);
													break;

												case UNITAI_ICBM:
													iMilitaryValue += ((bWarPlan) ? 100 : 50);
													break;

												case UNITAI_WORKER_SEA:
													if (iCoastalCities > 0)
													{
														iValue += 400;
													}
													break;

												case UNITAI_ATTACK_SEA:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += ((bWarPlan) ? 200 : 100);
														iMilitaryValue += 100;
													}
													break;

												case UNITAI_RESERVE_SEA:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += ((bWarPlan) ? 100 : 50);
													}
													break;

												case UNITAI_ESCORT_SEA:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += ((bWarPlan) ? 100 : 50);
													}
													break;

												case UNITAI_EXPLORE_SEA:
													if (iCoastalCities > 0)
													{
														iValue += ((bCapitalAlone) ? 1800 : 600);
													}
													break;

												case UNITAI_ASSAULT_SEA:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += ((bWarPlan || bCapitalAlone) ? 400 : 200);
													}
													break;

												case UNITAI_SETTLER_SEA:
													if (iCoastalCities > 0)
													{
														iValue += ((bWarPlan || bCapitalAlone) ? 200 : 100);
													}
													break;

												case UNITAI_MISSIONARY_SEA:
													if (iCoastalCities > 0)
													{
														iValue += 100;
													}
													break;

												case UNITAI_SPY_SEA:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += 100;
													}
													break;

												case UNITAI_CARRIER_SEA:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += ((bWarPlan) ? 100 : 50);
													}
													break;

												case UNITAI_ATTACK_AIR:
													iMilitaryValue += ((bWarPlan) ? 200 : 100);
													break;

												case UNITAI_DEFENSE_AIR:
													iMilitaryValue += ((bWarPlan) ? 600 : 400);
													break;

												case UNITAI_CARRIER_AIR:
													if (iCoastalCities > 0)
													{
														iMilitaryValue += ((bWarPlan) ? 100 : 50);
													}
													break;

												default:
													FAssert(false);
													break;
												}

												if (iHasMetCount == 0)
												{
													iMilitaryValue /= 2;
												}

												if (bCapitalAlone)
												{
													iMilitaryValue *= 2;
													iMilitaryValue /= 3;
												}

												iValue += iMilitaryValue;

												if (AI_totalUnitAIs((UnitAITypes)(GC.getUnitInfo(eLoopUnit).getDefaultUnitAIType())) == 0)
												{
													iValue += 200;

													if (GC.getUnitInfo(eLoopUnit).getDefaultUnitAIType() == UNITAI_EXPLORE)
													{
														if (pCapitalCity != NULL)
														{
															iValue += (AI_neededExplorers(pCapitalCity->area()) * 400);
														}
													}

													if (GC.getUnitInfo(eLoopUnit).getDefaultUnitAIType() == UNITAI_EXPLORE_SEA)
													{
														iValue += 400;
														iValue += ((GC.getGameINLINE().countCivTeamsAlive() - iHasMetCount) * 200);
													}
												}

												if (iPathLength <= 1)
												{
													if (getTotalPopulation() > 5)
													{
														if (isWorldUnitClass((UnitClassTypes)iJ))
														{
															if (!(GC.getGameINLINE().isUnitClassMaxedOut((UnitClassTypes)iJ)))
															{
																iValue += ((bAsync) ? GC.getASyncRand().get(400, "AI Research Wonder Unit ASYNC") : GC.getGameINLINE().getSorenRandNum(400, "AI Research Wonder Unit"));

																if (bCapitalAlone)
																{
																	iValue += 200;
																}
															}
														}
													}
												}
											}
										}
									}
								}

Can all i<something> variables be negative too? (I would assume so since they're just integers, but assuming starts with ass...)
Yes (bascially, if it starts with i, you can use negatives). By the way, I'd focus on manipulating iAIWeight for techs; it's simply added in, so the impact should be readily apparent. Flavor would be more useful for making different leaders focus on different things. Just note that you'll probably need numbers in the 3 digits to have any (noticable) impact (why? because we're always adding a random number between 0-1999), and 4+ digits to have a large impact.

I think this is both bad and good news for us. It's good news because Firaxis did a hell of a job letting the AI consider about any-****ing-thing we could wish for (short of direct counters of units encountered so far; definitely on my AI todo list, as in: omg the enemy is building lots of melee, let's beeline to iron working to counter them!), and it's bad news because just turning some knobs will apparently not easily result in better AI behaviour.

Thanks again for your work, xanaqui, especially seeing that in theory you shouldn't even have the time to be doing anything yet ;)
You're welcome. Reading code takes less time than writing code :-)
 
This function explains a lot.

Why won't the AI burrow down a tech path?
1) Because it never looks more than 3 ahead in the tree.
2) Because its valuation of tech heavily weights the turns to obtain the tech.
3) Because if will often value obtainable items in an early tech about the same as those of a later tech (for example, there is no difference between a Maceman and an Axeman in its valuation)

Why does the AI research tech for units that it can't use?
1) Because its valuation of units does not look at any limit other than the civilization and world unit limits. It does not check resources, civic, religion, or anything else. So a Shield Wall will give value to a tech, even though that player neither has nor expects Mithril.

Why does the AI love Necromacy, etc?
1) Both the number of builds and the number of places a build can be used increases the valuation. So if the computer has 5 mana nodes, and a tech gives 4 builds to use on that mana node, it seems part of the valuation would be valued (4*(5+3)/2)=16 times (instead of the (1*(5+3)/2=4 times it would normally be valuated). This base value is very high for a bonus because CvPlayerAI::AI_bonusVal has been modified to weight mana very heavily (presumably so that the AI will improve said tiles correctly).
 
As a side note, I note that this function is doing a lot of linear searches. There really is no excuse for spending the time for a linear search (instead of O(logN) search) when then number of elements is significant, and the type of search is common. This is particularly true for a mod like Fall From Heaven II, where many of the sets are an order of power larger than they are in vanilla Civ.

I think the summary is that this is something I'll want to attack early on for two reasons:
1) It should make the game faster, particularly if applied everywhere. If we're lucky, the speedup will be perceptible.
2) It should give us more computational time to spend with more complex AI (such as actually looking at resource requirements, or verifying that a unit is usable, or looking at the relative value of units, or evaluating a building, or understanding that each mana node can only be improved by one mana-type improvement).

The only costs should be a relatively small memory overhead.
 
:confused: All that happens to me when I input "game.aiplay x" is that my Civ loses all its units and cities and I take control of Abashi the Black Dragon somewhere in the polar icecaps.

That's what supposed to happen. Put Abashi to sleep and watch the AI play. What I tend to do is start a game on Balanced, duel size, one additional AI (totalling two), aggressive AI, no barbs, and then I hit launch. Once in the game, I do ctrl-z, go to the console and let the ai play for about 50 turns. While this is happening, I just look at the scoreboard and keep track of what techs the AI researches. Sometimes I also use alt-z to take the place of one AI player (use alt-shift-z to go in the opposite direction); I mostly do this to declare war (once it's declared, they'll fight it out) to see how this affects choice of techs. So far I haven't seen it affecting the choice very much.

With the wonderful work xanaqui has done I'll continue to fiddle with the knobs tonight and see if I can't make the AI less handicapped. As I just told Offenbarungsjoe on IRC, there's no way any human player, no matter how god-like his FFH playing, could win against a normally skilled player if the godlike player HAD to research Alchemy and the four low tier magic techs before going for archery or bronze working. There's just no way. So this is such a major handicap that we need to fix this before anything else.

And we will, and you guys will have to play with the difficulty set like at least two levels lower than before, and we will *cackle* demoniacally.
 
Alchemy is highly valued due to the following:
FfH Typhoid Mary (Hero)
is worth 300+ (300 +(300 if at war))(/2 if hasn't met anyone)(*2/3 if there's nothing but the capitol in this area) + (if the path length is <= 1, and the population is > 5, and she hasn't been built 0-399 (randomly) + 200 if the capitol is alone in this area)

Alchemy Lab is worth: 100, (+300 if the capitol is alone in this area).

Perhaps the better way to go about this is to describe the basic algorithm for tech evaluation:

If the tech is within its maximum path length (this seems to max out at 3),
Value = 1 + rand(0-1999) + any research progress
  • Then a number of modifiers are added for special abilities. Most of them are in the range of 100-800.
  • Then modifiers are added for the ability to trade new bonuses (resources). Non-water resources are worth 1000 each.
  • Then a modifier is added for each improvement, where each yield change is multiplied by an AI yield weight %, and summed together (*50).
  • Then a modifier is added for each new build. The minimum appears to be 200, 300 if it results in an improvement (unless the player has no workers).
  • Then there's a modifier for each unit that this civilization can build. Sea escorts are worth 50-100, whereas Settlers are worth 1200.
  • Then a modifier is added for each newly available building. Typically, they're worth 100 each; unlike most of the previous categories, there aren't a lot of modifiers here.
  • Then a modifier is added for each project; the minimum is 1000, even if the player can't build it (!)
  • Then at least 100 is added for each process (like changing production to science)
  • Then 200 or 1000 is added per civic.
  • Then, if the path is less than or equal to 2, there's a modifier for unfounded religions (up to 1000), and a modifier for any free great people (assuming it's not taken) of rand(200-3399) +200 if the capitol is alone in this area. And there's a positive modifier for a free tech rand(200-3399) +200 if the capitol is alone in this area.
  • Then, the tech's AI weight is added (from the CIV4TechInfos.xml, field <iAIWeight>).
  • Then (if non-human), any flavors of the leader (from their XML file) are multiplied by 20 times the flavor weight of that tech (from their XML file).
  • Then, if this is a repeatable tech, the current sum of the value is divided by 10.
  • Then, if this is a free tech, the value is increased by the number of turns it would have taken to research * 100.
  • Then, if this isn't a free tech, the value (if positive) is multiplied by 1000/(the turns left to research it + 5)
  • And the minimum value for a tech is always 1.

I suspect that the basic reason that flavors don't appear to be having an effect is because they're too small, and they're only used when they match the leader. If you pump them up to the range of at least 100 (when multiplied together), you should start to see some effect.

This is really amazing work and definitly appreciated. Just let me know you recommendations and we will start checkign them in. Especially any adjustments on flavors.

You make an excellent point about all of the improvements that become available with the 4 magic school techs and why the AI loves them. I just added a check to the AI_bestTech function to see if the build is possible with that civs workers. If it isn't it shouldn't count it. That should keep the magic improvements from counting (since they aren't available to workers) as well as other civs counting dwarven mines, elven farms, etc.
 
With the wonderful work xanaqui has done I'll continue to fiddle with the knobs tonight and see if I can't make the AI less handicapped.

Wouldn't it be better to wait for Fire? Who knows some stuff might be added or changed that change the value of certain techs and tech branches.
 
This base value is very high for a bonus because CvPlayerAI::AI_bonusVal has been modified to weight mana very heavily (presumably so that the AI will improve said tiles correctly).
Can mana node spaces be improved with non node improvements by the AI? They cannot by the player.

I think part of the reason the AI values nodes highly is to make gaining spells and ToM victory harder on players. It may be overdone a bit at the moment, though.
 
Maniac: we're not really doing any PRODUCTIVE work yet, as in, we're not coming up with sets of XML changes that we think should be in the mod etc. What we're doing now is what I like to think of as the experimentation period, and really, we should be xanaqui. He's doing the hard work of making sense of the C++ code. C++ is to me like Dutch, spelled with cyrillic letters. Sure I can understand it, with a number of reference books, but it's not really fun to try ;) (well, to be honest C++ itself isn't THAT hard to understand; I'd just need to read my way into the SDK a little more)


The following is completely OT, so I spoilered it ;)
Spoiler :
And Maniac, one of my oldest friends from the internet is from Gent ;) I've been to your town a number of times... I think at the very least five times. I spent one New Year's Eve stumbling drunk through the streets of Gent; so drunk that I didn't even notice it had started snowing halfway through my stumbling and I got to be amazed at where all that snow came from the next morning (and my friend told me that we'd been walking through it for a while). Nice town!


[edit]

Can mana node spaces be improved with non node improvements by the AI? They cannot by the player.

I think part of the reason the AI values nodes highly is to make gaining spells and ToM victory harder on players. It may be overdone a bit at the moment, though.

Nikis: I'm not following you. Are you saying that the INTENTION behind weighing the AI's choices toward the magic techs was to deny players a ToM victory? I don't see how it denies them spells; it's not like the AI expands in such a way as to capture as many mana nodes as possible, is it? If that is the intention, then I would say it's more than overdone; currently it disables the AI. This is like playing Tennis against a one-armed blind-folded old guy in a wheelchair. The very reason why we need to give the AI so many cheats to make them competitive (which is to say, play at such a high difficulty to be challenged) is because their tech choices essentially handicap them to the point of an unfair contest being unwinnable for them. I will say it again: I challenge EVERY FFH player out there to play a 1v1 against me where the other player has to follow the AI's techpath (as in, only take suggested techs) and I'm free to tech as I want to. I will win a 100 out of a 100 games, and I'm really a mediocre player.

The next step in my experimenting will be how to persuade the AI NOT to go for anything magic related at all; as long as the AI cannot use mages (as in, cannot actually cast spells), there is no point in researching those techs for them.

There was a certain feeling that I've intuitively had while playing against the AI, and our current state of research explains it beautifully: I had the feeling of there being a certain distinctive "bump" in the curve of difficulty-over-time in games vs the AI, pretty early in the game. If you managed to get over this bump, you had a sure win. All the higher difficulty settings did nothing but increase this bump. Sure, on deity it was practically impossible to get over it, and in some games the sheer speed of the AI's expanding meant that the bump took not so much the form of an early war being lost as of the AI getting a GENERAL tech advantage on you that you would never be able to catch up with, but the bump was still there: you'd either lose the game early, and decisively, or not at all. And this makes sense now: if they really choose their techs so badly, there simply is a time at which you have an EFFECTIVE tech advantage over them that they will not catch up with.

I still think there are more bad decisions the AI makes. I've started a list on things I want to address, eventually; thinks like the AI expanding on a single-tile island with not a single resource around it (actually half of its fat cross being taken up by unworkable ICE) and so on, but the more I think about it, the more I see that all of these problems pale in comparison to the AI being simply unable to tech sensibly right now.

Surely this problem is twofold: one: the AI can't do magic, and as such an entire fat branch of the tech tree is wasted research for them, and two: the weighing algorithms have certain kinks (introduced, surely, by FFH); for instance, giving Typhoid Mary that much weight doesn't make sense (one typhoid mary vs 10 axemen? Yeah...) etc.

I feel that ONE must be addressed first.
 
Nikis: I'm not following you. Are you saying that the INTENTION behind weighing the AI's choices toward the magic techs was to deny players a ToM victory?
I won't say for sure, but I was assuming that the value that they placed on researching mana nodes was connected to the value they had in TRADING them, where you'll notice that it is very hard to get them to part with one. So you can get one or two mana types via trade, but much more than that would be unlikely.

(I certainly don't think the AI will ever WIN via a tower of Mastery ;))

Basically, I don&#8217;t think mana nodes need high weight in order for them to be improved correctly, since there is only one way to improve them now (disregarding for the moment separate mana types.

The next step in my experimenting will be how to persuade the AI NOT to go for anything magic related at all; as long as the AI cannot use mages (as in, cannot actually cast spells), there is no point in researching those techs for them.
The AI can use SOME spells; I'd direct them down the summoning path, for example, rather than the mage one at the moment. After, of course, getting macemen and another T3 unit.
(Bit of good news, I had a unit killed by a meteor in last nights version of fire!)
 
Surely this problem is twofold: one: the AI can't do magic, and as such an entire fat branch of the tech tree is wasted research for them, and two: the weighing algorithms have certain kinks (introduced, surely, by FFH); for instance, giving Typhoid Mary that much weight doesn't make sense (one typhoid mary vs 10 axemen? Yeah...) etc.

The only spells the AI cant use are targeted spells and there is only a handful of those. It also isnt very effective with spells that it has to move to use (like terrain upgrades). Outside of that it knows how to use the large portion of the 125 spells in the game so cutting off its access to magic would be tragic.
 
Really? I mean, I was completely convinced that the AI cannot use magic at all! I've never seen them cast a single spell! Can you give some examples of spells they do use?

I think I'm going to go and create a game now with an AI with all mana types and lots of high level wizards and see if they use anything at all.
 
Really? I mean, I was completely convinced that the AI cannot use magic at all! I've never seen them cast a single spell! Can you give some examples of spells they do use?

I think I'm going to go and create a game now with an AI with all mana types and lots of high level wizards and see if they use anything at all.

Just about everything. In fact the AI got so good at it it found an exploit with great commanders that allowed it to produce hundreds of them by using spells in the right order and I had to patch to fix the hole.

We also removed the Sumon Tiger spell in "Fire" because the AI overused it and would just spam endless streams of tigers at opponents.

You have never seen units running around with courage, valor, loyalty or enchanted blade promotions on them?
 
Could the AI weight Mana improvement a LOT less and then increase the weight of acquiring Arcane Lore and Ethereal Call? Seems to me this would encourage the AI to research 2 of the schools of magic in order to research these later techs? Probably would want to move Eternal Flame and try to balance all 4 of the schools of magic so that the computer is equally likely to research any one of them (as opposed to being greatly in favor of researching Elementalism first)..

I dunno, just spouting stuff - keep up the good work.
 
Back
Top Bottom