CZ45 AI Additions

Additional varied AI players for C&C and RA.

Information and discussion for custom maps and mods.
noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Works like a gem and a nice guide!

CannerZ45
Posts: 13
Joined: Thu Dec 04, 2014 1:15 pm

Post by CannerZ45 »

@UMAIRAZFAR - is considering it, but discovering that I also have to make another account there, keeps me on the fence in the moment...

@NOOBMAPMAKER - Glad to know it works and that the guide...'guides' well! :)

Anyway, as my simple mod is basically wrapped-up for the current version (now eagerly waiting for upcoming upgrades, refinements and features), I admit I'm currently on board with alot of different boats at the moment.
I've recently discovered(just like 'OpenRA', quite ashamed of myself I only caught wind of these now) the TibSun standalone mod/conversion "Dawn of the Tiberium Age". Another excellent re-implementation of C&C and RA by simply applying the look, sound, and 'feel' of those two games to the Tiberian Sun engine. I understand that OpenRA is still a young project, but the smooth-as-butter performance of DTA is an easy hook for me. While it's a bummer that there's no LAN play, the AI difficulty that controls buffing/handicapping general player stats ( multipliers to cost, armor, firepower, or build speed... ) is a one small feature I now dream to be eventually added in OpenRA in future iteration.
Another one I've played is 'Twisted Insurrection', the default game is pretty cool enough. But what blew me away is the "Twisted Dawn" game mode. Seeing the Tiberium Dawn Mammoth Tank, MLRS, Humvee, and Light Tank in bulky, modernized voxel designs is just lovely.
Finally, also got an OpenRA-ish re-port of Dune II, called "Dune Legacy". Just like OpenRA, it 'modernizes' the original Dune II (but not as extensive as OpenRA, just minor conveniences like single-click commands, unit queues), and besides the original campaign, added some 'unofficial bonus missions' and now have multiplayer match and offline skirmish mode.

So yep, currently wading through lots of new-ish "old RTS". :)

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Well hope you will continu adding to this project as well. These bots are a great addition IMO. I have only tried some of the RA AIs as that is the only game I play :)
Some feedback on AI, I dont know how hard the suggestions are to implement, but just some thoughts:

:Infantry AI -FUN EDIT: although... they only seem to make rifle men. Other infantry would be fun too (just not tons of 'useless' infantry like spies, engineers and other things the AI doesnt understand)
--
:AirSup AI - having an air support AI is alot of fun, but needs a couple adjustments to be a real air support AI.
- it builds alot of static defence, ALOT, and often as a two layer thick wall. If possible turn that down a notch and perhaps some spread. Or increase the chance of building them on an ally.
- build a maximum of 7,8 or 9(?) harvesters
- invest heavily in planes, not 5 or so.. rather 10!
- eventually do build a nuke
--
:Weird AI (= Unconventional AI?) - Fun AI as well, but:
- build a maximum of 7,8 or 9(?) harvesters
- NEVER build suppply trucks (it attacks with them :) )

--
:Tank AI - Actually a tough one to beat, the best AI of the pack IMO
- build a maximum of 7,8 or 9(?) harvesters
- build slightly more heavy tanks (V2, Mammoth, Artillery, etc)
- eventually do build a nuke
--
:Varied AI -Also a nice one, not much to say about it
--
:IvanDcraycraY - fun crazy AI, but it seems to fail often. Got to see it more to see why that happens.

I cant recall exacty which AIs did it, perhaps even the standards AIs do it, but some AIs build up to 25-30 harvesters! If that could be capped at, say 12 harvesters it would already be better.
Also most IE build tons of boats. Some boats would be fine, although they rarely put the to good use, unfortunatly. So if the odds of building a boat could be lowered too, then that be good as well.

Again, I really enjoy the mod. I even let bots team up on eachother and watch them battle :D
Last edited by noobmapmaker on Sun Dec 28, 2014 10:02 pm, edited 1 time in total.

CannerZ45
Posts: 13
Joined: Thu Dec 04, 2014 1:15 pm

Post by CannerZ45 »

@NOOBMAPMAKER
I'll keep on following up on this mod whenever an update comes along, in the meantime. I took a read on your preferences and made a couple of tweak based on those. I already seem to have forgotten some of the changesI did but here the notable ones I remember;

The 'Air Support' AI's name, changed to simply "Air AI". As the former name, as only now I've realized it, is a bit misleading. I do dream of making a proper air support AI, but with the current level of options, and my lack of actual coding skills, it's impossible on my end.

As I see it currently, the AI doesn't use the same wave-based attack characterization regarding air units. As soon they make a single plane or a helicopter, they quickly make it strike a random target. So yeah, sorry for that. Did add this AI's ability to build nukes. Cannot make it hold off a bit though, no matter what number manipulation I did, the AI's suddenly eager to build one as soon as possible.

The 'Unconventional AI', toned down the amount of supply trucks built, but I just can't remove it. The way they just give it out to you like an occasional friendly gift is just adorably stupid. XD

The 'Tank AI', I'm pretty satisfied with it's level/difficulty. It seems it does tend to focus on making more Mammoth Tanks on later game. I didn't include it's ability to make V2s and Artys on purpose, as that one is already covered by the 'Defensive AI', and on the extreme end, by the 'Longbow AI'.

"IvanDCraycraY" is just my little throwaway random AI, it focuses on making explosives-equipped infantries, the phase tank, and the demo truck, the reason it doesn't pack much punch on later game, like the 'Light AI'. Also, test it out on two games and I just witness it's biggest(hilarious) flaw. It tends to let its demo trucks spread around it's whole base. As another AI drops a nuke on it, results in a, rather entertaining domino effect.

Toned down AI's rate of building naval units. You're right, most of the ships/subs they built just ends up hanging around, clattering up the place.

Lastly, I also can't put a hard limit on an AI and certain units allowed to build/train(again, limitation thing). The best I can do is to tone it down through "UnitFractions". This means, while it still might end with the crapton of harvesters on very long games, it will take a looong while to become so. This doesn't work on the "Passive AI", given it doesn't build any other unit other than the harvesters, and I kind of want to keep it that way, given that I just thought an army of harvesters is the best 'offense' that AI can do.

That's all for now. And I hope to gain more feedback for you, given that I'm more of an TD guy than RA. All the changes for you to try out, the 'test.zip', included on this post.
Attachments
test.zip
RA AI update test
(2.19 KiB) Downloaded 317 times

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Ill be letting them play and share my thoughts. These are busy days, so could take a while.

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Gonna let some bots play eachother. I really hope other people who understand AI even better than you will chip in and help you tweaking. If you guys want me to test the bots for certain aspects then let me know! Glad if I can help in any way.

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Ive let bots battle eachother and noted some things that happened. Ofcourse different maps or opponents will give different results but this could give insights on the AI. I share my thoughts, but they are your bots, so pick and use the findings you like.

At some point I tought it was good to note which side was who, and some things I started noticing later on so I didnt note everything. Also I quitted some games that seem stalemated so some numbers are just a reflection of the moment (still usefull hopefully)

Games played using the AI from CZ45, version: Sat Dec 27, 2014 8:05 pm


Troop vs Noob - Chokepoint (4pl), $20.000 MCV Only, Unrestricted
Troop builds tons of riflemen, repels attacks and sometimes throws an attack eventually swarming the Noob.

- Troop: good powermanagement, only riflemen, 2 harvesters, some defense, no anti-air defense
- Noob: good powermanagement, nice simple attacks of varied light units, 2 harvesters, some (air) defense


Longbow vs Passive - Forest Path (2pl), $5000, light support, Unrestricted
Longbow builds many tanks, incl artillery. Passive builds a varied base, then the game crashed :/

- Passive: builds Naval base several times without being able to place it?, to much power, rarily (air) defense, uses the spy plane effectively, missile silo
- Longbow: allmost identical to other game: alot of tanks, etc.


Longbow vs Light - Keep of the grass 2 (2pl), $10.000, MCV Only, Unrestricted
Longbow seemed to eventually overrun light, but it could take looong.

- Longbow (allies) builds Naval base several times without being able to place it?, to much powerplants (750/2000), didnt buy air units did buy alot of tanks inc artillery, 6 harvesters, some (air defense), missile silo but never throws Atom Bomb
- Light (soviet) sometimes build naval base, good powermanagement, throws in a couple tanks and men, 12 harvesters, some (air) defense, tech center + 11 airfields. Never used spy plane/paratroopers


Varied vs IvanDayCrazy - Singles (2pl), $20.0000, heavy support, Unrestricted
Both players couldnt really hurt eachother. Ivans trucks often murdered the rest of his units. He was a tad more agressive than varied though.

- Varied(allies) builds naval bases several times without being able to place it?, to much power (500/1000), builds some men and tanks but hardly attacks, 5 harvesters, some (air) defense, units respond to attack on base, tech center, missile silo
- IvanDayCrazy (soviet) builds Naval base several times without being able to place it?, to much powerplants (950/2300), builds infantry and tanks and sometimes attacks with a bunch, 5 harvesters, some (air) defense, units respond to attack on base, tech center, missile silo, didnt use his spy plane/paratroopers


Defensive vs Unconventional - Keep of the grass 2 (2pl), $5.000, Heavy support, Unrestricted
Defensive hardly attacks and Unconventional was to weak to bring anything serious.

- Defensive - (soviet) builds Naval base several times without being able to place it?, to much powerplants, builds alot of tanks and infantry at base, some (air) defense, tech center, missile silo
- Unconventional (allied) to much powerplants (650/1300), builds varied odd units and attacks, 3 harvesters, some (air) defense, tech center, missile silo


Tank vs Air - Chokepoint (4pl), $20.000 MCV Only, Unrestricted
The game of stalemated because none could really crash through. Tank was a tad strongers as its AA guns ripped down the groups of helicopters.

- Tank: to much powerplants (700/1900), groups of light tanks and couple diff infantry, 8 harvesters, some (air) defense, units respond well to an attack on base
- Air: to much power plants (1100/3000), groups of hinds/longbow, 9 harvesters, solid amount of static (air) defense, builds 3 naval yards, units respond well to attacks on the base

General ideas on improvements

-Troop Also build some other infantry, like rocket soldiers and other usefull units (no spy, engineer, etc) Do build a tech center, and perhaps a missile silo after a long time? Units seemed not to respond on an attack
-Air Turn down naval a little bit, some Naval (units) is fine though. And more air units and less power :)
-Noob Units seemed not to respond on attack on their base, but maybe that is because its a noob “:)
-Passive Well, its passive, but I guess that is what it needs to be :)
-Longbow Seems to be broken as it doesnt produce any flying units, but it does hurl out nice waves of enemies!
-Light Well, it is light :) Builds alot of useless stuff. But that is perhaps what a light player does.
-Defensive Does what it does properly. To bad of those worthless naval bases it keeps on building
-Unconventional Does what i needs properly, less powerplants would be good
-Tank Increase the production of heavier tanks, less powerplants
-Varied Seemed a bit passive, although it does build varied.
-IvanDayCrazy More effecient building could improve this AI

Other thoughts:
After 34 minutes the Tank and Air AI stopped building any structures, and only builded helicopters or tanks, although they had money left. With excess money either some static defense or a couple infantry would make it stronger.

It could be that I played too short games (or I quitted because of a seemingly stalemated game, but none of the AI build the Iron Curtain or Chronosphere. Is that on purpose?

CannerZ45
Posts: 13
Joined: Thu Dec 04, 2014 1:15 pm

Post by CannerZ45 »

@NOOBMAPMAKER

Did further tweaks based on your observations, ignored some of your advice/requests for reasons explained down below. But anyway, other changes that deemed agreeable;

Did not changed the Troop AI (I really like to keep that as it is thank you), instead, added another AI(Footsoldiers AI).

Yep, that quirk on Noob AI's is intentional.

The Naval on Air AI thing is a bit anomalous. Tried three games. One even has three Air AI's on play. None of them builds any naval structures. Personally, Air AI strictly for Aircraft stuff is my only intention. Anyway, tone down it's fixation on advanced powerplants, but can't do any more than that. Will explain THAT tidbit of quirk below...

Longbow not building air units is intentional.

Defensive AI's "Naval Issues" stems from the same problem regarding the "crapton of harvesters" quirk. As for the actual naval buildings, will elaborate on that problem too below...

Tweaked the "Tank AI" a little more, seems to be more focused on building heavy/medium tanks in mid game.

IvanAI's case, will elaborate on that now, together with the other quirks/troubles that I have no power on 'fixing'.


Alright, first off, the powerplants thing, it seems the way AI build powerplants is reactionary in most case, that is, unlike most structures, and a little like how the refinery construction decision is handled, it's more based on whether it needs one, not wanting. So for the case of some AI's building lots of it, may be an unfortunate result of building a power-intensive base.

Now, the whole "builds naval bases several times without being able to place it" (I'm guessing you got this from the bot debug messages) issue, currently can't do anything about that. Another, current AI quirk/limitation I guess. The only "fix" I could do with that is by not letting the AI build any Naval structures at all, which is obviously not the right way to go. The only consequence it's got seems is a bit of a lost time in base building. Pretty negligible anyway so no biggie.

Finally, regarding "IvanDcraycraY"'s trouble. I guess this affects all of the AI's actually, some less noticeable than others though...Generally, it's currently a lot tricky to force an AI to give it a sort of "order of building preferences", I too want to force an AI to build, like, a barracks first before a refinery, but the way the "BuildingFractions" mechanic seems to work is just unwieldy to make it so.

Oh, and as for the "ignore" thing. I guess I should make myself, and my work, clear here; Never is my intention to create an AI that's highly competitive in challenge/difficulty(as I've understood in seeing the AI build on various bot mods, and previous C&C skirmish AI's the best way to make a godly bot, is a 'cheating' bot), only aim to make a lot of wildly varied artifical 'characters' that have a clear, differentiating combat preferences to each other.

That's it for now...the mentioned additions and fixes is in the included zip file. :)
Attachments
test.zip
RA AI test patch
(2.24 KiB) Downloaded 329 times

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

Thanks! Going to check it out, but after 9th of january as I got important stuff to do before that. Just wanted to say: it is your AI, so indeed you can ignore the observations you think are not a problem/are intentional. If you are going to listen to every forumuser, like me, you will end up with 10 boring allmost identical AIs :)

I observed the naval bases by looking at the production tab when observing. It builds them several times, when it finishes it gets cancelled and rebuilds it. Sometimes this is not a big problem, for instance with a noobish AI. Losing such building time makes it extra noobish/passive/other.
For some AI I think it might be good to turn of naval all the way or tone it down as much as possible. The troop AI for instance should be (imo) focus on troops, and not waste money on ships. Perhaps there are other AIs where you also got the idea that building naval units is a waste of what the AI is supposed to be.

I also mention it because IF the AI builds a shipyard it totally spams it with ships. They do it early, when money could be spent much better elsewhere. And not only that: they also build it + 8 subs/ships in tiny lakes where they are never of any use. Also on the maps where they are able to reach the opponent the ships often get stuck...

As for the AI buildingpreference: I assume it would actually be not extremely difficult for the creators to also implement code that allows people to enter a "buidling order". It seems easier to me than "building preference". But that is something that the people who build the AI should focus on.

Last: I assumed longbow AI was about longbows, those helicopters, are they not?

abcdefg30
Posts: 644
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

The AIs look very good. I'll test your new version later this day.

"AI builds subpens/naval yards (even on maps without water) and cancels it later" seems like a bug in OpenRA.
(Naval AI does that as well.)
I don't think you can fix that by changing the AI rules.

Post Reply