Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Advanced AI?
#1
I've just been playing alot of Generals and Starcraft recently, and there's something about the AI that owns YR: expanding territory.

AI builds little sister bases at places where they find resources.
This makes games longer and far more interesting.
Besides it makes large maps very useful.

The question is, how could something like that look like in YR?
AI doesn't seem to care of base expansions by now. I.E. if it captures an oil derrick, it won't (unless an accident happens) place defenses there.
I also don't think it would react if you wrote a script that tells a MCV to deploy somewhere.

I need a few things clear here: what can the AI be forced to do regarding base building?

With that knowledge I might be able to concept the easiest possible method to make things like that work.

AI will be one of my targets anyway in the future.
For instance, what are custom SWs for if you can't make the AI use them to support a specific team they built? (i.e. first EMP-strike a base, then attack it)
Though that's another chapter...

Oh well, a note: please don't bug me with like "can you also do...?" or "would you be able to ...?" concerning this, I need facts, no questions.
Oh and don't look forward to these things, I didn't do any research and I don't think my current state of knowledge would be sufficient to code things like that Tongue
[Image: jsfml.png]
Reply
#2
Scripted AI is fail. There's not much you can do unless you want to code the entire AI from scratch and in the process have thousands upon thousands of variables that the AI looks at so it 'learns' like the StarCraft AI.

The verdict is in: give it some cheat measures and make it mass units. Best way to do it. Besides, you'd have a ton of [General]/[AI] section tags to make unused... too much work to be honest.
I'm what Willis was talkin' about.
Reply
#3
If you tell the AI to deploy an MCV somewhere, it would, but I don't think it would build any stuff around it. Besides, multiple factories of the same type for the AI (especially conyards) are a bad idea - when the AI produces something, that "something" is produced in all factories of the proper type, like Cloning Vats for human players. So, two Conyards = two Battle Labs at once, two Nuke Silos at once, and a ton of wasted base space.

Btw, the only scriptable destinations are:
somewhere AISafeDistance= cells away from own base;
-"- away from enemy base;
waypoints, preplaced at map design time, you can only trust waypoints 0 and 1 to exist (WPs 0-7 are player locations, there are at least two players);
right next to your own/enemy structure (structure defineable by its index in the BuildingTypes list).


You can (kinda) force the AI to expand its base, with a shitload of cheats:
1. Sacrifice the Slave Miner logic - utilise this logic on a unit which deploys into something like the Base Expansion Node from CR.
2. Create a ton of dummy units that are invisible and can chrono, and deploy into standard base structures.
3. Script the AI to:
build one such unit.
move it to friendly structure (BENode structure index)
deploy
repeat until success
4. Repeat step 3 for all base structures you want it to build.

But of course that is a LOT of work, and doesn't always work properly. Esp. in cases like Bay Of Pigs, where you have several ore piles near your base, the miner will usually pick one pile right next to your own base, and waste resources on fortifying that spot. See C-GEN forums > RedUtils forum > topics by jkraska , or DeeZire forum > topics by Courageous.


However, the AI scripts leave a LOT to be desired:
they are hardly reliable when there are multiple possible targets for the Move to ... command, like when it builds two nodes, you can't specify which of them to aim for, or whether to avoid sending the team to the same target the next time this script executes, etc.
they can't target other xxxTypes by ID/index, only structures. So, you can't create a team of Snipers to specifically attack Spies, for instance.
they can't load transports into transports, like IFVs/Flak Tracks into Amph Transports.
a lot of stuff that I can't remember.

Worth playing: 1 | 2 | 3
Reply
#4
DCoder;date=Nov 3 2005, 08:32 AM;post=1910 Wrote:If you tell the AI to deploy an MCV somewhere, it would, but I don't think it would build any stuff around it. Besides, multiple factories of the same type for the AI (especially conyards) are a bad idea - when the AI produces something, that "something" is produced in all factories of the proper type, like Cloning Vats for human players. So, two Conyards = two Battle Labs at once, two Nuke Silos at once, and a ton of wasted base space.

actually, its not 100% true.

building another contruction yard would be fine, however, if 1 was destroyed, it will build it back.

the problem is not that it builds everything from all factories at the same time, this is a miss-observation of what i've observed to actually happen.

the AI kinda fractures itself, so every yard runs the scripts. so, yes, it will build everything twice, more of less at the same time, not because its building things from both factories, but because its actully thinking its 2 seperate AIs, and they have the exact same decisions because the conditions are token over the overall, so the key factors are always the same.

I've watched an AI with 5 construction yards before. well, 2 of its side, and 3, 1 from each of the other 3 sides. first thing i've got to do is destroy those 3 to break an endless loop, then it will build them back as its own sides, then the fun begins.

5 powerplants, 5 barracks, 5 refinaries, then, the magic

5 of different base defences(usually pillbox for allies, but gattling/tank bunkers for yuri and bunkers/guns for soviets.).
3 war factories and 2 airfields/radars!!!

you get the idea.

but yes, DCoders point is still kinda true, it'll build an entire base, including everything.

then when you destroy a construction yard, it'll start building other stuff. you'd need to use something like the slave miner logic to build something else, like a mobile refinary/war factory.

can something be both a refinary and a war factory?

maybe PD should re-implement some of the TS:FS mobile war factory stuff, including the PrequisiteGDIFactory= and PrerequisiteNodFactory= and so on, or just PrerequisiteMisc##= so you can use them for whatever you want.

getting it to build other things around it shouln't be too much of a problem imo, the reason it doesn't build next to a deployed slave miner is because of BaseNormal=no, AKA the TS line ;IsBase=no;PS IsBase isn't a rules tag.
Reply
#5
Test my script....
1. Build MCV(AMCV, PCV)
2. Move out of base
3. Deploy
It's interesting...
ARM forever - x86 sucks!


Reply
#6
you know what else is fun?

try and make all sides into 1. make all buildable structures require the same construction yard, and all the same baseplanningside, and so on. they co completly nuts.
Reply
#7
Ok,so, the AI problems:
1:It cannot build base defense at the same time as normal building (like player, with sidebar tabs), so, if you try to give it lots of base defenses, it gets stuck building defenses, taking a lot of time to build BattleLab, and you have to do a lot of hard work to overcome that (get full control of what is AI building, make a separate clone of every defense you want AI to build, disable standard Base Defense logic, and make some BuildTimeMultiplier=0.0001 clones build right after structures more expensive than them- and you will still have bugs)

The triggers can have only one condition- use of AND and OR would improve it a lot.

Also, the logic that increases/decreases trigger value should save it to file.

The chrono buildings- you also need to have a separate clone for every, say, oil derrick on the map and scripts for every one or the AI will send defenses only to one derrick.

AI also cannot load more than one transport per team.

will post more when I remember...
Reply
#8
Quote:It cannot build base defense at the same time as normal building (like player, with sidebar tabs), so, if you try to give it lots of base defenses, it gets stuck building defenses, taking a lot of time to build BattleLab
But you can build defenses and normal buildings at the same time. They're on two different sidebar tabs
Ares Project Manager.
[Image: t3wbanner.png]
[Image: cncgsigsb_sml.png]
Open Ares positions: Documentation Maintainer, Active Testers.
PM if interested.
Reply
#9
Did you read my post?
Reply
#10
the AI can't give a crap about tabs, they build ONE THING PER FACTORY, thats 1 building, not taking into account the second tab, so we can build buildings faster

however, navel yard and war factory, we share the same build list, they build both at the same time.
Reply




Users browsing this thread: 1 Guest(s)