Sorry for being so inactive in the here, having a huge project at school and exams as well. However when it is finished (around next week), I will be able to contribute more.
About genetic algorithms is an interesting approach. Having a huge interest in artificial life my self and a bit experience with this. However it might be a bit overkill to have an exact GA. Maybe we should drive toward some dynamic programming instead, or EP, maybe GP, or even a neural network
however it is not important what we end up with, as long as the AI becomes 500½ % better at decision making and playing the game, so you, as a human player, would get an equal match, without the AI cheating by getting unfair help (practicallymaking multiplayer obsolete
).
Back to main point:the AI needs major rework on all areas. And I think could be a way to go is a top-down approach on this.
(OBS.: he is generic for both he/she/it
)
I mean that the AI need to make high level (long term) decisions, and going down the levels/layers, down to simple direct decision like unit movement and city production/specialist etc. For example the AI decides that (Overall goal) "I should dominate this continent by 1500 AD", then at the immediate goal layer it decides "I will build up my army so I can attack Ceasar", then at city level it should ask the question "What should I produce in this city if, I would like to fulfill my immediate goal, giving the situation my: empire is in and the city itself is in." etc. etc. down to unit level.
The Overall goal and immediate goal should not be revised, unless something drastic happens, like the finding of a new uninhabited continent (maybe overall goal here) or someone is near completion of the spaceship (both overall and immediate goal), or declaration of war (immediate goal changes). We can make as many layers as we think is needed. The low levels, should be revised, not necessarily changed, but evaluated again, each turn or every second turn. Very lowlevel may need to be evaluted more than once, each turn (as stated in above posts).
General:
The higher the decision level is, the more abstract it is in terms of actions, and is more influenced by the leader. And vice versa. The lower the level, the more concrete it is, in terms of actions, meaning it can be directly translated into an action in the game (move unit from x to y for example), while this is more influenced by higher levels, other decisions, the world around it etc.
It is important with the top-down approach, that information, decisions and factors propagate up and down in the system. So another players city placement (losing a valuable resource for instance), would propagate up to the war decision layer(and thereby the immediate goal layer or something), and instead of a purely random factor decides war or peace, it should incorporate much more factors, so it would seem both more realistic, but also unpredictable, so exploits would be rare or extremely hard for the player to take advantage of (applies to all layers).
A comment on war:
Instead of just having the AI going toward the nearest city in war, it could do several things instead, based on a lot of factors. Like: if the AI determines that a defensive war is better (because conquering cities, having better defensive units, technology level etc.) then it would not attack, may at the most probing with a few units. Based on leader personality, he could move all his offensive units through the land and pillage all he can, or he could go against the nearest city, or split his army in two, attacking two different targets, and/or use sea transporters to sail around and attack from the rear (and not only 2 units...), eventually the AI could scout with spies, missionaries etc. before declaring war and determine his attack plan. And I could go on and on.
In addition the AI needs to know when he is heavily losing. Right now only success is record for the player and the AI, so having a success of 0, doesnt really meaning that it goes decent, and likewise with a success of 50 or 100, if the AI have lost all but one city, then he still thinks has some kind of success.
(Check AI_endWarVal in CvTeamAI)
I know this post is a bit ...Random?? and hard to understand, however I am very busy and only wanted to comment quick.
I will try to come up with a more concrete system later. Please comment if you understand my post
(Edited for clarification, spelling mistakes and random babble)