Community Project: AI Revamp.

The AI wasn't a priority for Firaxis at all as they have stated themselves.

That's not saying very much, seems the only priority they had was shipping the game.
 
if you want a consistently quality AI, the chart should be more like 100%, 100%, 95%, 50%, 5%, 0%, 0% if it's a mirror map with mirror civs. there is just no reason why the same player should ever lose easiest and have a chance at winning on hardest. this is civ, not poker

i suggest you find ways to tweak how the AI cheats so that it's still fun on harder difficulty levels. for example, a huge production boost might make it impossible for humans to get a wonder, which removes an entire aspect of the game. maybe replace that with something that assists the AI in a weak area like combat (cheaper barracks, additional unit line of sight, free promotions, etc.)

obviously it's better if the AI was actually competent, but that needs someone who is good at deconstructing strategic decision-making, good at programming (as well as performance), and willing to work for free. if you want the AI to be fun and interesting in addition to competent, you probably need someone who is good at game design as well.

if the end result really was an AI that knew how to play and was fast enough at making moves, maybe people would be interested. but the best-case scenario end result is probably going to be an AI that will still need to cheat to compete against any humans who has a basic mastery of the game mechanics.

at the end of the day you still need to solve the game design problem of how to cheat 'properly'. That's why I suggest you start with that, and treat any actual AI improvements as a bonus

i don't know if trying to follow build orders will work well. it's something that works great in a Starcraft AI, but I don't know how useful it would be in a general-purpose civ5 AI.
 
I think the AI being able to recognize what sort of hand it's dealt and properly play that hand would set everyone back a difficulty level.
 
I'm wondering if giving AI free promotions per era would help?

Speaking from experience, the AI cannot handle "experience farming" and knowing when to stop attacking - these are the big killers in a game with powerful promotions like range, logistics and march. Sometimes it will park a ranged unit or two in difficult terrain and defend well from there (racking up to a fourth promotion!), but these are anomalies at best and eventually the AI will do something really oddball (like shove a unit or two into the water guarded by your naval units, for no cost benefit)

And indeed, I'm necroing tis thread for personal reasons and to see if anyone else is still interested in this fine idea?
 
Hi Smallfish
Here's a mod that improves the AI's city attack plus other things.

I think from what I could see <experience percent> should be positive but I don't know by how much.

I would be interested to see if you think the AI's city attack is more potent. Every single military unit from melee/ranged/seige get +25% verses cities so it should be pretty potent.

Also not sure what the effect of the free pillage move is either.

Cheers
Glider
 
And indeed, I'm necroing tis thread for personal reasons and to see if anyone else is still interested in this fine idea?

Not many, it appears. :(

I'm wondering if giving AI free promotions per era would help?

I'm not quite getting if the goal here is to improve the AI or to make the perfect difficulty curve. Giving the AI more free bonuses isn't really an AI enhancement project... Much more interesting in my mind would be maintaining the current curve while reducing AI bonuses, and for me the most crucial area to improve to achieve that is the tactical AI.

So if I were to stick with the plan...

Identify. Identify current AI behavior, either by looking through code or playtesting. Document it. Preferrably by posting it here for the world to see.

To realistically suggest enhancements to the tactical AI, I think the first order of business is getting a bit of an overview of how it is implemented. I remember looking around a bit when the dll source was made available and if I recall, it's a two step process involving creating a tactical map from an AI's viewpoint (I'm guessing that it computes a bunch of "tactical properties" for each tile) and then some decision procedure giving concrete missions to the individual units based on what the map says. Has anyone looked into this? I think we need a "master diagram" of the full process before guessing at how it can be improved. I'll look into it again more in depth and post my findings back here.

Now I just hope this thread won't just sink down into oblivion once more :)
 
I'm very excited about this ... in theory. But the fact is, I can only handle one obsession at a time, and that is currently my own mod. Someone in particular is going to have to become obsessed with this to make it happen.

Whoever that is, I'd suggest they go for "low hanging fruit" first. There is a lot of that. (Tactical AI is high hanging fruit, albeit very large fruit.) But the sort of person that can make this happen is the sort that ignores advice and discussion for the most part and just does it.

The only useful "community" effort that I see as realistic is: one person is passionate about tactical AI (so does that); another person is passionate about smarter AI trading (so does that); another person is passionate about giving AI some context awareness for victory strategy (so does that); and so on. I'll happily throw out suggestions but anyone actually doing the work should ignore me.

(I agree that fine tuning difficulty handicaps &#8800; AI.)
 
Pazyryk, Hambil, Gedemon, whoward69, and any C++ Modder intersted in Civilization V Modding, I don't care if you are helped by a flying unicorn... Please, code a decent AI :cry: ;)

With a Great, Very Helpful Sugestion, with lots of Grammar Errors,

Genghis.Khan
 
The biggest problem (IMHO) with the current AI is that at high levels it basically takes wonders completely out of the game, removing a huge chunk of gameplay for the user. Sure, you can still win (watch the youtubes) but, I don't even want to play at that point. I love my wonders.

Edited to add: The biggest problem from a user/design stand point. If you have to win by basically disabling an entire area of your gameplay for human players, it's going to have a high cost in fun. After all, you made that area of game play for a reason. My goal (one of them) would be a tactical AI that doesn't need to do that - perhaps because it does other things better?
 
Tactical AI is high hanging fruit, albeit very large fruit

Very high hanging IMHO. Tactical AI is heavily reliant on the path-finding code and it's taken me about 5 months to get to a point where I feel confident to mod that.

To give this some perspective, the promotions to cross mountains and oceans touch the path finder at one point only, the code to cross ice touches it at 32, adding in the deep-water embarkation stuff for hovering units (which is an extension of ice-crossing) adds another 16 touch points - and that's ignoring all the code to actually enable the promotion features for units.

A group effort just won't work. As Pazyryk says, such major mods to the AI are going to take focused, blinkered, caffine fueled, obsessive effort from one or two individuals with the drive, time and passion to "make it so Number 1"
 
Whoever that is, I'd suggest they go for "low hanging fruit" first. There is a lot of that. (Tactical AI is high hanging fruit, albeit very large fruit.)

Well, it's a big piece of code, but it looks relatively flexible and my hope is that, with a basic understanding of the overall process, some improvements can be made by just fiddling with some parameters and conditions.

For instance, I fell upon this pretty quickly in the expansion dll:

Code:
void CvTacticalAnalysisMap::SetTargetFlankBonusCells(CvPlot *pTarget)
{
	CvPlot *pLoopPlot;
	int iPlotIndex;

	// No flank attacks on units at sea (where all combat is bombards)
	if (pTarget->isWater())
	{
		return;
	}

I feel dumb for barely knowing the rules but this is no longer true in G&K, right?
 
Path finding code is probably the hardest code in the game. I'd think there are a lot of AI smarts that could be added without getting into path finding and unit manipulation. As already mentioned, trading. Or diplomacy, or build priorities, or small tweaks to logic like proposed above.

Let the big boys with big dollars do the path finding IMHO.
 
All the AI Tactical code has to work out how to get units into place first, which requires an understanding of the path finding code. And AStar is a well documented and published algorithm - shame Firaxis have butchered it so much.
 
Redox wrote a Lua implementation of AStar. It didn't look that complex to me. Did Firaxis use a different algorithm?

Just curious, is it a "simple" AI mod to get a unit to look around after each move, rather than once per turn? Would this allow archers to move & shoot? (Or is my question misinformed?)
 
Redox wrote a Lua implementation of AStar. It didn't look that complex to me. Did Firaxis use a different algorithm?

AStar isn't a complex algorithm. It's what Firaxis have done to it - layer upon layer upon layer upon fix/tweak/fudge for years!

From the CvAStar.ccp file
Code:
//  AUTHOR:  Casey O'Toole  --  8/27/2002
//  MOD:     Brian Wade     --  5/20/2008
//  MOD:     Ed Beach       --  4/16/2009 moved into CvGameCoreDLL

To use a Unix idiom

Q: How do I fix this to do that?
A: 1,$d
 
Back
Top Bottom