[DEV] BetaAI | TOTAL REDO ?

Improvements and ideas

Discussion about the game and its default mods.
BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

[DEV] BetaAI | TOTAL REDO ?

Post by BenjaminLSR »

Needs a total redo.
Last edited by BenjaminLSR on Thu Oct 11, 2012 7:07 am, edited 9 times in total.

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

First test with airplanes and copters. Almost done.
Attachments
AItest1.png
AItest1.png (765.06 KiB) Viewed 14888 times

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff »

Interesting stuff. The AI is currently pretty pathetic, so any improvements are probably welcome.

One thing that it really needs to be capable of is sending more squads to attack, regardless of the condition of the previous squad sent out; at the moment, they just cram their base with new stuff until the last unit from the 'current' attack wave is destroyed, and all too frequently this last unit somehow manages to get lost in the middle of nowhere for some inexplicable reason.

While watching 200+ enemy units suddenly mobilise and go on the attack can be quite funny, it slows the game to a crawl and doesn't really make the imminent fight 'difficult' -- it eventually just becomes tedious to pick off unit after unit with a wall of defences (not to mention you can just avoid this last unit and smash the AI base to pieces while it sits around with its thumb up its ass, hopelessly waiting to attack again -- which is where your plan to enable the AI to counter-attack - or at least react to an attack on its own base - should be very useful).

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

AI captured buildings.
Attachments
AItest2.png
AItest2.png (665.92 KiB) Viewed 14879 times

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

Looks like solid improvements.

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

CounterAttack:
Allow troops wandering around base to quick move to an enemy curently attacking any structures. In fact, this script was supposed to be just a test but it makes AI far more reactiv to base invasion.
C# demo: http://pastebin.com/zXsNVCyz

BaseCapture:
Early tests reveals that engineers are now capturing structures.

BuildLimit:
Should allow to create AI pattern such as, agressive, economy, defensive by tweaking maximum amount of the same building.
It should also avoid AI to build three ****ing radar domes and ten refineries.

HasAmmo():
Helicopter and plane should returntobase if out of ammo.

Cargo:
Just started working on cargo copter. Hope I'll succeed on this task.

cusaro
Posts: 3
Joined: Thu Aug 30, 2012 6:23 am

Post by cusaro »

Sounds great. I hope sometime AI can use ships. Im waiting for this day since the first skirmish back in 1997.

Thank you.

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

I will focus on the wandering/attack system today.

Then will come:

* Variant system: AI will choose between; Agressive, Defensive, Air, Land, Sea (maybe).
* Adaptive system: AI will change build queue according to enemies behaviours.

EDIT
Image

Guess what it is... Here is a little hint. Image

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

Are these changes published in a git repo somewhere so we can review the code?

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

You may want to test that.

What I know so far:
  • Almost total redo of the AI.
  • Copters: OK (maybe more work around RETURN TO BASE you moron)
  • Planes: OK (more work to come)
  • Build limits: OK (1 radar, silo only when neededs, 1 fix per factory, won't build more than 2 harv per refinery, won't build helipad when their is already an empty one)
  • Engineer capture: OK (beware of them, i mean, seriously)
  • Spy infiltrate: OK (same as engineers)
  • Fast/Total counter attack: OK (pretty usefull)
  • Cargo copter should do the deal... (more work to come)
This is the first "almost" stable release so far. Maybe 10,12h of works on it. I will update this topic to make it looks better and clear when I find my work ready for official sharing.
Attachments
patch.zip
(21.7 KiB) Downloaded 467 times

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff »

This almost seems too good to be true. Exceptional work.

I just hope I don't suddenly wake up in front of my PC, only to see an E1 wandering in circles while a base chokes itself into inactivity.

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

What I would like anytime soon:
* Performance improvement (BONUS).
* AI to use ore truck with allies.
* AI to adapt itself to enemies strategy.
* Fix planes problem (sometime start rotating on top of target).
* AI to use SupportPowers.

cusaro
Posts: 3
Joined: Thu Aug 30, 2012 6:23 am

Post by cusaro »

i wonder what is the problem with ai and water units? i see you drop this from your list.

i'm only a php developer with no c# experiences or such projects but maybe i can try to work this out.

BenjaminLSR
Posts: 43
Joined: Sun May 22, 2011 3:26 pm

Post by BenjaminLSR »

cusaro wrote: i wonder what is the problem with ai and water units? i see you drop this from your list.

i'm only a php developer with no c# experiences or such projects but maybe i can try to work this out.
Feel free to mail me at: valkiriebc@hotmail.fr.
I'm coding AI on my personnal SVN.

I'll maybe give a look at those sea buildings/units. But that's not my priority.

EDIT

For you cusaro, I tried to think about how boats could aim both land/sea/air units.
Image

User avatar
zypres1
Posts: 276
Joined: Mon Oct 24, 2011 8:22 pm

Post by zypres1 »

sweet. Please also make the AI use the mcv if it gets picked up by random, or search for it and use it...

Post Reply