A Better AI.

The governor in the new release (Dec 02) is choosing tiles that build a settler more slowly for me, apparently because of commerce.

I'd like to post a screenshot but that would be difficult because I am playing on a different machine (that's connected to the LCD TV). Anyway, here is the setup:

I'm playing Prince as Elizabeth. I have a city on the coast with 3 coast tiles, three forested grassland, one mined gold desert hills, and one oasis in addition to my city. The fastest build is city + oasis + forest (30 turns at epic), but it wants to use the gold (38 turns). The difference in commerce is huge - 5 vs 13, which at 985BC is a big deal. But I'm wondering why it doesn't always try to build settlers and workers as fast as possible.

Hmm. Can you do me a favor and post a save? I am not sure what the right behavior _should_ be in this case, but a save would help. Just save the game and give it a name like "gov works gold for settler" or something like that and post it here.

-Iustus
 
Hey Iustus, I Loaded BetterAI Using "Load a mod" but the ===Better AI=== Doesn't show up on the score list on the bottom right of the screen when I hold down ALT, does it mean the Better AI DLL file isn't installed in the game?

Do I have to use your method of installation to properly Use Better AI mod?

Yes, that means it is not installed correctly. You want a folder, called BetterAI (or whatever), inside your mods folder, the key here is you need an "assets" folder inside that, with the DLL inside that. I just realized that we could distribute it in an easier way to set up, the next build will already have the assets folder, so you dont have to make it.

A picture is worth a thousand words:
modinstall.jpg


Hopefully this clears it up for you.

-Iustus
 
Thanks! :) It's OK now - I run a noble game to test things
(no tech trading, no tribal village)

I will play DEBUG mode, but will try to play like normal, and see how AI behaves

UHH, I will face on my continent: Shaka, Monty, Stalin, Alex, Bismarck :eek: - I am Mao
 
would put a stop to finding Napoleon with tanks 10 turns after he didn't have cavalry.

While I love the idea of 'prototyping', cavalry doesn't upgrade to tanks. It goes to gunships (armored cav). Tanks when they first show up historically are more like the slower heavy armored knights of antiquity than the more modern, mounted-infantry version of cavalry. Therefore, I would not have a problem with Nappy getting tanks when he has no cavalry. What really ended the horse's practical usefulness on a battlefield were trucks (later APCs and helos) and machine guns, not armor, which had in some sense been around for centuries.

On the comment side, I like being humbled and I like not having to redo the AIs terrain as much once its back in my hands.. ;)
Strong work all around.
 
Something about being able to bypass entire phases of military units doesn't seem quite right to me. I'd prefer it, I think, if for example:

1) You have to acquire Guilds before you can research Military Tradition, and you have to acquire Rifling before you can research Assembly Line, and so forth (these are the most obvious gaps to me)

2) You have to have built a Knight x number of turns (where x is ... 10 or 20?) before you can build a Cavalry (or must have had Military Tradition for that number of turns in), and you have to have built a Rifleman x number of turns before you can build an Infantry

In other words, in general you have to make a perfunctory stop at each successive evolution in military units. I'm not saying you need to build an axe, a spear, and a sword to build a mace, but perhaps before you can build a unit you need to build one of the units that can upgrade to it ... or wait a number of turns after acquiring the technology. So you would have to build a spear before a pike, or wait a while if you didn't.

This wouldn't inconvenience the human player as much, I think, as the AI, and it has an aura of fairness to it because the AI gets such huge discounts on its upgrades. Requiring a little more thorough path through the tech tree, for military units at least, would put a stop to finding Napoleon with tanks 10 turns after he didn't have cavalry.

I allmost never research Rifling by myself :crazyeye: And some other examples as well. I dont have any problem with it, that is one of the best things in the game, you dont need to research half of the tech tree and still can win :)
 
I've just downloaded the newest build and played a game with at Prince level with a random leader (getting Cyprus). I use standard map, standard speed to test. My impression:

- The AIs counterattack much better than before.
- They built wonders like no tomorrow, but curiously can maintain a decent army AND research tech faster than me. I must admit that the AI's research is really fast. With Ramses getting all wonders and tech lead, I was forced to declare war on him to stop him from getting too far ahead, even I love to be a builder.
- I didn't do anything about the governor, but it constantly assigned priest specialists to my cities for some reason, as if the governor has given a high priority to this type of specialist. This was particularly bad after I took the Pyramid from Ramses and switched to representation. I had to regularly check the city screen and switch them to other specialists that I prefer. That's a bit too much micromanagement to my liking.
- For some reasons which I don't understand, the lands of Montsy, Napolean and Brennus were basically like jigsaw puzzles, sort of discontinuous and mingling together. And what surprised me more is they didn't war with each other even Montsy and the other two shared different religions and their borders were so close. I think the AIs should be programmed so keeping a continuous landmass is of high priority.

Other than that it's a pretty good improvement. Thanks for the nice job!
 
Here is a diary (later it will be more condensed)

Test of 12-02
Debug

Noble, Continents, epic speed, no tech trade, no tribal villages

on my continent: Shaka, Monty, Stalin, Alex, Bismarck – I am Mao
on the other: Caesar, Izabella, Brennus, Toku

BC 3970
all AI start with warrior
Couldn’t there be any other choice?

BC 3640
Isabella founds Buddhism

BC 3520
Brennus founds Hinduism

Of the AIs, Rome is the quickest to start worker – at size 2

BC 3250

Brennus starts Settler at size 2
But later changes to work boat! And lets city grow in size… :goodjob:

The very first thing AI workers do is MINE, not pastures

AI begins settler at size 4-7

BC 1990

First AI city – by Brennus

BC 1840

Alex founds a city near Monty and the city starts Monument :goodjob:

BC 1600

Isabella founds Judaism (her 2nd religion!) – Will she go for culture?

BC 1400

Monty begins the first AI wonder – Temple of Artemis

*

I also have 2 cities now, as most of the AI civs.
AI city placement was all fine, at spots I myself would have chosen
(not that it necessarily means any superb greatness - but stilll I liked that)

I will build up a decent army to face these warlike guys :)
 
- I didn't do anything about the governor, but it constantly assigned priest specialists to my cities for some reason, as if the governor has given a high priority to this type of specialist. This was particularly bad after I took the Pyramid from Ramses and switched to representation. I had to regularly check the city screen and switch them to other specialists that I prefer. That's a bit too much micromanagement to my liking.

I suspect perhaps you had Ankgor Wat, or were building a +100% building (such as a wonder with stone/marble, or temples if you were spiritual, etc).

This is something that the 1.61-2.08 governor does, which I inherited and did not remove.

Lets say a tile is 2 food, 1 hammer. And another tile is 2 food, 4 commerce. Now, normally, the 4 commerce tile will be picked. However, if you are building a +100% boosted item, then that 1 hammer really counts as 2 hammers. And the governor sees it that way, so it rates a 2 food, 2 hammer tile as better than a 2 food 4 commerce tile.

Now the same thing is true about specialists. While that 3 research scientist may rate better than a 1 hammer priest normally, when you are building a boosted item, that priest becomes 2 hammers, and it blows away the other choices (except engineers who are now 4 hammers).

This whole feature is something I have wrestled with, I know that Blake doesnt like it. I am tempted to just rip it out, or perhaps max the boost to 50% or 25%, rather than using the total bonus you have in the city.

It is really possible to see it making sense either way, but it is probably more intuitive to the player for it to ignore any food/production/commerce multipliers.

It is also possible that production is just valued slightly too high, and so it is drowning out the other choices. When building an unboosted item I see the preference as engineer->scientist->priest->merchant->artist, but perhaps that is not how it went in your game. If you have a save file, and you point me at a specific city and specifically which specialists it should be running, I can take a look.

But the very first thing you should do, is try changing what item you are building there, build a non-boosted unit, like a missionary (or just about any unit if the heroic epic is not built there), see if the specialists change.

-Iustus
 
Hmm. Can you do me a favor and post a save? I am not sure what the right behavior _should_ be in this case, but a save would help. Just save the game and give it a name like "gov works gold for settler" or something like that and post it here.

-Iustus
Actually I am not sure whether the BetterAI was installed and on at that time. :(

I believe strongly that the behavior of the governor, particularly in the BC years, should be to max out production on a worker or settler. Normally I don't care what other bennies there are while I have only one size 8 city, one size 5, and one that dear God I want to get Angkor Wat built in.
 
Well in my test of 12-02 now I got to a point where I do not really understand the AI move:


See pic, and also the save file before Spain settles Toledo, her 5th city

Now, is that any good, to settle so far from home and so close to Japan's capital?
Also, no real good spot as far as I can see (at this tech advancement)
Isn't it too speedy expansion?
 

Attachments

BC 3970
all AI start with warrior
Couldn’t there be any other choice?
There is another option.
I could make the AI's at random attack VERY early in the game, like walk in with their starting warrior and take a humans undefended capital. This is what can happen in multiplayer games and in MP games players usually start with a warrior to prevent this, and that's pretty much why AI's start with a warrior.
So if the AI's are also made to go for "undefended capital ganks" this would keep the human honest and force them to start with a warrior too.

So pretty much there are two options:
1) The AI always builds warriors while the human gets to build something else.
2) EVERYONE builds warriors or risks losing very early.
#3 - The AI doesn't build warrior first, is not an option for as long as human are jerks. And humans are always jerks.
 
#3 - The AI doesn't build warrior first, is not an option for as long as human are jerks. And humans are always jerks.


Heh, good point.. :crazyeye:
 
Well in my test of 12-02 now I got to a point where I do not really understand the AI move:


See pic, and also the save file before Spain settles Toledo, her 5th city

Now, is that any good, to settle so far from home and so close to Japan's capital?
Also, no real good spot as far as I can see (at this tech advancement)
Isn't it too speedy expansion?

From that pic, it looks like spain is trying to steal iron from the 3rd ring of Kyoto. AIs do not pay as much maint cost as humans, so, assuming that spain will win culturally, which may be the case, spain usually outdoes japan in culture, its not the most boneheaded move possible :)

Part of the game is that the AIs are jerks about trying to steal resources, and the thinking right now is that we should not change that.

-Iustus
 
I believe Spain did not have Iron Working yet...

EDIT:

It is copper that Toledo is trying to steal - OK, that CAN be, as it is with Bronze Working... :)
 
Great build. Very entertaining to watch. I set up an 18 player game on large map, put myself out in the ocean in a transport, and watched the AI's interactions. The new warring is far superior, and makes for an interesting game. As always though there are still a couple kinks I've noticed:

1) If a path is blocked, the AI doesn't recognize this. Mahammed Declared war on Frederik, who's borders touched, but were blocked by a montain, and he didn't have the Open borders agreements to get at Frederik. Instead of sending his army on boats, or declaring war to get through, his whole army just sat there (very sad to watch, he had quite the Dagger of Janniserries read). I suspect the AI couldn't cope with the fact his borders were touching, and was assuming he could get through, but the program had no understanding of mountains. I eventually changed a montain to Dessert after about 20 turns, and this fixed it.

2) The Diplomacy is racked against the human now. Too many war requests there is no way to really keep up. It's impossible not to have everyone pissed at you in large multi way games now. The AI is always warring, and you are getting war requests every other turn or so. There needs to be some diplo modifier for this new found behaviour. The original Diplo Rules with a -1 refusal to help penalty just rack up too quickly to keep up now. You can at best succede in keeping 4 or so Civs in Good standing, and everyone else ends up hating you now.

I have the game still running, currently in the Industrial age. Saved at every major event, I'd be happy to upload a couple files if this would help at all.
 
Attached is a save that crashes to desktop on the next turn. It's the 12-02 build I'm using. No other mods.

EDIT: Whatever is wrong with this save, it will crash on the next turn, even without the BetterAI dll.
 
There is another option.
I could make the AI's at random attack VERY early in the game, like walk in with their starting warrior and take a humans undefended capital.

I'd prefer it if it did this - it would add a little edginess to game starts. I don't think the peaceful civs should go to war automatically though. It'd be like having the barbarian rush a little early, except with Alex or Monty.

Actually it'd be nice to have an option screen where some of this could be selected, but I don't know if that would work with save files or not. Can you save stuff that the unmodified game doesn't recognize?
 
Governor issue...running Caste Syste and Pacifism, my Globe Theatre and National Epic city with a healty food surplus...my desire is to get a Great Merchant, but the governor prefers to assign tons of Scientists regardless of the setting I choose (without any emphasize, emphasize GP, emphasize Commerce or additionally emphasize commerce/GP...should not at least the last variant make the governor assigning merchants?).

Either this is still an old routine from stock rules (where the governor prefers scientists as well) or it has to do with the booster buildings in the city:

Science:

Library (+25%)
Observatory (+25%)
University (+25%)
Academy (+50%)


Commerce:

Market (25%)
Grocer (25%)
Stock Exchange (65%)


Thats 125% vs. 115% for the Science department...but shouldn't my focus "commerce" overwrite that? Even if that is less efficient in terms of maximizing output - a GM is a valid goal as well.

If needed, I can provide a save.
 
but I don't know if that would work with save files or not. Can you save stuff that the unmodified game doesn't recognize?

I do not see that as being a big problem. This is after all a test site.

All Blake or Iustus have to do is say this version needs a new game to be started. Then testers can choose to keep playing with the old version (that is what I tend to do) or download the new version and start a new game. :)
 
Back
Top Bottom