- The AI must be able to beat the standard vanilla deity AI 100% of the time if they played each other.
Not a reasonable requirement with the other constraints - there are plenty of human players who can't beat the AI advantages on Deity (I've never actually played Deity, but I can't beat Emperor or - my current standard difficulty - Immortal 100% of the time, even if not hit by an early rush).
- I think the AI should refuse any obviously exploitative deals that give it unnecessary amounts of happiness for 240G. In turn, these AI would exploit the CiV AI using that deal. In fact, that AI would exploit the Deity AI in everyway a human does already to it. Any monetary advantage is important for these AI.
This in itself isn't particularly important if the AI knows how to spend its money - the current AI can be exploited not because it makes stupid deals so much as because it's given a bonus it isn't using. It shouldn't have 240 spare to spend, at least not regularly. The AI already suffers from inflexibility - "Don't ever do X" is a problematic condition to impose, although admittedly in this case a simple one. Also, if the AI has no advantages, it won't have the excess happiness the current AI does, and so it probably won't often be in a situation where this algorithm would make gold for lux look like a bad deal.
A better option would be:
- Give AI a priority-setting algorithm where gold is concerned, so that instead of "I have gold, therefore if someone wants it for anything I can afford to give it to them", it considers the gold it has in relation to what it wants to spend it on. For instance, if it can enter into an RA, it would refuse a deal that would give it too little money to do so unless something else is higher in its priority list. This would still enable it to trade 240 gold for a luxury, but only if it has nothing else to spend money on, or its happiness is particularly low - and if it has no inherent gold advantage and is spending the money it has, it shouldn't often have the money to do so.
It's more complex, and I'm often vocal in pointing out that AIs need to be given simple rules (see below), but I think it's workable. All it really needs is a list, and the priorities themselves can be context-independent to some degree, or at least basic "If ... then" statements based on relative civ strength (if not tech leader, move science up the priority list. If not military leader, move buying units up the list etc.)
- This Hardcore AI would conduct a very complex evaluation of every possible move for each one of its combat units (not Scout or Workers) to see where it would be in danger. In addition, each unit has a sight equivalent to its maximum movement radius + its sight (so if a unit can move four tiles and has a 3 sight, it can see up to 7 tiles away from it). This way, the unit can properly evaluate what danger it would be getting into and avoid danger whenever possible. The Hardcore AI would not suicide its units as frequently, and would bait Civ V AI into moving into suicide.
All well and good if you want turn times measured in months, but chess AIs have to perform this kind of evaluation, with no random elements, no terrain features, no promotions, and full knowledge of the board, for only 16 pieces, and decent chess AIs have long turn times. All that's really needed to improve AI functioning is some ability to calculate the effects of combined attacks - so that the AI doesn't sit around or retreat with units because individually they can't deal enough damage to safely win a battle, or some might get killed, or wander aimlessly around cities until enough damage has been dealt by artillery for one melee unit to have a chance of taking the city.
Even with the knowledge of the surroundings the AI has, being able to think two turns ahead instead of one would also improve things without any other changes to AI algorithms - post-G&K the AI is so paranoid about losing units that it will always retreat from a superior opponent, whether or not that retreat would put it somewhere it could be killed in the following turn. The result is that the AI loses all the units it would lose anyway (if not more), but does less damage itself.
- The AI recognizes the need for science and will do whatever it takes to prioritize getting as many beakers as possible
It typically does this insofar as it can. However there are key things it's not capable of doing - and producing Great Scientists naturally is one of them (see my suggestions for AI improvements below). Very often AIs I face will have a higher bpt output than I do, but will be hampered by being unable to specialise Great Person production or take the appropriate Wonders at the appropriate time, as well as by making poor and inflexible teching decisions.
- Assigns a much higher value for technology like Civil Service, Education, Steel, Astronomy, etc. and will "see into the tech tree" to plan a route that gets its technology + a few necessary techs along the way (like Calendar or Mining for luxury trades)
Assigning high values to specific techs makes the AI too predictable and hence exploitable, as well as limiting variety between AI civs - certain AI civs prioritise different techs at present. Remove this, and among other things you make it much easier for the player to obtain Wonders that aren't along high-priority tech paths (and to predict which Wonders will be taken when), because all the AIs will reach the same techs in the same order and go for the same Wonders, allowing the player to grab the others (and costing the AIs that don't get those Wonders time and production, again favouring the human). This may also exacerbate an existing flaw, which is the AI's inability to react to changes in situation by reprioritising its tech progression - say, if it's being attacked by Frigates and Ironclads, and it has Caravels and Galleases, it won't make any effort to select naval techs to catch up. Nor will it prioritise Flight if an enemy has an airforce. While it will happily pursue Nuclear Fission with no uranium anywhere in its borders. And no AI civ actively beelines Globalization even if it's aiming for diplomatic victory.
- Picks one target that needs to die and will actively pursue that target until they are no longer a threat. This can be a close neighbor that it needs for expansion or a civilization that has taken the lead and needs to be stopped. It will negotiate mutual wars or trade embargos (if such a thing existed, rather this would be a series of denouncements) on that target AI.
The AI is currently moderately capable of this, but it is difficult to program an algorithm to determine when an enemy is not a threat, and even with the removal of "we're going for the same victory condition", AIs do seem to place higher priority on competing for "same victory" than on simply winning the game regardless of the rival's victory condition. Civs will nuke each other to prevent the other's Utopia Project going ahead, or declare war to prevent their rival from stealing their city-states, but the same civs won't think to nuke the other guy's spaceship because it's not perceived as a threat to a civ going for diplo or culture wins. And the various negatives for being at war, having been at war etc. tend to result in vendettas that outlive their usefulness - AI civs will very often spend valuable time beating an already defeated enemy into the ground because they now hate that civ, instead of focusing on more threatening rivals.
My own suggestions would for the most part be more specifically targeted to specific gameplay limitations rather than broad-brush "make the AI play better", although not necessarily easier to implement:
- Great People. Spy on any AI - it will not have any specialist slots filled, although it will have most specialist buildings in every city. Its GPs will be incidentally generated, either gathered from Wonders or from slow accumulation of GP points, and beyond tending to build Wonders in the capital by default, it won't try to focus its scientist point Wonders, say, in one city. The AI can now use Great People it generates, something it struggled with in vanilla, but as long as it is unable to generate them, it can never compete with a human who produces Great Scientists at a rate of one every 5-10 turns in the late game. I imagine it now knows how to faith-buy them, which probably helps, but the human can do that just as efficiently with more focused intent and superior natural GP generation.
- Evaluate the value of different Wonders in terms of their own strategy and game position, at least crudely. Some AIs will just grab any Wonder going, and watch how often a civ will build the Porcelain Tower and never enter into any research agreements. The science victory AI still works exactly as it did in vanilla - which means once Apollo is complete the civ will start building spaceship parts, and will never, ever build Hubble. Half the time Stonehenge is taken by civs that never make any other attempt to gain faith. The only real exception is that the cultural victory AIs will often hoard the cultural Wonders where possible, but even there there's no apparent priority setting regarding which to go for when - if it provides culture, take it (and the Oracle actually appears to be relatively low priority for culture civs, which appear to be programmed just to maximise culture output, not to recognise the value of free policies).
- Specialise towards a particular victory condition and keep aiming for it until achieved or impossible. This is admittedly inflexible, however I've run into a lot of recent cases where a civ will simultaneously be building spaceship parts while racing for the UN, or grabbing every CS going - cultural or otherwise - while heading for the Utopia Project. This tends to waste resources and time; as I've noted, no AI civ beelines to the UN, because they tend to go down the science tech route first. Plenty of civs build Apollo and never build any spaceship components; often the rest decide to abandon spaceship production altogether once the UN is built (or at random otherwise). And I've seen the reverse - the AI giving up a city-state race that they could have used at least to stall my diplo victory because they've decided to try building a spaceship instead. The AI launches fewer irrelevant wars than it did in vanilla, but this too should be curtailed - if a civ is at war and aiming to take a city, just holding that city can keep them distracted for the rest of the game. In one duel map game (Immortal), Wu was in a position to be competitive for science victory, but she just focused exclusively on failed invasions of a city I'd founded to access uranium - not even a capital that could have won her domination. In another Immortal game, Genghis and Nebuchadnezzar spent the entire late game trading Nippur with each other. Nippur wasn't a capital, Nebuchadnezzar wasn't in a position to shoot for any victory condition (while Genghis was doing well until that point in progressing towards diplo victory), and I was the lead rival for victory (and friend to both of the others). That was also the game where Genghis essentially conceded diplo victory to me while he focused on starting a spaceship from scratch. If he's going to go for a spaceship, and the UN is already out, he needs to be programmed to realise that he can only complete his spaceship by preventing me winning diplo victory. Instead, one of my votes actually came from ... Genghis Khan (because by that stage only three civs survived, and since Genghis and Nebuchadnezzar were at permanent war, I got both their votes by default).
- Achievable, but demanding development time wise: program the AI with an understanding of UAs, so that it will play in a way that maximises its benefits from being Civ X. At present each civ is programmed to favour one of a small number of preset strategies more often than the alternatives, but Babylon doesn't pursue its science strategy any differently from Korea, say (and naturally neither uses specialists). Genghis still prefers diplo victory despite his tendency to conquer city-states, in spite of changes to the diplo victory condition that cause conquered CSes to lose their votes. On the one hand, there's an argument that the AI should be improved across the board before fiddling with Civ-specific stuff; however it is likely to be a lot easier to program an AI to succeed by making it able to exploit its advantages rather than by training it in strategy. It amounts to giving it free bonuses by a back door route. And however much you improve the combat AI, Attila's going to lose as long as he thinks a Battering Ram should behave like a Spearman.