Help to fix the AI

Colonel

Pax Nostra est Professionis
Joined
May 18, 2004
Messages
4,254
Location
USA
Ok, every always has the complaint that the AI is either cheap if you are on higher levels and stupid once you hit below monarch or warlord. You all have heard or made many complaints about how the AI has no real idea what to do only to react to your moves wether defensive or aggressive, with the occasionial AI wars (which become more fequent as you get to higher levels.) So what is it that I suggest, first get rid of diffcultly levels, and fix the AI to one setting, as that is also a big problem adjusting the AI according to diffculty. Secondly give the AIs long term strategies which would be devolped and modified each turn. Now what exactly does this mean, simply that if a war breaks out their going to devolpe a plan of attack as if they were human wether it be sea or land attack, they are going to always at the least put 50-75% of their total forces into what ever attack they devolped. Now during peace time what would be a long term strategy could peaceful or warlike. They would devolpe objectives, for instance they need a pensiula which is controlled by you. They will defend you-their borders, and focus all efforts to conquering that area wether it be cultrual, economically, or militarially.

I hope everyone somewhat understands what I am trying to get, if not I can always elaborate further.......
 
I think everyone would love an AI that plans long term strategies.

But aside from a few specific examples put in human terms...

... it's hard to know -- algorithmically -- how this would work. And if it's even feasible.
 
It will be very interesting to see how much of Civ4's AI Soren exposes to Python.

I've heard more than one programmer come out with words to the effect "Quit b******g about the AI on the forums and write one yourself."
 
There's been a lot of discussions about the AI in the past months.

Here are a few threads I found interesting:

Unit Trading
http://forums.civfanatics.com/showthread.php?t=95148

http://forums.civfanatics.com/showthread.php?t=111941
Two threads Discussing whether unit trading should be allowed. This naturally moved to the topic of AI mechanics, limitations etc.

Civ4 AI requests
http://forums.civfanatics.com/showthread.php?t=94925
My own thread on AI. The discussion moved into interesting directions in the later pages.

AI discussion
http://forums.civfanatics.com/showthread.php?t=111132
DH_epic started this thread and we had a nice discussion about how the AI should function, a large part dealt with forecasting models and somehow giving the AI the capacity to forecast variables.

Yeah, all the threads involve me in it. But since most Civ4 discussion are about dicrete details and AI isn't really dealt with head on, I picked these threads as the interesting ones. Obviously, every new feature discussed in this board probably have some AI implications.
 
Let us mod the AI
We can create better rules and algorithms for the AI.

Maybe it could start as our AI for city governors, so we could reduce micromanagement ourselves with our own strategies. Then we could give our algorithms to computer players, or let other players download our AI scripts and try them out for themselves and then modify them even more.

Let the AI learn... this is probably dumb, you play a game out, the AI sees you win then you play against yourself next time... Unless there was some central AI computer on the internet and it adapts the best strategies from other players around the world and can employ long games, short games, conquest games, tech games etc.

... but this central computer would control all the Civ 4 Artificial intelligence systems around the world... what if it realized that humans were spending too much time on CIV and created a super cheat mode where it wins in 5 turns or less everytime so that we don't waste our lives on the computeres, and then all the robots start attacking humans but really they're out to protect humans eventhough it appears they are breaking the 3 laws...
 
The idea of the AI learning is probably good... but more in the method of updates to the AI are based on algorithms that have been compiled by players

ie
Gameplay Version/update X comes out
strategies developed
strategies compared and compiled
strategies algorithmized
AI update for Version/update X comes out

If the AI is on Python, then only the first and last step really need to be done by the game company (of course they also have to ask the game designers, do we want this type of play to be what people do, should we make gameplay changes to change what the dominant strategies are, UI changes to simplify them, etc.)
 
The Empire Earth 2 guys are quite proud of their AI. In an interview the developer says the computer does not cheat at any level. To make this work, no matter what is happening, the AI is constantly calculating options. I guess normally the AI only gets its turn to do this, but in Empire Earth 2 it never stops, allowing it to "choose, react to you and refine" its plans. Its a drain on the CPU, but with CPUs having gotten so fast and so much being moved to the GPU, they can make it work.

I couldnt find the link... will keep looking
 
As far as I have understood it, Python is just a means to change the parameters which are used in certain algorithms.
If this is right, then we will have limited options to change the AI.

On the other hand, if they could realise (I'm too less a programmer - nor do I know enough about HTML and Python - to judge if this is possible) some kind of "AI modules", we could have the chance to "re-program" those modules and by that to change AI's behaviour.
This obviously would be the "camino royal" from a player's perspectice, as we could exchange various modules then and by that create a better AI.

But I have some doubts that they really would do so, as this in principle would set an end on the Civ franchise.
 
I just fail to see how suggestions like "make an AI that plans" or "make an AI that learns" really help the situation. That's like saying "make graphics that are realistic" or "make game play that lets you do anything!" Any game designer would use these as sensible goals, but the trouble is with the details, let alone if it's feasible at all.
 
the AI could learn... have a gigantic neural network that learns from the players.

I'm not sure what this python thing is... I guess I'll google it later. It constantly changes the AI so that you can't nail it down?

here's what I'd like to see, I'm not sure if anyone has quite said it yet:

Everytime you win a game, the computer looks as your game and writes some similar AI code and sends it to some central Firaxis server. This server gets filled with many winning game strategies.

Then you play your next single player game against several civilizations and the computer goes online and selects a few of the strategies in the database. One for each civ, even choose a conquest strategy, a diplomatic and space-race etc. So it would be like playing against the ghosts of other human players.

I don't know if AI can do this. There are too many variables, the AI probably wouldn't be able to use a given strategy unless all the conditions were the same. But the AI could at least learn little tips along the way like when to break treaties, what build or tech tree priorities to set, maybe not overall troop placements. But that could work too, maybe what units to include in a stack, using a blitzkreig kind of offence rather than slow but defensive troops.. yadda yadda.
 
That assumes that online access will be a system requirement for Civ, but it's an interesting idea.

The problem is that of relevence, though -- computers have no way of framing the example in terms of a simple lesson. Why was it that I failed? Army size? Army technology? Number of cities in the ancient age? Lack of killer instinct? Too aggressive? Will changing any of those necessarily improve the AI's shot at victory next game?

Learning isn't automatic... you'd almost need an AI programmer sitting there, waiting for these games to be uploaded and trying to analyze them with a human mind.
 
You could sitll create a fairly dynamic and interesting AI by making them unpredictable.

The Civ3 AI achieves this by running the RNG on a few key decisions they make. For example, propensity to declare war is not entirely a rational decision for them as there is a random element to it. I'm sure there are others but that's the thing that pops into my head at the moment.

However, all these decisions are at the macro level and fairly limited at that. at the unit level, the AI becomes fairly predictable to the point of exploitation. It would not be very difficult to introduce this random element into unit level movements so that if you empty your city, for example, to bait an AI army, it may in fact not take the bait, attack your stacks outside the city and potentially give you even more grief by destroying your units outside the city and leaving your bait city truly defenseless.

Alternatively, it could simply move away into a defensive position and refuse to take the bait.

What this requires is more coding, yes, more rules for the Ai to follow. But we are still working on a rule based AI. It does not need to have a revolutionary thinking engine. The AI will simply be governed by a mixture of rule based behavior and a random number generator that gives it a chance of taking differents paths at key decision junctions. The weight of this RNG could be made large or small as a balance issue. If it is found the AI behaves too irrationally, its weight in decision criterias might be reduced. But what I'm proposing is essentially a cheap way to make the AI interesting and more human like (humans are afterall predictable as well, but we can very unpredictable at times) without really creating massive matrices that require a pentium 5 20ghz machine to run.


Edit: Regarding the database system for a learning AI. Regardless of how moddable Python is, I doubt the community can truly be working at a level or coding new strategies for the AI. I may be wrong, but the most common community AI fixes may be to enhance AI decision making, making them 'smarter' about certain things and adapting the AI to popular human strategies.

For the AI to acquire new libraries of strategies, would require support from Firaxis. what would be interesting would be to separate AI updates from the patches. Have an on-line machanism that connects to Firaxis servers to download a monthly or bi-monthly AI upgrade with various new stragies.
 
Back
Top Bottom