IPB

Welcome Guest ( Log In | Register )


 
Reply to this topicStart new topic
> CC's Artificial Intelligence Engine
Bittah Commander
post Nov 5 2006, 05:30 PM
Post #1


Forum Administrator
Group Icon

Group: Administrators
Posts: 1,340
Joined: 1-October 06
From: The Netherlands
Member No.: 5
Alliance: GDI
Favorite game: Tiberian Sun



Quote: absturz
Hi folks,
I am searching for people who already have experience with editing the AI (Artificial Intelligence) of Command&Conquer Tiberian Sun. Since I am interested in studying the AI engine I wrote down all information about this issue in a comprehensive developers guide.

But I would like to know more:
* How can I successfully make the AI trigger the GDI Drop Pod to land the taskforce within a human base - instead of dropping the people in its own base?
* How does the recruiting mechanism work, specifically the TeamType parameters: Loadable, LooseRecruit, OnTransOnly

For those who would like to get to know more about the AI-engine, I put the documentation on my server http://www.steffke.de/jbbs/doc/CC/Kuenstli...igenz/AI-Engine.


Regards,
absturz


Quote: The DvD
This is certainly interesting... i can read german and write english, so..

i'm gunna read it soon, i might be able to assist you in this research.

SMIFFGIG and Seaman here might be interested as well..


Quote: The DvD
It's extremely interesting... he did a lot of research and i learned some things i didn't know before..
he even offers for download edited AI ini's that have all teamtypes set to one dummy taskforce so that you can test to your liking..

I'm gonna save this site on my HD biggrin.gif


Quote: absturz
Hi DVD,
thanks for sharing my concerns. I did some more testing today and put the results on my web site as you recognized already. I think, some examples do make the guide somewhat more clear.
The latest enhancements are: Nods are building stealthed dependencies. Very hard to find them! Now I finished an attack on GDI helipads with a co-attack on the base defence. (I did this because one of my friends is somewhat a Orca bomber freak and I wouldn't let him get away with his attitude). The AI bombing attack is somewhat more effective on Nod bases since the Nod Flak Building has its own building-ID - so I am able to bomb exactly the Flak and not the Nod laser turrets...

Quote: The DvD
It's extremely interesting... he did a lot of research and i learned some things i didn't know before..
he even offers for download edited AI ini's that have all teamtypes set to one dummy taskforce so that you can test to your liking..

I'm gonna save this site on my HD biggrin.gif



Should I make the edited AI.INI files available for download? These are the files we use for our coop-missions against 4-6 computer opponents. Very hard to play... or in other words: hours of struggle and fun lol.gif

Regards, Martin


Quote: absturz
Hi Banshee,

Quote: Banshee
His material is very nice, but not for me since I dont understand german at all... is anyone able to translate it to english?



I'm going to translate this into English as soon as the Guide is complete. There are still some open issues left...

See you


Quote: The DvD
hmm, btw, how did you find out the Structure IDs? would they still work if my BuildingTypes list is in another order?


Quote: absturz
Hi DVD,
Quote: The DvD
hmm, btw, how did you find out the Structure IDs? would they still work if my BuildingTypes list is in another order?


the building-ID can be derived from the pattern of the AI-scripts.
Once discovered, it's that easy: Open the RULES.INI file and find the Section [BuildingTypes] and then count the entries. Start with counting at position 1. Add 131071 to the position in order to get the building-ID.
For example, the construction yard (GACNST) is at the position 13. Add 131071 to 13, it makes 131084 et voila this is the building-ID.

Well, it was tricky to discover this fact. I first got stuck with the variable names (eg. 1 = GAPOWR), but Westwood did not care about the names, they only care about the position in their lists.

Well, if you add or insert buidlings or change the order of the list, all building-IDs get messed up and the scripts don't work any more.
I have to regard this fact when I write the AI editor...
My suggestion: add all new buildings to the end of the list of the section [BuildingTypes] in the FIRESTRM.INI file. First, anyone should have the Firestorm extension CD in the meantime, second this is the definite end of Westwood's building list. And the last entry (INORNGLAMP) has the ID 131253. I found this out today...

Kind regards,


Quote: The DvD
Hmm so that might be the cause of some of my scripts messing up..

I've changed many building orders in the list..

I'll change it back then, thanks a lot for the info!

BTW the scripts that say "Attack factories" for example, don't use these IDs, they look for buildings with Refinery=yes, ConstructionYard=yes etc..


Quote: The DvD
Oh, and about the GAPAVE stuff.. when placed, that building converts to a terraintype and is deleted... so you can't really attack it.


Quote: absturz
Quote:
Isn't it time to translate the docs into English? :-)



Beuhh... wink.gif maybe we should try to find a good online translator.. let's see what babelfish makes of it.

edit1: oops i accidentally edited instead of quoted your post... oops.gif

edit2: http://babelfish.altavista.com works absolutely great![/indent]

Quote: absturz
Quote: The DvD
Oh, and about the GAPAVE stuff.. when placed, that building converts to a terraintype and is deleted... so you can't really attack it.


that's why no weapon works. Well, this is the graphics stuff - I think this is one of your main interests?

I just finished the Nod attack on GDI juggernauts. Crazy: Once I deployed my JUGGs in order to destroy the Nod base with my JUGGs, the subterreanean APC pops up, dismisses 5 engineers who capture my JUGGs. I think I should add a voice comment from CABAL to this action ;-)
I love the hacking within the AI engine...


Quote: The DvD
You made it that smart, or did you disable all other triggers in order to test the juggs capture trigger?

btw i'm finding your list with buildingIDs VERY helpful..


Quote: absturz
Hi DVD
Quote: The DvD
You made it that smart, or did you disable all other triggers in order to test the juggs capture trigger?
btw i'm finding your list with buildingIDs VERY helpful..


I disabled the trigger with the test environment. I think you know this download already...


Quote: absturz
Quote: The DvD
http://babelfish.altavista.com

it works really great... just use the translate URL option.



Hi DVD,
I am going to translate the documents tomorrow. I think that we all have advantages from these docs...
My documents are the summary of a 3 year research in the web, plus some additional testing with trial and error.


Quote: The DvD
Hmm i also did some testing

you might add that Max=3 or 5 doesn't work in TeamsTypes...the ai simply won't produce any units (i replaced all max=1 with 2 and all max=2 with 5) (so likely it doesn't accept odd numbers (1,3,5,7,9 etc))

Also i didn't know the 53,0 script (regroup) worked in TS and i'm using it for all my base attacks now... now the AI team is actually a group and you don't get situations of having 2 obelisks zapping away the lonely titan..really great.

Also, instead of moving the buildings in my list again, i just edited the scripts using your method of calculating the buildingID.. it seems to work, have to do more testing though.


Quote: absturz
Hi DVD
Quote: The DvD
you might add that Max=3 or 5 doesn't work in TeamsTypes...the ai simply won't produce any units (i replaced all max=1 with 2 and all max=2 with 5) (so likely it doesn't accept odd numbers (1,3,5,7,9 etc))


It works... The secret behind this is the parameter
CODE
AreTeamMembersRecruitable
. If set to yes, the machine remembers the situation - hence you may have too few actions running in parallel, just because the AI re-uses already existing taskforces.

Hey dude, let me say something: My fingers start bleeding: I am currently translating all the docs into ENGLISH. and i just wanted to go for a short smoke. Naturally not without having a look into my mail. That's why I answered just now.

Then other news: I inserted a link "last schange" in the welcome page. This is to sum up the news. And there are some bad news (for me): I got a terrible defeat last night because I set the IQ too high and let the AI build anything what goes. I destroyed two power plants and shortly after that 4 new plants popped up. I feel I just configured the fight with a 7-headed hydra. It's time to lower the IQ of that damn** AI.

I will look back into this thread later - now it's really time for a break,


Quote: The DvD
Stupid me, ofcourse it accepts odd numbers... the error was caused by something else (don't remember what it was but i f*cked up my whole mod in the progress).

I restored a backup of a few days ago, pffew the AI works again ;-)

now i'm going to look into properly using the regroup action (i love it) and i need to make the Nod AI lean towards using subterranean attacks a lot more. Problem is, they ofter fail to fill the APC for some reason, or send the apc with the units coming over land confused1.gif

Ofc i checked if everything was right but it messes it up.

I also have the feeling that -some- buildingIDs are hardcoded, i'll look into that later. For now, i wish you succes with translating, an idea would be to use an online translator and save the page, then check for errors..


Quote: absturz
Hi DVD,
Quote: The DvD
now i'm going to look into properly using the regroup action (i love it) and i need to make the Nod AI lean towards using subterranean attacks a lot more. Problem is, they ofter fail to fill the APC for some reason, or send the apc with the units coming over land confused1.gif


Whoops, i just created Caine's revenge... Some nifty Nod underground troopers which let the Nods get rid of the GDI's sensor array - and as a second counter measure, let the juggernauts sweep the GDI site. Tomorrow i will take care of the correct speech output.

Quote: The DvD
]For now, i wish you succes with translating, an idea would be to use an online translator and save the page, then check for errors..


Oh its so much fun translating the docs manually. First I discovered lots of errors, second I spiced up the documents with some nice comments and actions. I will put them online and announce it as soon as I finished translating. Still to go: actions, trigger and the test environment.
May be I also make available my sideous attack scripts. My pal Oliver was really surprised as CAINE named him a "Fleischklumpen" (fat boy?) - since Olli really puts some pounds too much on the weigh... I love it :-)

Bye, absturz


Quote: absturz
Hi all,
why not continue this thread to the advanced forum?
A the beginning I was not quite sure where to put my AI-editor questions. That's because most editing discussions care about graphics stuff or modding the RULES.INI. It seems that nobody else did examine the AI engine before...
So, let's work together and shift this topic to the advanced editing session.
Thank you very much for taking care of this issue.
Kind regards,
absturz


PS: Anyway I will post a short message in this thread once I finished translating (must be today, hopefully...)


Quote: absturz
Hi all,
I did it! I finished the translation into ENGLISH...
So, please discover my comprehensive guide to

The Artificial Intelligence of Command&Conquer Tiberian Sun
here


This is the same link as posted at the very beginning of the discussion:
(http://www.steffke.de/jbbs/doc/CC/KuenstlicheIntelligenz/AI-Engine)

For DVD: Please check the link "Last Change" in order to get the latest information.

For all other: Enjoy reading :-)

Regards,
absturz


Quote: absturz
Hi Banshee,
Quote: Banshee
This is really an execelent source of info! I just hope it works as you say and I have some evil plans in mind :twisted: :twisted: :idea: :twisted: :idea: :twisted: :idea: wink.gif


If the guide doesn't work out, holler at me. I wrote down all my experience I made in the last 3 years...

Well, if you like I can post some of these missions:
* Engineers repair bridges (*)
* GDI and Nods move their base (*)
* Caine's welcome command - (the GDI sensor array sucks...)
* Engineers capture juggernauts and yell for support
* GDI/Nod prepare areal sweep and wait for your having a lot of helipads
Well, it's all fun editing the AI - you can change the behavior as you like...
Greetings,
absturz

(*) these are examples from the guide. May be I should put them in the download section?


Quote: absturz
Hi all,
just to let you know that I still keep working on the guide...
Extract from "last changes":
01/11/2004
* I put my self made utility for editing the INI files in the download section. No big deal.
* Rebuilt the layout of the documentation

Bye,


Quote: The DvD
Quote: absturz
Hi you,
Quote: ZDflamer2
what would be cool is ai using carryalls, it would add so many online tactics to the game
.....
im not sure how possible this is but ai building firestorm would be a huge improvement, use it to knock down air and defend there base


I see, some more things to put on my to-do list....
I know that the carryall does not yet work, but I also search for someone who may help finding out.


Carryall won't work, because it isn't "filled" like an APC; it uses a different logic. Write this one off;
Quote: absturz
The other issue always was how to make the defensive weapons available for the AI. Also the EMP-house will not fire...
Maybe someone knows more...


I assume the AI logic for EMPSpecial was never implemented OR they try to target something that's out of range..
I'm using emp cannons that use a weapon rather than the Superweapon, i disabled AutoFire so you need to target them yourself.. AI does this stupidly and fires at everything, like infantry, and sticks to one target since emp doesn't kill it..


Quote: The DvD
Quote: ZDflamer2

im not sure how possible this is but ai building firestorm would be a huge improvement, use it to knock down air and defend there base



Sadly this is not possible; firstly it isn't even controlled by AI.ini's, secondly it would require to set AIBuildsWalls=yes, to replace the walls with firestorm walls, which could cause bugs, secondly they'll either enable the FS as soon as it's charged or not at all..


Quote: absturz
Hi guys,

Tent camp inlove.gif << OR >> :cammogun: Super fortress
How strong should your computer opponent's base be today?


Well, I have gathered some 4 new parameters which allow to you to have the computer build the deckchair in the sunshine - or the evil nightmare with haunted houses in the midst of an ion storm....

See the new parameters: GDIWallDefense, GDIWallDefenseCoefficient, GDIBaseDefenseCoefficient and NodBaseDefenseCoefficient in the guide to the AI-engine.
Direct link to the page is here (scroll down to Settings of Selection of buildings)

Happy programming....


Quote: absturz
Hi DVD,
Quote: The DvD
Also i don't recommend setting the NodBaseDefenseCoefficent too high.. after a while, 90 % of the base will be powerplants and defenses... and since one advance power plant can barely support 8 lasers (or one obelisk), the cpu will get stuck and suffer from low power


Ahem... you are so right, may be I better put the suggested value to 2 - since the original value is 1.3 for Nod, and 1.6 for GDI

Quote: The DvD
note: the AI seems to ignore IsBase=yes (which handles the adjacency check), and will build defenses that reach your base..


Yep. I wonder when I played with setting NodBaseDefenseCoefficent=8 that the Nod covered nearly half of the map with their defense buildings after 1 hour of gameplay. Seems to be very unnatural. I just thought I can figure out what goes.
So, I will correct the values for Nod and GDI to be a value of say: 2. An integer number may be easier to play with, isn't it?


Quote: The DvD
Quote: SMIFFGIG
it would be interesting to give the player an IQ
for experimenting



I did this (even got it to work in skirmish on all maps, don't ask me how cuz i forgot tongue.gif )
The result is rather funny/handy. All buildings will autorepair; units seem to guard a bit more, your buildings will be sold when they're low on integrety..


Quote: absturz
Hi SeaMan
Quote: SeaMan
The IQ section is used for controlling at what IQ level a specific action starts. The AI has 5 IQ levels.
Player house has IQ=0. All AI houses start at IQ=1.



Oh yes, I remember the RULES.INI explanation for the IQ section. Excerpt:
; .... A human controlled country is presumed to have
; an IQ rating of zero. A computer controlled country has an IQ of 1 or higher.
; When in skirmish mode or when multiplayer AIs are active, the computer IQ is set to
; the maximum.


What I wonder about is this fact I found out:
The docs above say that the computer IQ automatically switched to 5 in multiplayer mode. However, I found out that not only the computer units but even the player units start to do their own thing if I set the parameter GuardArea=2 to a value of 5. Then my units hunt down the others as soon as they are in sight.
Hence I concluded that some changes to the IQ setttings still change the behavior of the machine on the battleground - despite the docs which say that the machine already has an IQ of 5.
Give this a try, set GuardArea to 5 and start a multiplayer or skirmish mode game. The player units behave quite "strange"...

Do you think I should mention it in the guide?


Quote: absturz
Quote: SMIFFGIG
it would be interesting to give the player an IQ
for experimenting


Hi,
please read my answer to SeaMan - this kind of player IQ is really funny if you set for example GuardArea to 5. It's hard to keep my units together when I let them move in the vicinity of e.g. an opponent's harvester...


Quote: absturz
Hi guys,

Construction yards growing like mushrooms

I observed some strange behavior:
I set up a mission for the GDI to build a subsidiary site with a MCV.
I settled in the other corner, but moved with my MCV a bit from the original start position. Then I waited for the GDI MCV to come.
The GDI settled down nearby my construction yard and built their own.
Of course they started building a wall with defense structures immediately.
So far so good...

Then I captured their constyard with an engineer. That means: no GDI building left, only a few fragments of the concrete wall.
Then, all of a sudden, a new construction yard popped up right beneath the old position.
It feels like growing mushrooms: once I start to cut off a head a new mushroom will grow aside...

Finally, I captured round about 10 construction yards, when I decided to also blast away the remaining wall fragments from above. After this the GDI calmed down and did not build other constyards on my side...

Did anyone else observe this strange behavior?


Quote: absturz
Hi guys,

Engineer command with APC forget to enter their transport and vice versa

Some other strange behavior which I observed:
I built a mission with a script where engineers enter their transport vehicle and drive to a destination where they attack something.

From time to time this happens:
* either the engineers forget ot enter their transport vehicle and run over the field to the enemy
* or the transport vehicle drives away and forgets to pick up the passengers

As said: this happens from time to time - very rarely.
Isn't this strange?
I remember DVD, he also observed this behavior.

Is there something wrong with the scripting engine?
This is my script:
CODE
[0903001D-G]
Name=Attack deployed Jugg
0=14,0
1=43,0
2=47,131243
3=24,112
4=52,2
5=8,2
6=46,131243
7=49,0
8=0,1


It seems that the AI-engine forgets step 0 from time to time....

Any ideas?


Quote: The DvD
Quote: absturz
Hi SeaMan
Quote: SeaMan
The IQ section is used for controlling at what IQ level a specific action starts. The AI has 5 IQ levels.
Player house has IQ=0. All AI houses start at IQ=1.



Oh yes, I remember the RULES.INI explanation for the IQ section. Excerpt:
; .... A human controlled country is presumed to have
; an IQ rating of zero. A computer controlled country has an IQ of 1 or higher.
; When in skirmish mode or when multiplayer AIs are active, the computer IQ is set to
; the maximum.


What I wonder about is this fact I found out:
The docs above say that the computer IQ automatically switched to 5 in multiplayer mode. However, I found out that not only the computer units but even the player units start to do their own thing if I set the parameter GuardArea=2 to a value of 5. Then my units hunt down the others as soon as they are in sight.
Hence I concluded that some changes to the IQ setttings still change the behavior of the machine on the battleground - despite the docs which say that the machine already has an IQ of 5.
Give this a try, set GuardArea to 5 and start a multiplayer or skirmish mode game. The player units behave quite "strange"...

Do you think I should mention it in the guide?



Odd, i have everything at 5 yet my units behave normal.. the enemy AI is quite smart though.


Quote: absturz
Quote: The DvD
Odd, i have everything at 5 yet my units behave normal.. the enemy AI is quite smart though.


O.K. then the fault is somewhere on my side. May be I tweaked around too much and it's time to reset my RULES.INI - Example: My titans emerge from the factory, they see a harvester nearby the site and they just decide to walk to him and shoot him down. Of course, the enemy reacts immediately and sends all units available to hunt down my vehicles. There is somehow a kind of overreaction going on. I will have to reset my RULES.INI....


Quote: SMIFFGIG
Quote:
As far as I know the threat rating node was first introduced in C&C TS - however, this feature did not find it's way through the final software assembly: It just costs money and does not seem to work.


It was first and last intruduced in TS, it is or was in no other C&C. It can be made to work partially

Quote:
Then, the threat rating node was officially introduced in RA1 where it (in my opinion) is nothing else than a hint-system for human players: it enables you to easily detect the direction from where the next attack will be launched against your site. [/indent]

I assume u mean RA2 (not RA1) and I assume you are talking of the pyscic beacon, which doesnt actually use threat rating node logic, but the way it predicts incomming attacks was going to be a feature of the threat rating node (i could ramble about this and attached features that where excluded from the game for hours, so ill stop myself there)

Quote:
The documents I found on the web tell that the threat rating node would somehow influence the behaviour of the hunter seeker drone in C&C TS. But on my computer this dam*** thing behaves as dumb as before... [/indent]

What documents ?
Anyway, before the first TS patch was released there was some nice things that where in the game
Firstly AirTransport worked (which meant Orca Trans worked properly)
Secondly, hunter seekers where tottaly stupid, they would go out and destroy civilian buildings
WW later announced they had fixed this bug in the first patch
but this was NOT a bug
It was a feature attached to the threat rating node, the HS would destroy random buildings on a map, until you built the threat rating node, then it would behave normaly (u know, annoying little a**hole of a unit tongue.gif)
Anyway, if u did some experimenting with the first fresh installed version of TS (excl. FS expansion) im sure you would see this still comes into play wink1.gif

Quote:
To make it short: I could not yet detect a relation between having built a threat rating node and units behaving strange afterwards[/indent]

Simply... units dont behave strange wacko.gif

P.S. I word of advice, dont go by DeeZires writups of the TRN. Alot of things are incorrect (although dont avoid his other stuff)[/indent]

Quote: absturz
Hi guys,
it's time for an update...
During the Easter holidays I took the time to re-install my FSGS server, but finally I was unsuccessful under Windows...
Hence I surfed the net in search for a new server, also without any success. So, I took some care about once more exploring the AI-engine. Here comes the news:
    * new script commands
    * new descriptions for actions
    * new findings about the truth of triggers
Now, after a few veeery long days I have to document this all...

First of all please find the news about new script commands here.
Also discover the complete documentation (English, German) here.

Have phun,
absturz


Quote: absturz
Hi guys,
as I promised here comes the next update.

Please find the news about last changes here.
It's about:
    Some parameters within actions were still unclear
    The trigger mechanism works different than documented in the last version
Also discover or download the complete documentation (German/English) here.

Bye,
absturz[list][/list]


Quote: absturz
Hi,
Quote: Forgotten_One
excuse the question, but what do you use to open the ai editor? ms dos doenst work



can you please explain what you mean with the AI editor?
If you mean the AI editor which you can download at Tiberium Sun, then I must state, this AI editor ist something for experts only.
I don't use it

I have a batch script, named AIgenerator in my download section. It's named "Small AI editing utility". This tool is a command script for Windows 2000 and higher (WinXP), because it uses the Windows CMD prompt. This batch opens a notepad for each concerned file.

So, if you use my batch script, then it may be possible that it will not work within MS DOS (Win98 for example).

Regards, absturz


--------------------
Go to the top of the page
 
: | +Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 28th March 2024 - 10:59 AM


XGhozt.com