Some ideas for the future...

Dom Pedro II

Modder For Life
Joined
Apr 3, 2002
Messages
6,811
Location
Exit 16, New Jersey
1. First and foremost: It's time to conquer the beast. The AI_bestTech function has been allowed to stand for far too long. I dunno how Firaxis screwed up this function so much while getting it right for other things.

There should be an AI_techValue function or something like that, and the only thing that the AI_bestTech function should do is loop through the techs calling the AI_techValue function for each and then picking the one with the highest value.

Why? Aside from the fact that it's neater, it a AI_techValue function would let modders easily compare the tech values of two techs, or allow the AI to measure how significant it's tech lead or tech lag might be. In fact, it would be even better if the AI_techValue function was itself made up of smaller functions perhaps measure the military value, economic value, etc. independently allowing for even more precise comparisons in other parts of the code. Sure, we could create new functions that do essentially the same thing and leave AI_bestTech untouched, but this would be redundant.

2. More XML tags to control AI behavior. There's already tags to help the AI decide what units, buildings, projects etc. to build, techs to research, and civics to adopt, but I think we can go beyond those.

There's a couple of reasons: One is that the more values that are exposed to the XML, the more the unwashed masses can easily tweak AI behavior to try to find that magical sweet spot instead of leaving it to the SDK gods to hand them down a new DLL every now and then that changes value X from 10 to 20 or something. Not that I'm saying all values have to be pulled from the XML since this would not be feasible, but certainly there are a number of important multipliers and divisors that could stand to be read from the XML.

The second is that one of the advantages the human player has over the AI is the human ability to take a lot of different values and create an abstraction. For example, when considering whether a city is in danger, the AI doesn't seem to take into account the real risk the city faces. If I move a Warrior against a city defended by Infantry, the AI will still register a threat... now, the AI will probably send somebody to kill the Warrior, but how many units will drop what they were doing to go defend the city instead of defending a place that's actually in jeopardy? But simply comparing base strengths would be insufficient, and running through all of the potential max combat strengths of defenders and attackers would be ludicrous. So having some kind of AI city attack value to compare against an AI defense value would allow the AI to make smarter decisions without adding needless layers of precision and processing time.

Other tags for civics, for example, could modify the AI's behavior. If a civ happens to be running a strong building set of civics, maybe it should be less inclined for war? Or if its running a strong military set of civics, more inclined? I mean, an AI's plans will influence its civics choices, but should maybe its current civic choices influence its plans?

3. Centralized planning is something that I think is sorely needed. Human players set goals and then find the cities or units to accomplish those goals. The AI, on the other hand, examines on a unit-by-unit or city-by-city basis and sees what needs doing. This tends to lead to redundancy (sending two units when only one is needed), indecisiveness (units running back and forth not committing to any one course of action), or important goals simply not being done at all.

I was playing a WWII mod the other day where I had an advancing tank army moving on the enemy capital. I expected the AI to reinforce the city (which they did), but then on the next turn, pulled nearly as many units out of the city. Only to move them back in again on the next turn. Why? I wasn't moving on any of their other cities. This was it. This was where the showdown would be. If they'd kept those defenders when I was finally in position to attack, I might've been forced to give up the campaign. But instead I attacked on one of those turns when they shuttled troops out of the city again and took it.
 
Couldn't agree more with points 1 and 3. 2 would be good as well, in spite of not being as needed as the other 2.

Can I add one point? :D This would probably fit well with 3, but who cares ;)

4. AI diplo is a complete mess. I'm not talking only of the common gripes you see in the general discussions and strategy tips ( especially the poor handling of vassals in terms of diplo, with that horrid averaging of atitudes ), or about the AI management of the AP/UN ( with the absolute skeleton code it has, that makes the AI call out via UN wars they are winning or call votes to give cities they conquered back to the previous owner :crazyeye: ), in spite of those two could definitely help the AI making less stupid moves. I'm talking about the way the game couples all the things in one big number, and applying that in block to all the areas that have some kind of diplo involved... Just because I am friendly with you, I might not consider to be a good idea to sell/give you Oil or trade/give my Flight tech with you, and the reverse is also true: I might have all the interest in the world to give a tech or a resource to someone I dislike heavily, but have interest to boost. Humans do that on a regular basis, the AI as it is will not. Ok, a good dose of roleplay is Ok, but there is no need of pretending that the AI is ruling themselfes by victorian honor standarts ( especially when they don't any moral problem to send spies for various nefarious ends to civs they are pleased and friendly with )
 
4. ... I'm talking about the way the game couples all the things in one big number, and applying that in block to all the areas that have some kind of diplo involved... Just because I am friendly with you, I might not consider to be a good idea to sell/give you Oil or trade/give my Flight tech with you, and the reverse is also true: I might have all the interest in the world to give a tech or a resource to someone I dislike heavily, but have interest to boost. Humans do that on a regular basis, the AI as it is will not. Ok, a good dose of roleplay is Ok, but there is no need of pretending that the AI is ruling themselfes by victorian honor standarts ( especially when they don't any moral problem to send spies for various nefarious ends to civs they are pleased and friendly with )

Yes, the AI should consider their trading partner's relations with other players as well... enemy of my enemy type stuff.

Yes. One of the other things that's wrong with the way the AI handles diplomacy is that, like the problem with everything else, the AI simply carries out diplomacy because it's time to do it not because it has some compelling need to.

If the AI loses its supply of Oil, for example, it should go around and ask every player it can to trade some Oil. Instead, the AI will simply continue on looping through all the players each turn seeing who it can talk to about what, and it might (eventually) get around to asking somebody for Oil. But it won't be because it saw the urgency in getting more.

I've been adding my own code to try to improve the AI's diplomacy behavior including not asking to cancel deals or declare wars on players that it should know very well the other player won't accept (since all it does is worsen the relationship needlessly), as well as making it so that the AI will ask AI players for wardecs thus increasing the the risk of attacking a popular player.

I'm also adding code that let's the AI gift units to other AI players (which it doesn't do currently). This'll go further in allowing the AI to prop up enemies of their enemies.
 
Good to know that someone is working on it :goodjob: Definitely the AI needs some Realpolitik genes and to understand that some things are really vital and that even negotiating with the Devil is not too bad for getting them.... and to understand that some demands are not worth the risk of denial :p
 
4. AI diplo is a complete mess. I'm not talking only of the common gripes you see in the general discussions and strategy tips ( especially the poor handling of vassals in terms of diplo, with that horrid averaging of atitudes ), or about the AI management of the AP/UN ( with the absolute skeleton code it has, that makes the AI call out via UN wars they are winning or call votes to give cities they conquered back to the previous owner :crazyeye: ), in spite of those two could definitely help the AI making less stupid moves. I'm talking about the way the game couples all the things in one big number, and applying that in block to all the areas that have some kind of diplo involved... Just because I am friendly with you, I might not consider to be a good idea to sell/give you Oil or trade/give my Flight tech with you, and the reverse is also true: I might have all the interest in the world to give a tech or a resource to someone I dislike heavily, but have interest to boost. Humans do that on a regular basis, the AI as it is will not. Ok, a good dose of roleplay is Ok, but there is no need of pretending that the AI is ruling themselfes by victorian honor standarts ( especially when they don't any moral problem to send spies for various nefarious ends to civs they are pleased and friendly with )

It is common knowledge that AI diplomacy sucks. I think better AI mod is focussing on AI warfare for now


I'm also adding code that let's the AI gift units to other AI players (which it doesn't do currently). This'll go further in allowing the AI to prop up enemies of their enemies.

I fondly remember my allies in Alpha Centauri giving me units to help me out.
 
It is common knowledge that AI diplomacy sucks. I think better AI mod is focussing on AI warfare for now
I'm not so sure... I definitely not disagree with you that the biggest blunder of the AI is their handling of military, but that does not make less true the fact that all the AI gains in military prowess can be reduced to 0 by bad diplo management of the AI. What is the point of a AI preparing and doing a excelently prepared military invasion just for the same AI in the next turn the same AI calls a vote to stop the war via UN or AP? What is the gain the AI can take some cities to a enemy just to give them back via AP or UN ? What is the net gain of not helping a backroom AI that you don't like in a war vs your worst enemy that is close of starting a runaway? What does the AI gain in military prowess by refusing to trade silk + iron for the surplus oil of their worst enemy or even to a AI they don't particularly like?

Note that I'm not saying that the AI doesn't need some reform in the military aspect, even with all the improvement that were done so far in this mod. What I'm saying is that, if you don't look to the diplo side, you risk to have a limp AI: decent in warfaring but that doesn't know how to wage a profitable war. And that is far from being optimal.
 
I'm not so sure... I definitely not disagree with you that the biggest blunder of the AI is their handling of military, but that does not make less true the fact that all the AI gains in military prowess can be reduced to 0 by bad diplo management of the AI. What is the point of a AI preparing and doing a excelently prepared military invasion just for the same AI in the next turn the same AI calls a vote to stop the war via UN or AP? What is the gain the AI can take some cities to a enemy just to give them back via AP or UN ? What is the net gain of not helping a backroom AI that you don't like in a war vs your worst enemy that is close of starting a runaway? What does the AI gain in military prowess by refusing to trade silk + iron for the surplus oil of their worst enemy or even to a AI they don't particularly like?

Note that I'm not saying that the AI doesn't need some reform in the military aspect, even with all the improvement that were done so far in this mod. What I'm saying is that, if you don't look to the diplo side, you risk to have a limp AI: decent in warfaring but that doesn't know how to wage a profitable war. And that is far from being optimal.

And certainly the AI will do a lot better if it can rely on friends or strange bed fellows. It certainly won't make up for the deficiencies in waging war, but it will make it a lot tougher on human players.

But to be honest, I posted this thread because I can handle the diplomacy ;) It's the other AI stuff I'm not that good with. I could probably tackle the AI_bestTech function, but it's going to be time-consuming and I have enough on my plate as it is.
 
View Post
It is common knowledge that AI diplomacy sucks. I think better AI mod is focussing on AI warfare for now

Better AI will make everything better in time, they are going at the parts that need it the most. Be patient and the AI will turn from this :confused: to this :king:
 
the unwashed masses

Hey now, I resemble that remark.

But I agree with you completely. The AI has serious diplomacy problems. I can't remember how many times the AI have used the Apostolic Palace to gift their cities back to their enemies. :lol:

If the AI were to centrally plan, and have a goal(s), like to eventually wipe out my worst enemy, it would be far superior than it is now.

While we're mentioning AI stupidities, I almost think whipping should just be excised from the game. It is never useful for the AI, it's basically a hack. The AI basically shoots itself in the foot with it.
 
Hey now, I resemble that remark.

But I agree with you completely. The AI has serious diplomacy problems. I can't remember how many times the AI have used the Apostolic Palace to gift their cities back to their enemies. :lol:
I've never actually seen this myself, but it should be very easy to correct this.. just have it run a simple check to see if the city is its own.

If the AI were to centrally plan, and have a goal(s), like to eventually wipe out my worst enemy, it would be far superior than it is now.
And central planning is no small feat either... I mean, there are a lot of things that we just do instinctively. But to really code AI well, one has to stop and think about how exactly the human player makes a decision. What factors does it take into account? What is it trying to accomplish? And then you have to think of how you can get the AI to run through that same process while not exploding processing time.

While we're mentioning AI stupidities, I almost think whipping should just be excised from the game. It is never useful for the AI, it's basically a hack. The AI basically shoots itself in the foot with it.
Well, one way to easily test that certainly would simply be to remove the ability of Slavery to whip and run a couple games and see if the AI performs better.

If it is indeed a problem, the whipping code should probably be revisited. I'm not convinced that the AI can't be made to use this effectively.
 
The AI uses slavery well. If anything it doesn't whip enough. It does seem like there are situations though where it gets stuck in a "whip loop" but that's rare and nothing noteworthy. I think Afforess's opinion is based on some oddities caused by the extreme changes in civics in RoM, much of which is probably invisible to the AI due to being coded in python.
 
Thanks for the ideas!

1. Yeah, you're right ... ugh. That's one gnarly function! Of course, gnarly functions are exactly the places where there are likely to be hidden bugs or poor behavior because the code is so difficult to read. Your code structure suggestions are right on also.

2. Any specific XML value requests?

Some options off the top of my head:
- AI value weights on food/production/gold yield on tiles
- Threshold of what's considered a good tile
- Odds thresholds for when to attack cities
- ???

3. Central planning can certainly help in a lot of places, but it's also really difficult to pull off ... my current aims are for central planning of wonders and for when to mount offensives versus stay in a defensive shell. These are simply not things that should be decided by individual cities or units.

As for the specific buggy behavior you saw, I think it's due to an issue in CvUnitAI::AI_guardCity ... there's a bug in there somewhere causing units to cycle in and out of cities in certain circumstances, stemming I believe from whether or not the unit is considered a defender when it's in the city or not. I tried to track it down at one point, but it was elusive.

4. The diplo vote stuff I can take care of easily, that will certainly help.

DPII: If you've got some diplo stuff that would make sense to add to BBAI, please send it along!
 
2. Any specific XML value requests?

Some options off the top of my head:
- AI value weights on food/production/gold yield on tiles
- Threshold of what's considered a good tile
- Odds thresholds for when to attack cities
- ???
Yeah, those sound good.

One of the things I was thinking about as a bit of an expansion on that would be to have something like iAICityDefensePower and iAICityAttackPower... or something along those lines in the CIV4UnitInfos.xml. These could be used to roughly measure the strength of two or more stacks.

This could provide a quick and dirty way for the AI to determine if a plot is really in danger. The presence of any enemy unit should not by itself represent a threat. On the other hand, it could also be used to convince the AI that defense of a particular tile (such as a city) is pointless and it should pull back to a more defensible location. That should probably only happen when the AI has a lot more cities and when the total attack strength is like twice as much as the city's defense strength.

3. Central planning can certainly help in a lot of places, but it's also really difficult to pull off ... my current aims are for central planning of wonders and for when to mount offensives versus stay in a defensive shell. These are simply not things that should be decided by individual cities or units.
Believe me, I understand that centralizing is a really tough nut to crack.

As for the specific buggy behavior you saw, I think it's due to an issue in CvUnitAI::AI_guardCity ... there's a bug in there somewhere causing units to cycle in and out of cities in certain circumstances, stemming I believe from whether or not the unit is considered a defender when it's in the city or not. I tried to track it down at one point, but it was elusive.
I think that in general the AI needs to kind of get over its ADD. I was playing RevDCM the other day, and I lost control of my civ for 16 turns. In that time, the AI declared war on a neighbor.. which was fine since I wanted to do it anyway... but all those attack units I'd been massing before I lost control were scattered to the winds. I had to reassemble them. What could they have possibly been doing? Where were they going?


DPII: If you've got some diplo stuff that would make sense to add to BBAI, please send it along!
In my upcoming mod, I made a number of small changes to the AI.

The diplo changes I made concern mostly adding new ContactTypes to get the AI to bring in war allies or try to get a peace treaty for wars between two other parties if the outcomes are not going to be beneficial to them. I'm not sure if this violates the mantra of no gameplay changes since these basically do add new game mechanics even if its just making the AI capable of doing things a human player already can.

The other diplo changes concern things like getting the AI to offer a peace treaty to an enemy if they've overextended themselves, and modifying the value of a resource based on how many available sources of it there are out on the diplomatic market.

I also made some small changes to the target city stuff that I think could be important. One thing I noticed is that the AI doesn't set cities owned by players they're at war with as a higher priority than another city. I think this might be one reason why the AI gets into a war sometimes and then doesn't actually seem to take any interest in prosecuting it. Another thing I changed is that the AI will now reconsider its war strategy and recalculate target cities every time it captures a new city. Normally, it only does this at the start of each turn, but I figured this might be a good idea to check every time a city is captured since in the late game, armies tend to move pretty quickly and the AI might lose the initiative by waiting until the next turn to reassess its goals.

I also added some XML stuff so that a modder can tailor a leader's unit combat preferences... so Genghis will build more Mounted units, for example. I also added some modifiers for yield weights for each leader that gets added into the existing AI weights for yields. This is probably redundant since I guess you can already use Flavors to accomplish the same thing.

When I release my mod in the next week, I'll bundle up the relevant AI source code and post it here.

EDIT:

Actually, now that I think about it, the target city feature probably needs to be revisited. I mean, if you look at the target city value function, the AI is basically picking a city that it's casting a covetous eye upon... i.e. a city that has lots of good terrain and improvements, Wonders, etc. But this isn't necessarily the most ideal city to be moving your army against. I mean, when I conquer cities, I'm concerned about a few things: How far is it? Does the city have resources the enemy needs? Will the city enable me to make use of new roads (if the captured city is likely to be completely surrounded by enemy culture I skip it)? Can I use this city as a buffer to protect my existing cities when I move my full force into it?

The AI seems to ask itself some of these questions when the unit can't reach its big rewards city, but othewise it will go after the ideal city rather than the strategic stepping stones on the way to it.
 
Yeah, those sound good.

One of the things I was thinking about as a bit of an expansion on that would be to have something like iAICityDefensePower and iAICityAttackPower... or something along those lines in the CIV4UnitInfos.xml. These could be used to roughly measure the strength of two or more stacks.

The AI has the ability to compare stack strengths already and take defensive bonuses into account, but it doesn't use it consistently ... in many places unit behavior is modified based on just a boolean check for danger. It's something I've been working on, but it exists in many places.

I think that in general the AI needs to kind of get over its ADD. I was playing RevDCM the other day, and I lost control of my civ for 16 turns. In that time, the AI declared war on a neighbor.. which was fine since I wanted to do it anyway... but all those attack units I'd been massing before I lost control were scattered to the winds. I had to reassemble them. What could they have possibly been doing? Where were they going?

This is a problem with transitions from human to AI control and back in RevDCM. Basically, when a human player builds a unit it's assigned the default UNITAI type for the unit (I think), so when the AI takes over it has a very different idea of what the role of each units is and its army has a fairly random assortment of UNITAI types. Because of the far from normal UNITAI type distribution, in this circumstance the AI will do things that are bizarre even for it ... so you really shouldn't judge the AI based on its actions in this scenario.

I put the forced AI take-over of your empire into Revolution before I learned about how the AI handles its units ... I've thought a bit about how to make the transition smoother, but it's always going to be rough. Better centralized unit role decision making would help here, but this is really a corner case that needs some special handling to make it work okay.

In my upcoming mod, I made a number of small changes to the AI.

The diplo changes I made concern mostly adding new ContactTypes to get the AI to bring in war allies or try to get a peace treaty for wars between two other parties if the outcomes are not going to be beneficial to them. I'm not sure if this violates the mantra of no gameplay changes since these basically do add new game mechanics even if its just making the AI capable of doing things a human player already can.

The other diplo changes concern things like getting the AI to offer a peace treaty to an enemy if they've overextended themselves, and modifying the value of a resource based on how many available sources of it there are out on the diplomatic market.

I also made some small changes to the target city stuff that I think could be important. One thing I noticed is that the AI doesn't set cities owned by players they're at war with as a higher priority than another city. I think this might be one reason why the AI gets into a war sometimes and then doesn't actually seem to take any interest in prosecuting it. Another thing I changed is that the AI will now reconsider its war strategy and recalculate target cities every time it captures a new city. Normally, it only does this at the start of each turn, but I figured this might be a good idea to check every time a city is captured since in the late game, armies tend to move pretty quickly and the AI might lose the initiative by waiting until the next turn to reassess its goals.

I also added some XML stuff so that a modder can tailor a leader's unit combat preferences... so Genghis will build more Mounted units, for example. I also added some modifiers for yield weights for each leader that gets added into the existing AI weights for yields. This is probably redundant since I guess you can already use Flavors to accomplish the same thing.

When I release my mod in the next week, I'll bundle up the relevant AI source code and post it here.

Sweet, I definitely look forward to checking that out.

BTW, I just finished moving the AI tech valuation code to a new function ... already found one bug, a classic copy and paste where iI should have been renamed iJ affecting AI valuation of techs enabling new religions. Small, but something.
 
The AI has the ability to compare stack strengths already and take defensive bonuses into account, but it doesn't use it consistently ... in many places unit behavior is modified based on just a boolean check for danger. It's something I've been working on, but it exists in many places.
Good to know. This is why I don't make the changes myself ;)

BTW, I just finished moving the AI tech valuation code to a new function ... already found one bug, a classic copy and paste where iI should have been renamed iJ affecting AI valuation of techs enabling new religions. Small, but something.
Wow! That was fast! Good catch too.

I think there could be a number of applications for a tech value function.
 
Here's another small request for those of us who have the SDK experience but lack the AI coding experience:

Jdog, could you maybe add more comments to the different functions and bits of code in the functions to give some of us (me :) ) a better idea of how the different things work? I'm not saying you should go line by line, but in the course of working on the mod, if you could give some more explanations on your code and any code that might be worth explaining a bit more. It would be very much appreciated.
 
I'm a bit late in this discussion, but I have some comments on the technology valuation improvements. Maybe these are already taken into account, but it's better to mention them needlessly than have them being overlooked.

The AI should not follow a predictable tech tree path. One of the major weaknesses of an AI is that after a few games, the human player will be able to predict many of its moves. The technology choices are one of the major choices that the AI makes in a game and they should thus not be predictable. A predictable AI tech path will make technology trading far easier for the human player as it should be and will enable the human player to predict how long it will take an AI to choose a certain crucial military technology. So I would suggest to multiply the technology valuations with some random factor when the AI is choosing a technology so that its choice of technology wouldn't become predictable. Of course the random factor shouldn't be dominant in the algorithm, but it should be influential enough to limit preditability.

Also make sure that AI tech valuation are adjusted for research cost. It's not a really good move for the AI to research a technology that's twice as valuable when it costs 10 times as much time to research it.
 
Here's another small request for those of us who have the SDK experience but lack the AI coding experience:

Jdog, could you maybe add more comments to the different functions and bits of code in the functions to give some of us (me :) ) a better idea of how the different things work? I'm not saying you should go line by line, but in the course of working on the mod, if you could give some more explanations on your code and any code that might be worth explaining a bit more. It would be very much appreciated.

I thought Xienwold's Idiot Guild to XML could be a good place to start? Personally, I think we should give Xienwolf encouragement to continue working on that guide as it is still incomplete. I will LOVE! that guide when it is completed because it can accelerate my learning process after I read through my C++ book (C++ Primer Plus).
 
Here's another small request for those of us who have the SDK experience but lack the AI coding experience:

Jdog, could you maybe add more comments to the different functions and bits of code in the functions to give some of us (me :) ) a better idea of how the different things work? I'm not saying you should go line by line, but in the course of working on the mod, if you could give some more explanations on your code and any code that might be worth explaining a bit more. It would be very much appreciated.

I'll try to leave more comments ... specifically bigger picture this is how this part works kind of comments. If you have specific parts you want commented, ask ... I'll probably just comment on the pieces I'm working on at the moment.

We could also start doing doxygen comments in front of functions ... that could be pretty useful even before the comments are added as it will create an HTML browse able documentation showing what calls what.

Hmmm ...

I'm a bit late in this discussion, but I have some comments on the technology valuation improvements. Maybe these are already taken into account, but it's better to mention them needlessly than have them being overlooked.

The AI should not follow a predictable tech tree path. One of the major weaknesses of an AI is that after a few games, the human player will be able to predict many of its moves. The technology choices are one of the major choices that the AI makes in a game and they should thus not be predictable. A predictable AI tech path will make technology trading far easier for the human player as it should be and will enable the human player to predict how long it will take an AI to choose a certain crucial military technology. So I would suggest to multiply the technology valuations with some random factor when the AI is choosing a technology so that its choice of technology wouldn't become predictable. Of course the random factor shouldn't be dominant in the algorithm, but it should be influential enough to limit preditability.

Also make sure that AI tech valuation are adjusted for research cost. It's not a really good move for the AI to research a technology that's twice as valuable when it costs 10 times as much time to research it.

One thing I'm planning to do is rework the randomness model for tech selection. Right now, an iValue is calculated for each tech and there are a couple of random additions to this value. The tech with the highest iValue is then selected.

This approach has several drawbacks: 1) The true perceived value of the tech is not available without randomness, as such it is much harder to debug or verify; 2) Setting the appropriate level of randomness is guesswork; 3) Any substantial change to the valuation math means the randomness levels need to be re-checked.

Instead, I intend to switch to a model where a non-random value is computed for each tech and these values are then used as weightings to pick a tech randomly. In essence, if there are three possible techs with weightings A, B, and C, then the AI would pick the first tech with probability A / (A + B + C).

There are of course many ways to very this ... only consider techs which are at least 1/X as valued as the most valued, subtract 1/X of the highest value from each value before doing the weightings, etc. The exact formula will need to be setup to get the right balance between going for higher value techs and being non-predictable, but I think this randomness model will produce results that are easier to understand and tweak.

Also, the valuations will definitely consider both the benefit and the cost of the tech, Firaxis has this in their mechanism already. Good of you to make sure this is in there Roland!
 
When tech trading is available the AI should certainly aim to research techs that it can trade effectively. One way to do this is to increase the randomness of its selection. However, it might be better to increase the weighting the AI gives to avoiding technologies that are already known to another civ, or are currently being researched by another civ.

When tech trading is not available, I don't think the AI would benefit much from a more random research choice. If beelining Bronze Working is the best opening option, it should go do that.
 
Top Bottom