Logo Platform
logo amplifiers simplified

Testing the AI

Reply
Copied to clipboard!
3 years ago
Dec 6, 2021, 5:44:57 AM

This thread will compile some observations about AI. 

- How to set AI parameters.

- AI take only parameters or check also values in descriptor ?

- What do the "weight synergy", it weight the importance of the neighboor district, or it's also a general weight ?

- Etc.....


Using this :

Basic cheater,  https://humankind.mod.io/cheat4mods

And this : 

Remove fog, https://gc2021.com/showthread.php?tid=19.

Choose starting era, https://gc2021.com/showthread.php?tid=47.


Need to add an Industry boost also, else AI will wait a lot while building wonders. I have to add that in cheat4mods mod.

Starting Era : Industrial or Contemporary.

Settler : the AI don't to know to use the Settler and build first an outpost.

EDIT: starting at contemporary era, the AI know! weird, or intended because outpost costs.




Commons Quarter


With many money, AI build the town in one turn (or almost) thank to buy-out.

We see something weird often, forests of Commons Quarter!


Here are the Vanilla AI parameters.



Strange facts :

- District type is "none" instead of Culture or Public Order.

- Synergy Weight is a lot, 5! We don't see that in other districts. Maybe it's the Stability value it gain.

- There is Military and Faith in the target Synergy. It shouldn't.


First Test :

- Set "Public Order" to Low instead of "Important".

- Set Weight to 1.

- Remove Military and Faith of synergy.

Result :

Woo! It work. There is still a bit too much Commons, and they don't place always well, but no more forest!!

Will try more and see what mean this "weight" thing. Will try to set the district type.




Build on Coastal Water.


Problem I got with my DeepSea mod. AI don't build my new stuff!

No matter I set it to "Vital" or not. 

I'm not sure if my solution is the good one or if there is another one, but here I did that :



Fishing Village provide Food, and was set like Farmer Quarter, with "District Type = FIMS District".

I removed that and set "District Type = Harbour" instead.

Magic!!! Now AI know to build on Coastal Water and build any district I set like that.

Even when it's not on the Coast! (Gillnetters for example).

Also, we see here the Synergy "Food from Money". My mod use an inverted synergy.

Here, it's not perfect, but overall, AI try to get the synergy.



Look how are Commons Quarters. More balanced but not perfect. 

It would need a parameter that say "don't build a Commons nearby another one".


We can see some other stuff the AI know to build now, from DeepSea mod:

- Naval Base. I don't know if AI know to build on Cliff or if AI build because there is another district next door. In a city, the Naval base is build, in another one, there is a lot of Ocean tiles next to cliff, but AI don't wan't to build!

- Naval Base bis : The District type is set on "Military District", but the AI still know to build it on Sea!!!

- Gillnetters far away from the coast. (we see it bottom right, last shoot)

- Blocus (build a lot lot lot, I need to change the district a bit). 

- Lighthouse, set to "Vital", should be build once per territory.




Expand.


Even with near infinite Influence and Money, the AI don't expand. Very very slow expansion.

I don't know if it's because I set "Peacefull mode ON".

Turn 49, only 3 Cities. Is there an hard setting about AI expansion/turn number ?

EDIT: look like it depends of "Peacefull mode ON". With OFF, AI expand normaly.

Updated 3 years ago.
0Send private message
3 years ago
Dec 6, 2021, 8:07:40 AM


Force AI to not build nearby.


Offshore Trawler from DeepSea is build on Ocean.

If an Offshore Trawler is build nearby another one (or any food quarter), it make a Pollution Malus and a Food Malus.

Here, I need to say the AI : "don't build it nearby food!".

As there is no way to say that, there is still a alternative method, with Synergy.



We see here, I say to AI : "You will gain Pollution". And I set an high weight "A lot of Pollution!", if synergy Food.



Green zone: AI build this very well.

Red zone: for unknow reason, AI didn't follow orders!


This trick could be used to LURE the Commons quarter, and say it : "don't build a common quarter next to another".

It's not important that it give no pollution, what matter is AI think it will.




AI check the values.


I set 2 identical districts except :

- One is able to produce insane amount of Food.

- This one have Food set to "Low", and the other set on "Important".

The AI don't follow order and build more often the district set on "Low", as if AI will check values in the Descriptor.

I am not 100% sure, because in some rare cases, AI build also the "important" district.


Updated 3 years ago.
0Send private message
3 years ago
Dec 7, 2021, 2:14:36 AM

FAIL: AI process remains unknow. 


With more tests, I discover that the number of factors making AI take the decision to build something is too high.

AI from one player could accumulate a specific district (even when AI parameters are set to be low), and another AI player another district.

So, setting the AI parameters is very difficult. AI is able to build what is "Vital" almost every time, but don't care about so many params.

And we don't know 100% sure if the AI check the value (it look like), check what is needed (maybe but with the cheater, the AI need nothing).

Another things that could help is to set hard limits but the mod-tool don't provide much about that, or in a limited way.




AI don't care about Pollution. 


I even wonder if some AI would like to build as many Pollution as possible.



Here, it say +1000 pollution for the 1st other Commons nearby... AI don't care.

The negative weight is a try. It dont make the game crash, at least, but don't provide any visible effect.

It's still improve a bit...


We have some clustering. In another city it's better :



What save the day here is this :



So, it's NOT an AI parameter!! It just say the Commons have to be build at least next to one of these other district.

Tag operator is "ANY", there is no many choice and the way other Tag operator apply is weird, and never what we wan't.

I tried NONE as to say "don't build next to that", but it don't apply like that.

It would need also a Tag operator that say not ANY but "at least 2", or "at least 3". So the Commons would need at least 2 or 3 basic districts nearby.


About Pollution synergy, I know the AI don't care, because I still have this huge problem with Offshore Trawler:



If you check the other screenshots, you can see a lot of Offshore Trawlers next to each other.

So to solve this problem, I will need to introduce a new district, making AI have something else to build on sea (just that), and add some fake synergy.

Because AI take into account the WEIGHT of synergy, but only when it's a positive weight.

It's why finaly, I revert the change of Commons to this :



A far low weight, but just enough to say to build next that. (I could try to put more, but I think it will make AI build more Commons...).

I even set the Importance of public Order to "NONE" ! Still, the AI will build a good number of Commons, with a bit less clustering.



Same AI in another city, here a very few Commons :



Green hex at south are Offshore Trawlers... Proof that the AI parameter "Pollution Weight Synergy" is quite useless.





0Send private message
?

Click here to login

Reply
Comment