 |
|  |
 |
|  |
 |
|
BureauBert
|
 |
Vienna, Europe
Apr 2003 time: 06:37
|
|
This is not a reply to self but a reply to Solver's question in the other thread :
quote: Bert, how safe do you imagine is that Frenzy code? That is, does it provide a real improvement to AI (as intended and, to a degree, it worked), but without the problem of never going to peace once it attacks? |
In terms of stacking and moving armies towards a selected enemy's cities it does basically the same as Frenzy 1.x, Pedrunn also added a similar navy code. The major improvement Pedrunn introduced is that the AI will select it's 'worst enemy' by diplomatic regard and it will not simply move its 'frenzy armies' towards the nearest HUMAN's cities. More detailed: Basically the player with the lowest effective regard will be an AI's worst enemy, if the regard towards all 'regular' civs is greater than 500 (this could probably be tweaked - 'hot war' level is 100) good old barbs will be the AI's worst enemy. The AI will then stack and move their frenzy armies (navies) towards their worst enemy's MostAtRiskCity. The AI will re-select their worst enemy and re-task their armies each turn. Therefore they will stop throwing their armies against another player's targets if this player could manage to increase his regard by diplomatic means, they will attack their new 'worst enemy's' targets instead (the barbs if all other players are above 500 in regard).
quote: Another thing I'm pondering is city attack focus, sometimes maybe the AI hesitates a bit in attacking cities... |
Another improvement (also by Pedrunn, he really merits the main credit for this script - I am more or less just republishing it): The AI's 'frenzy armies' will not only attack cities but also other armies/units they encounter on their way.
An additional experiment added by myself: TaskOne: Recapture. If a city is taken (and is not an undersea city, that's what throws those unnecessary SLIC-errors) the AI will do it's best to recapture that city, specially if the city has been the capital.
When I had nearly all SLIC working for my over-SLIC'ed modding project I had the impression that this script works pretty well. At least I could see AI's armies consequently attacking not only myself but other AI's, too. And I am pretty sure they did it with their 'frenzy armies' since they threw one, two, three armies against one of their 'worst enemy's' cities and these armies continued moving towards another of their 'worst enemy's' cities once they had conquered a city.
One problem is that a frenzy army stays 'frenzy' as long as it stays valid (alive) and continues moving towards the next target selected. Therefore the conquering frenzy army will not garrison the conquered city and it will transform from a 'frenzy' to a 'harakiri'-army by the time. This is an aspect I should eventually take care of.
But actually in my project it is somtimes difficult to tell which AI-AID-script does exactly what since I am aiming to collect, modify and integrate into a consistent framework most of the well-known scripts around (apart from adding some own stuff eventually ). As for AI tactics I am among others also using Martin Gühmann's BetterAI code and Locutus' ClearOrders script experimenting with applying different tactical concepts during different stages of the game resp. in different situations. I have listed all scripts I am trying to integrate so far here .
Concerning the 'frenzy'-part: My idea is using this tactics in later stages of the game when more units are around and the AI already manages to stack them thanks to BetterAI. In this situation the 'frenzy' armies should really just form the most efficient conquering forces to maintain major campaigns against selected targets. With more armies around as 'backup forces' e.g. the problem of 'frenzy' armies not caring for keeping the conquered cities should become somewhat less important (but this aspect should be covered in a 2.3-version nonetheless).
For the moment I'd like to get the present version out of beta-stage and therefore I'd be glad if more people would like to test this script since I believe that it has its merits and can still be improved and used in some context with other AI-tactics.
|
|
|  |
 |
|
Solver
|
|
Apolyton Duke Of Something
|
 |
Latvia, Riga
Sep 2000 time: 07:37
|
|
I'm going to test that, sounds very good. I have had a situation last night when I took two English cities, but they had far larger military. OK, they eliminated my attack force, put 40 Tanks outside Liverpool, and only attacked it with its two defensive units several turns later...
Anyway, an AI that retakes cities is always better. And while I agree with Hex that focusing on human player gives the challenge, but I really dislike it when the AI does so. It doesn't give the same feeling when AIs gang up on you - it's so Civ2, when you play a game against n AI civs. I want to play a game where the AIs actually fight among themsleves as well, so I certainly will love increased AI focus on any enemy.
While waiting for 2.3... this will be a welcome addition to my playtesting games .
|
|
|  |
 |
|
Solver
|
|
Apolyton Duke Of Something
|
 |
Latvia, Riga
Sep 2000 time: 07:37
|
|
Something I need to post, my two desires for an AI script. Just wishes, but can't resist posting .
1. Air unit stacking. Sometimes the AI will attack your air units with his air units, or your ships with planes, but it doesn't seem to stack Bombers with other Bombers or other planes. This shouldn' be *too* hard to implement.
2. Hard to implement, but a definite wish - invasions overseas. AI does build and send transport ships, that's good. Sometimes it sends empty ships - what for? And sometimes it won't load em with proper units, like sending just 1 cavalry in a troop ship. Another time he will do it fine and send 5 Tanks. Anyway, a desire for a script that would let AI coordinate assaults overseas would be great. Note that it has some of that funcionality with Martin's AI files, but he never published another of the AI scripts he was working for.
|
|
|  |
 |
|
Solver
|
|
Apolyton Duke Of Something
|
 |
Latvia, Riga
Sep 2000 time: 07:37
|
|
I definitely thing you should post it. In my spare time, I am playtesting the game with the latest build, and I always want a good AI . Besides, modern age is my favorite part of the game, and that's where the ability to stack air units or launch a surprise attack with even one troop ship is crucial.
Currently, if no AI is on my landmass, I know I'm safe in modren even with one Infantryman in each city - the AI just won't drop many forces.
What's your problem exactly with cargo size? You get the units in ships and what? You can't determine if it's full, or? Hmm, maybe we need a CargoSize() SLIC function added .
Anyway, I'd be glad if you posted the script so I could add it to my playtest config.
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:37
|
|
quote: Originally posted by Solver
OK, that all sounds good. Determening when the ships are full is easy with the new SLIC functions, so I can't see why wouldn't you post the script so someone could improve it and get it it completed, like Bert, as said!
Come on, do so . |
You should give me some time to put it together.
However it is some kind of GoodMod, something beyond version 1.0. The files are for CTP2 v. 1.1 Activisions original patch, therefore I did not removed the soundfix slic and moved it into the tileimp.txt, terrain.txt is also the original version, and of course a lot of strings for the playtest version are missing. const.txt should need some modification to make it work with our playtest version. I tweaked a little bit the unit.txt so that is now true tanks != super weapon. The government determination code doesn't work without a modified govern.txt, the strategies.slc needs an modified strategies.txt but it keeps the AI from settleing and conquering when it has gone over the city limit. I didn't check if I disabled frenzy and player1's pw cheat, frenzy and pwcheat should be disabled and I think the modifications are only in place for GoodMod for ApolytonPack, so don't expect a strong AI when using the MedPack version, and of course it is not tested that I include all the necessary files.
And another thing if you want to use it with the playtest version. Peter messed around with the ConsiderNewProposal function therefore the argument list that is used in Diplomod doesn't match anymore with the argument list by our playtest version.
And finally the pack comes without a readme and of course you are on your own.
-Martin
GM11A.zip
|
|
|  |
 |
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:37
|
|
quote: Originally posted by Solver
Wow, that's a whole mod in there. I imagined it would be only a SLIC script file, like Frenzy. |
Well that would be preferable, but remember CTP2 v.1.1 has no way to figure out the current government of a player. Therefore I used these to figure out the players government salery, food and workday level. The disadvantage of this is that these three values must be unique for each government you have in the database. In comparison to Dale's way I think it is a cleaner solution.
For the air units I used a solution by Peter I just modified one function to get rid of the PowerPoint system. So Why adding it to my script if it is already there.
And another aspect is formed by the AI strategies. I added some code that reduces the settling activity and conquering activity, when the AI is over the city limit.
quote: Originally posted by Solver
Let's see if an idiot without modding experience like me can get it to work even .
And I really hope that Bert will also decide to poke around with the file and maybe bring it to the conclusion it needs.
Thanks, Martin .
[QUOTE] Originally posted by Solver
Edit: A question - does this thing, otherwise, work as GoodMod? That is, can I unpack this atop of CtP2+SAP2 after a clean install? |
It is designed for GoodMod and without some modifications it doesn't work, you need the govern.txt from GoodMod. And also the Ai strategy change should also be done, it doesn't make any sense when the script is in non conquering mode while the AI's strategy is still in conquering and settling mode. Otherwise you have to include the script into the Apolyton APOL_script.slc and of course make sure that the script is included int the according XXX_script.slc of the version of GoodMod you are currently using. I can tell you at least that it is not part of the MedPack version.
-Martin
|
|
|  |
 |
|
BureauBert
|
 |
Vienna, Europe
Apr 2003 time: 06:37
|
|
Sorry for my absence, I am not feeling very productive these days due to the strange weather here in Vienna
But I've managed to download Martin's latest developments and take a brief look at them. As far as I can see most of the SLIC is basically already present in GoodMod/BetterAI.
The most interesting new SLIC file is of course the *big huge* MG_Functions.slc with loads of extremely interesting functions that would certainly be useful as a basis for the development of tactical concepts. Though some things already are/will probably be integrated into the source code (by Martin himself ) like governments or continent-id's (at least I vaguely remember having read about it in the altered source files thread) there still remain lots of "terrain, city, unit etc."-checking functions that should IMHO remain user-defined since different modders might have different ideas about what e.g. IsGoodLandForSettling().
Nonetheless when I put together that "Common functions file" for my project I came up with the idea of putting together something like an "Apolyton Common SLIC Library" similar to the "Apolyton Tile File", which contains the most elaborate, efficient, working, "clean" ... versions of all those functions every serious modding project tends to need at some point . This would be some organized way of stealing from each other and would prevent the reinvention of the wheel due to ignorance of existing solutions.
I haven't yet explored all of the Call To Conquest SLIC (Martin seems having done so) but I am sure it contains some interesting tactical concepts, too.
As for military strategy and tactics (and this is the original topic of this thread, somehow ) two aspects seem most important to me:
- This one isn't new but needs to be mentioned: The AI's military strategy needs to be backed by some general idea of the geographical, economic and diplomatic/"political" situation. CTC's approach as far as I have seen in the SLIC files is mainly "geographical threat". What I have seen so far from Martin's new code suggests that "geographical awareness" is a major concern to him, too. The same goes for myself, I have been experimenting so far in favoring a peaceful but well defended, exploring, settling and "building" AI that realizes when it has reached the limits of peaceful development and then seriously considers and undertakes military action. Well it's a matter of fact that I like full-fledged warfare (with knights or tanks, that doesn't really matter, though I do prefer tanks
) when I can see some rationality in being attacked or having to attack another player, but I dislike at least as much having to struggle around with some spearmen for centuries for no other apparent reason but sharing a continent with an AI. I really hate AI's for attacking me restlessly while not settling on the huge landmass still waiting for them.
- The second one hasn't yet been mentioned too often: Concerning military tactics and the AI's concept in general I think it's not only strength (in terms of production and loads of 12-stacks) but also variety of tactics that makes the AI an interesting and challenging opponent to the HUMAN. That's why I would like to experiment with applying as many tactical concepts as possible (each one a good concept per se regarding e.g. "land army movement", "naval tactics" and "air tactics") in different situations, chosen by some rationality that still needs to be developed at the "backend" of let's say economic, political ... choices but also somewhat "randomly", so that the HUMAN player cannot entirely predict the AI's next steps (which used to be the major "bug" with good old Frenzy as far as I am concerned: You just knew they would show up next to your closest city with a 12-stack as soon as they had built the 12 extra units).
What I am experimenting with so far is introducing different "modes" for the AI depending on their geographical, (scientifical, diplomatical, economical) situation and accordingly applying different military (but also diplomacy- and settling-) concepts (i.e. scripts). What I have so far ist still a pretty rough concept trying to integrate what we have so far and I got stuck with getting that working at all, but if the Apolyton Edition lets me I am willing to continue and some day refine this concept. When as many good, particular concepts as possible are in a Mod you can use BetterAI to make them stack their armies, keep them off blocking each other and the roads, load their ships etc., you can use (a continuously improved version of) Frenzy AI to make them launch a major military campaign when needed (my TaskNumberOne-function is one attempt in this direction, in the context of a complex Mod additional uses for "Frenzy" armies could be thought of) - and you can use other concepts to make them use their armies differently when needed or just for the sake of variety. The same goes for different navy and air force concepts.
Interesting enough that Martin came up with a kind of "AI-modes", too. Well finally, apart from different preferences in many regards we all stumble across the same conceptual "nodes". So we are still on the way to create "the best of all worlds", and when we have it, everybody will Mod it to his taste again .
|
|
|  |
 |
|
Solver
|
|
Apolyton Duke Of Something
|
 |
Latvia, Riga
Sep 2000 time: 07:37
|
|
Wow that's insightful . You post many things that are good in perspective, but I'd like to repeat that, even if the AI would only be taught to invade other landmasses, I would already be happier. It's simple things like this that make the Civ 3 AI competetive - it will regularly send Transports to your landmass to harass you with troops.
And somehow, when playing CtP2 now, I don't notice the effect of AIs declaring just for the sake of it, probably because of using the fixed Frenzy code. Now, if you're nice to the AI and do some diplomacy, you can very well coexist on one landmass. It's better to have an army, but no longer you'll be attacked ridicilously.
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:37
|
|
quote: Originally posted by BureauBert
As far as I can see most of the SLIC is basically already present in GoodMod/BetterAI. |
Not quite true. MG_BetterAI.slc uses now a lot of stuff from MG_Functions.slc. These slic functions are just put into a libary. Most of the functions in MG_BetterAI.slc are obsolete, and I was going to remove them. Who needs functions like IsLandSettler if one has such a nice function by Peter Triggs that can determine the unit's type. However I modified this function to get rid of the PowerPoints system that allows more mod indepence.
quote: Originally posted by BureauBert
Though some things already are/will probably be integrated into the source code (by Martin himself ) like governments or continent-id's (at least I vaguely remember having read about it in the altered source files thread) |
Actual Peter did the government field for the player array.
quote: Originally posted by BureauBert
there still remain lots of "terrain, city, unit etc."-checking functions that should IMHO remain user-defined since different modders might have different ideas about what e.g. IsGoodLandForSettling(). |
That's actual defined by the terrain values that we cannot access by slic so far.
quote: Originally posted by BureauBert
The same goes for myself, I have been experimenting so far in favoring a peaceful but well defended, exploring, settling and "building" AI that realizes when it has reached the limits of peaceful development and then seriously considers and undertakes military action. Well it's a matter of fact that I like full-fledged warfare (with knights or tanks, that doesn't really matter, though I do prefer tanks ) when I can see some rationality in being attacked or having to attack another player, but I dislike at least as much having to struggle around with some spearmen for centuries for no other apparent reason but sharing a continent with an AI. I really hate AI's for attacking me restlessly while not settling on the huge landmass still waiting for them. |
The settling priority is defined in strategies.txt you just need to set the settling priority very high and the map will be filled with AI cities.
Well for diplomacy I came to the conclusion that if the human player manages to keep an peace treaty with the AI that the human player has a lot of time to arm up and beat the AI then. Maybe it should be easier to achieve piece with my script, because with my script the AI won't be helpless if you declare war on it.
-Martin
|
|
|  |
All times are GMT. The time now is 05:37. Apolyton Time is 00:37. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|