Modular Tactics Feature

Eunomiac

Chieftain
Joined
Sep 27, 2007
Messages
87
Location
Toronto, Canada
I've heard Civ IV described as a balancing act between a sequence of mini-goals: "I need to get Code of Laws to rescue my economy," or "I'm going to bulb Paper and Philosophy for early Liberalism." Though I don't know much about the nuts-and-bolts of AI coding, I assume that some of this thinking is already implemented — definitely in the context of Limited/Total Wars, at least ("I need to gear up for total war with X.")

Here's an idea — how difficult would it be to program in a modular aspect to Better AI, enabling independent, community creation of a host of discrete "Tactics" that could be tested or discarded independently of each other? For example, someone could write up a "prioritize pillaging" Tactic that encourages the AI to make and use pillaging stacks during war, perhaps even including specifics like how to move them and what improvements to target first.

The worst-case scenario (that I can think of) may require programming a rudimentary high-level language with which these tactics could then be written, and perhaps even a front-end "loader" to import and compile the Tactics modules into the AI code. But even then, if this language/vocabulary started very simply and grew over time as people requested new features, could it be doable? I perceive significant benefits:

First, the discrete nature of these individual Tactics would encourage others to tweak them or come up with new variations, and thus increase the direct involvement of more amateur programmers. I'm sure there are a lot of interested people like me who have good ideas, but no idea how to get our hands dirty with the AI code as it now stands. I'd be much more confident of my ability to figure out how a shorter, bite-sized Tactic was programmed, and then bring some of my Civ-IV-playing know-how to the AI's toolkit.

Second, this transparency would improve the community's ability to recognize which Tactics were the best, thus harnessing a bit of the awesome power of Darwinian collaboration. These Tactics could be made a permanent part of future Better AI builds, and could be scaled for difficulty: the most evil Tactics shouldn't appear until the player is ready for them. One day it may even be possible to sideline conventional AI handicaps to the point where leaps in difficulty level become noticeable through the increased appearance of better Tactics, and not an extra Worker.

Anyone out there think this is as possible as it is worth looking into?
 
harrrrrr then we could see the AI capturing your worker in the first rounds. :goodjob:
 
Ooh, another benefit:

Third: Modders could program Tactics to adapt AI behavior to the changes they've made in their mod. So, if I modded espionage to give a chance of spotting massive SoD's moving under the fog of war, then I could also write a Tactic teaching the AI to move its units in multiple, smaller stacks to avoid detection.
 
Top Bottom