Work log on AI for this weekend.
1) Adjust AI strategy for when g_pGalaxy->abGameOptions[GAME_OPTION_DISABLE_TECH_TRADING] == TRUE
2) Regarding speed of ships. Player ignusss writes:
This is now my understanding of how the AI uses his different military shipclasses:
Tiny:
Fighter: No engines. Attacker.
Small:
Defender: No engines. Defending planets.
Heavy Fighter: No engines. Attacker.
Escort: Multiple engines (often see them with two). Defending transports.
Medium:
Frigate: 0-1 engines. Attacker.
Cruiser: 0 engines (at least I don't remember having seen any). Attacker? Defender? Maybe both?
Large:
Battleship: 1 engine (haven't seen any with no engines yet). Attacker.
No engines on defender is IMO fine. I have no opinion on no engines on fighter because I never build those. Heavy fighter would benefit from an engine though since the AI otherwise wouldn't have any fast attack ships before Medium hulls. Cruisers are okay as planetattackers if they have faster attackers screening their advance, would also be good defenders, otherwise probably not much use.
Now frigates should IMO always have one extra engine but they don't.
Here are the Drengins different generations of frigates that I could see in my current game (he has lots of old ships left as you can see):
gen. weapons. defense. speed
M2-2. missile+2.
M2-11. mass+2. 1*warp=+3
M3-4. mass+3
M4-1. beam+6. armor+1. 1*warp=+3
M4-10. mass+4. armor+1,shields+1. 1*warp=+3
M5-3. mass+5,beam+2. shields+2
M6-2. missile+8,beam+4. shields+2
M7-1. missile+12,mass+1. armor+2. 1*warp=+3
Sometimes he skips the extra engine in favour of more weapons/defense which is dumb if I'm correct about cruisers, because then it becomes identical to one.
I've noticed that the Terrans in the same game builds incredible many frigates, almost exclusive. This makes them IMO much more dangerous than the Drengin whom also builds lots of heavy fighters and cruisers. Even though the terrans military is much smaller.
And the terrans frigate M7-2 is so much fun
mass+24 (3 nanorippers) armor+2 speed+3
Almost as good as my best medium hull, the Death Dealer:
beam+24 (2 psyonic beam), armor+2, speed+6
I also noticed something odd with Drengins latest transport M5-3. It has 3 ion drives, 3 adv. troop mods and 1 extended support. It could have had 3 warp drives instead of the ion drives because they are both size 10 on a cargo hull which would have made his transports 6 parsecs faster per turn.
This is a good analysis overall of the AI's typical design desisions. He also notes how different AIs have different strategies. The Terran Alliance tends to go for larger, but fewer, ships.
The issue isn't so much the need for extra engines but better engine technology sot hat the engines aren't so big. That's what I'm going to be testing.
3) Regarding planet use: Brillig writes:
Planet utilization:
The AI should place much higher priority on putting the appropriate building on special tiles. I would argue that nothing, no Galactic Wonder/Trade Good/Super Project is better than having a factory on a 700% bonus production tile, for example. The same for a 700% research tile (although I've never seen one). With regard to 300% tiles, the difference is a little softer. Personally, I would never put anything but the appropriate building on one of these tiles either (except for the food bonus tile).
I think the AI should begin to keep track of a parameter which I call the "state of colonization". This refers to how much of the galaxy has been claimed - it should be possible to come up with an AI estimate for this even without cheating based on using the galaxy map to look at influence.
No manufacturing/economic/research capital should ever be built on a poor (low PQ) world. As Brad said the AI isn't scripted, I believe it should be able to project, based on it's current situation, how the worlds under it's control will look like when fully developed. It should place the capitals based on that projection, with the likelyhood of actually doing the construction based on how close the "state of colonization" is to complete. Once a capital is built, the AI should have a bias toward building the appropriate structures (e.g. factories for a manufacturing capital) on that world. A small bias is probably fine, I don't think we need to see a fourteen factory+manufacturing capital world.
I agree with this. However, I'm constrained by the APIs I have. For instance, if the AI is putting super projects on 700% production tiles, then that's a bug. That should never happen. The only time a super project or whatever might go on a special tile might be on a food tile.
But since people are seeing this, I'm putting in checks to try to understand why that would happen.
4) Regarding starbase placement.
Different AIs have very very different ways of handling their starbases. Some of them are not nearly as good as others. The Terran Alliance probably has the most sophisticated AI for handling this at this time. I'm going to be improving all this and trying to upgrade the other AI players as well.
Hopefully we'll see a much more effective use of starbases.
5) Tech Researching.
Each AI has its own values on what should be researched. Based on feedback, I'm going to be adjusting these and seeing how much things improve in AI vs. AI games. This is going to be time consuming though to since what is the best techs and what order is tough. Moreover since the AI isn't scripted, there is no "Research this, then this, then this." Ironically, sentient human players are more likely to have scripted "research build orders" than the computer players. Hopefully, human players will start putting their brain SDKs available for download.
6) AI fleet organization and concentration
I'm going to upgrade a couple of the AIs to send their fleets on patrol of their territory. This should spread our their forces a bit and make them less vulnerable to human player tactics.
7) Working on AI to be better at dealing with enemy starbases. One of the things that some people need to recognize about AI development is that it's easy to sit there and say "They AI should take out those military starbases." Well Duh. But in the AI code, I'm dealing with weightings, numbers, priorities, and APIs that have to interpret my preferences. For instance, as the AI designer, I want the AI to go after those starbases. And I want the AI to recognize that it may have to sacrifice ships to wear it down. But at the same time, I don't want a death train of ships uselessly hitting a starbase either. So much of what's been mentioned are things I agree with, it's just a matter of tweaking it so that it does it more.
So if I say if(pShip->IsStarBase) ulAttackPriority*=1.25 and that's not enough to get it to go after starbases effectively then it's a matter of chyanging it to say 1.50 or 2.0.
Now before someone asks, no, we can't just have a file of weightings that people coudl tweak themselves. I mean, yes, we could, but it would take a lot of time and different AI personalities have different methods. You'd end up with a situation where you'd be choosing between getting aI updates from us or relying on modders and my not so humble opinion is that you're probably better off with me doing the updates than relying on modders teaking values on a static AI. After all, if I realize something's amiss, I can create new code to deal with it.