Improve AI tech and policy choices (#12234)

* AI behaviour changes

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Automation.kt

* Reverting some changes

* Changes

* revert changes

* revert changes

* revert changes

* revert changes

* Update CityLocationTileRanker.kt

* Citizen assignment for stat conversion

* Update CityLocationTileRanker.kt

* Reduce AI settling

* Avoid AI building units when in negative Supply

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update build.gradle.kts

* Update gradle-wrapper.properties

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update CityLocationTileRanker.kt

* AI changes for humans

* Fix puppet focus

* Update Automation.kt

* Puppet focus

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Stats.kt

* Update CityTurnManager.kt

* Remove specialist science modifier

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update CivilianUnitAutomation.kt

* Update ReligionAutomation.kt

* Worker prioritization

Workers are valuable in expand cities.

* Update ConstructionAutomation.kt

Food always important, it's rarely good to skip e.g. granary if we're on 6 pop.

* Update ConstructionAutomation.kt

Should achieve about the same with less lines of code.

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Policies.json

* Update Policies.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update Policies.json

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Rename Crop Yield to Growth

* Update worker usage

* Update UnitAutomation.kt

* Tutorials update

* Update Tutorials.json

* Fix spelling error

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* AI tech and policy choices

* Update Techs.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update UnitPromotions.json

* Update

* Update Policies.json

* Update Tutorials.json

* ReligionAutomation bugfix

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt
This commit is contained in:
EmperorPinguin 2024-09-25 19:46:07 +02:00 committed by GitHub
parent 4394dcda7a
commit 41eab84051
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 19 deletions

View File

@ -35,7 +35,8 @@
"name": "Oligarchy",
"uniques": [
"Units in cities cost no Maintenance",
"[+50]% Strength for cities <with a garrison> <when attacking>"
"[+50]% Strength for cities <with a garrison> <when attacking>",
"[-100]% weight to this choice for AI decisions"
],
"row": 1,
"column": 5
@ -93,7 +94,8 @@
"name": "Citizenship",
"uniques": [
"[-25]% construction time for [All] improvements",
"Free [Worker] appears"
"Free [Worker] appears",
"[-100]% weight to this choice for AI decisions"
],
"row": 1,
"column": 4
@ -122,7 +124,8 @@
"name": "Meritocracy",
"uniques": [
"[+1 Happiness] [in all cities connected to capital]",
"[-5]% Unhappiness from [Population] [in all non-occupied cities]"
"[-5]% Unhappiness from [Population] [in all non-occupied cities]",
"[-100]% weight to this choice for AI decisions"
],
"requires": ["Citizenship"],
"row": 2,
@ -434,7 +437,8 @@
"uniques": [
"[+1 Happiness] from every [University]",
"[+1 Happiness] from every [Observatory]",
"[+1 Happiness] from every [Public School]"
"[+1 Happiness] from every [Public School]",
"[-50]% weight to this choice for AI decisions"
],
"row": 1,
"column": 4
@ -458,7 +462,7 @@
},
{
"name": "Scientific Revolution",
"uniques": ["Science gained from research agreements [+50]%"],
"uniques": ["Science gained from research agreements [+50]%", "[-100]% weight to this choice for AI decisions"],
"requires": ["Free Thought"],
"row": 3,
"column": 2
@ -490,13 +494,13 @@
"policies": [
{
"name": "Constitution",
"uniques": ["[+2 Culture] from every [Wonder]"],
"uniques": ["[+2 Culture] from every [Wonder]", "[-100]% weight to this choice for AI decisions"],
"row": 1,
"column": 1
},
{
"name": "Universal Suffrage",
"uniques": ["[+33]% Strength for cities <when defending>"],
"uniques": ["[+33]% Strength for cities <when defending>", "[-100]% weight to this choice for AI decisions"],
"row": 1,
"column": 3
},
@ -553,7 +557,7 @@
"policies": [
{
"name": "Populism",
"uniques": ["[+25]% Strength <for [Wounded] units>"],
"uniques": ["[+25]% Strength <for [Wounded] units>", "[+100]% weight to this choice for AI decisions"],
"row": 1,
"column": 2
},
@ -622,7 +626,7 @@
{
"name": "United Front",
"uniques": [
"Militaristic City-States grant units [2] times as fast when you are at war with a common nation"
"Militaristic City-States grant units [2] times as fast when you are at war with a common nation","[-100]% weight to this choice for AI decisions"
],
"row": 1,
"column": 1

View File

@ -25,6 +25,7 @@
"name": "Pottery",
"row": 2,
"prerequisites": ["Agriculture"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Shall the clay say to him that fashioneth it, what makest thou?' - Bible Isaiah 45:9"
},
{
@ -43,6 +44,7 @@
"name": "Mining",
"row": 9,
"prerequisites": ["Agriculture"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'The meek shall inherit the Earth, but not its mineral rights.' - J. Paul Getty"
}
@ -59,12 +61,14 @@
"name": "Sailing",
"row": 1,
"prerequisites": ["Pottery"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'He who commands the sea has command of everything.' - Themistocles"
},
{
"name": "Calendar",
"row": 2,
"prerequisites": ["Pottery"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'So teach us to number our days, so that we may apply our hearts unto wisdom.' - Bible Psalms 90:12"
},
{
@ -77,12 +81,14 @@
"name": "Trapping",
"row": 5,
"prerequisites": ["Animal Husbandry"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Even brute beasts and wandering birds do not fall into the same traps or nets twice.' - Saint Jerome"
},
{
"name": "The Wheel",
"row": 7,
"prerequisites": ["Animal Husbandry", "Archery"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Wisdom and virtue are like the two wheels of a cart.' - Japanese proverb"
},
{
@ -130,6 +136,7 @@
"name": "Construction",
"row": 9,
"prerequisites": ["Masonry","The Wheel"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Three things are to be looked to in a building: that it stands on the right spot; that it be securely founded; that it be successfully executed.' - Johann Wolfgang von Goethe"
}
]
@ -157,13 +164,14 @@
"name": "Currency",
"row": 7,
"prerequisites": ["Mathematics"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Better is bread with a happy heart than wealth with vexation.' - Amenemope"
},
{
"name": "Engineering",
"row": 8,
"prerequisites": ["Mathematics","Construction"],
"uniques": ["Roads connect tiles across rivers"],
"uniques": ["Roads connect tiles across rivers","[+100]% weight to this choice for AI decisions"],
"quote": "'Instrumental or mechanical science is the noblest and, above all others, the most useful.' - Leonardo da Vinci"
},
{
@ -191,7 +199,7 @@
"name": "Civil Service",
"row": 5,
"prerequisites": ["Currency","Horseback Riding","Drama and Poetry"],
"uniques": ["Enables Open Borders agreements"],
"uniques": ["Enables Open Borders agreements","[+100]% weight to this choice for AI decisions"],
"quote": "'The only thing that saves us from the bureaucracy is its inefficiency' - Eugene McCarthy"
},
{
@ -227,7 +235,7 @@
"name": "Education",
"row": 3,
"prerequisites": ["Theology","Civil Service"],
"uniques": ["Enables conversion of city production to [Science]","Enables Research agreements"],
"uniques": ["Enables conversion of city production to [Science]","Enables Research agreements","[+100]% weight to this choice for AI decisions"],
"quote": "'Education is the best provision for old age.' - Aristotle"
},
{
@ -276,18 +284,21 @@
"name": "Acoustics",
"row": 4,
"prerequisites": ["Education"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Their rising all at once was as the sound of thunder heard remote' - Milton"
},
{
"name": "Banking",
"row": 6,
"prerequisites": ["Chivalry", "Education"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Happiness: a good bank account, a good cook and a good digestion' - Jean Jacques Rousseau"
},
{
"name": "Printing Press",
"row": 8,
"prerequisites": ["Machinery","Physics","Chivalry"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'It is a newspaper's duty to print the news and raise hell.' - The Chicago Times"
},
{
@ -354,6 +365,7 @@
"name": "Scientific Theory",
"row": 4,
"prerequisites": ["Architecture","Economics"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Every great advance in science has issued from a new audacity of imagination.' - John Dewey"
},
{
@ -378,6 +390,7 @@
"name": "Fertilizer",
"row": 10,
"prerequisites": ["Chemistry"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'The nation that destroys its soil destroys itself.' - Franklin Delano Roosevelt"
}
]
@ -393,12 +406,14 @@
"name": "Biology",
"row": 2,
"prerequisites": ["Archaeology","Scientific Theory"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'If the brain were so simple we could understand it, we would be so simple we couldn't.' - Lyall Watson"
},
{
"name": "Electricity",
"row": 3,
"prerequisites": ["Scientific Theory"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Is it a fact - or have I dreamt it - that, by means of electricity, the world of matter has become a great nerve, vibrating thousands of miles in a breathless point of time?' - Nathaniel Hawthorne"
},
{
@ -427,6 +442,7 @@
"name": "Refrigeration",
"row": 2,
"prerequisites": ["Biology", "Electricity"], //todo: offshore platform should need this
"uniques": ["[-50]% weight to this choice for AI decisions"],
"quote": "'And homeless near a thousand homes I stood, and near a thousand tables pined and wanted food.' - William Wordsworth"
},
{
@ -451,6 +467,7 @@
"name": "Railroads",
"row": 8,
"prerequisites": ["Steam Power","Dynamite"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man.' - Thomas Jefferson"
}
]
@ -466,6 +483,7 @@
"name": "Plastics",
"row": 3,
"prerequisites": ["Radio","Replaceable Parts"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'Ben, I want to say one word to you, just one word: plastics.' - Buck Henry and Calder Willingham, The Graduate"
},
{
@ -484,6 +502,7 @@
"name": "Combustion",
"row": 8,
"prerequisites": ["Railroads"],
"uniques": ["[-50]% weight to this choice for AI decisions"],
"quote": "'Any man who can drive safely while kissing a pretty girl is simply not giving the kiss the attention it deserves.' - Albert Einstein"
}
]
@ -505,6 +524,7 @@
"name": "Atomic Theory",
"row": 4,
"prerequisites": ["Plastics","Electronics"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'The unleashed power of the atom has changed everything save our modes of thinking, and we thus drift toward unparalleled catastrophes.' - Albert Einstein"
},
{
@ -544,6 +564,7 @@
"name": "Rocketry",
"row": 6,
"prerequisites": ["Radar"],
"uniques": ["[+100]% weight to this choice for AI decisions"],
"quote": "'A good rule for rocket experimenters to follow is this: always assume that it will explode.' - Astronautics Magazine, 1937"
},
{
@ -583,7 +604,7 @@
"name": "Satellites",
"row": 6,
"prerequisites": ["Rocketry"],
"uniques": ["Reveals the entire map"],
"uniques": ["Reveals the entire map","[+100]% weight to this choice for AI decisions"],
"quote": "'Now, somehow, in some new way, the sky seemed almost alien.' - Lyndon B. Johnson"
},
{
@ -596,6 +617,7 @@
"name": "Lasers",
"row": 8,
"prerequisites": ["Computers"],
"uniques": ["[-100]% weight to this choice for AI decisions"],
"quote": "'The night is far spent, the day is at hand: let us therefore cast off the works of darkness, and let us put on the armor of light.' - The Holy Bible: Romans, 13:12"
}
]
@ -612,6 +634,7 @@
"name": "Globalization",
"row": 2,
"prerequisites": ["Telecommunications"],
"uniques": ["[-100]% weight to this choice for AI decisions"],
"quote": "'The new electronic interdependence recreates the world in the image of a global village.' - Marshall McLuhan"
},
{
@ -624,6 +647,7 @@
"name": "Nuclear Fusion",
"row": 6,
"prerequisites": ["Advanced Ballistics", "Satellites", "Robotics"],
"uniques": ["[-100]% weight to this choice for AI decisions"],
"quote": "'The release of atomic energy has not created a new problem. It has readily made more urgent the necessity of solving an existing one.' - Albert Einstein"
},
{
@ -636,6 +660,7 @@
"name": "Stealth",
"row": 8,
"prerequisites": ["Robotics", "Lasers"],
"uniques": ["[-100]% weight to this choice for AI decisions"],
"quote": "'Be extremely subtle, even to the point of formlessness, be extremely mysterious, even to the point of soundlessness. Thereby you can be the director of the opponent's fate.' - Sun Tzu"
}
]

View File

@ -422,7 +422,7 @@
// Bomber
{
"name": "Siege I",
"uniques": ["[+33]% Strength <vs cities>"],
"uniques": ["[+33]% Strength <vs cities>", "[-100]% weight to this choice for AI decisions"],
"unitTypes": ["Bomber"],
"column": 17,
"row": 1
@ -628,7 +628,7 @@
{
"name": "Ambush I",
"uniques": ["[+33]% Strength <vs [Armored] units>"],
"uniques": ["[+33]% Strength <vs [Armored] units>", "[-100]% weight to this choice for AI decisions"],
"unitTypes": ["Sword","Gunpowder","Fighter","Bomber"],
"column": 25,
"row": 1

View File

@ -268,7 +268,7 @@ class ConstructionAutomation(val cityConstructions: CityConstructions) {
for (building in buildings.filterBuildable()) {
if (building.isWonder && city.isPuppet) continue
// We shouldn't try to build wonders in undeveloped cities and empires
if (building.isWonder && !cityIsOverAverageProduction)
if (building.isWonder && !cityIsOverAverageProduction) continue
if (building.isWonder && civInfo.cities.size < 3) continue
addChoice(relativeCostEffectiveness, building.name, getValueOfBuilding(building, localUniqueCache))
}

View File

@ -31,7 +31,7 @@ object ReligionAutomation {
return
}
if (civInfo.religionManager.remainingFoundableReligions() == 0 && civInfo.religionManager.religionState == ReligionState.Pantheon) {
if (civInfo.religionManager.remainingFoundableReligions() == 0 ) {
buyGreatPerson(civInfo)
return
}
@ -81,8 +81,6 @@ object ReligionAutomation {
return
}
// Todo: buy Great People post industrial era
// Just buy missionaries to spread our religion outside of our civ
if (civInfo.units.getCivUnits().count { it.hasUnique(UniqueType.CanSpreadReligion) } < 4) {
buyMissionaryInAnyCity(civInfo)