Page 1 of 4

[DEV] BetaAI | TOTAL REDO ?

Posted: Tue Aug 28, 2012 12:34 pm
by BenjaminLSR
Needs a total redo.

Posted: Tue Aug 28, 2012 8:25 pm
by BenjaminLSR
First test with airplanes and copters. Almost done.

Posted: Tue Aug 28, 2012 8:42 pm
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).

Posted: Tue Aug 28, 2012 8:53 pm
by BenjaminLSR
AI captured buildings.

Posted: Wed Aug 29, 2012 4:40 am
by chrisf
Looks like solid improvements.

Posted: Wed Aug 29, 2012 5:47 am
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.

Posted: Thu Aug 30, 2012 6:30 am
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.

Posted: Thu Aug 30, 2012 7:30 am
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

Posted: Thu Aug 30, 2012 9:28 pm
by chrisf
Are these changes published in a git repo somewhere so we can review the code?

Posted: Thu Aug 30, 2012 9:35 pm
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.

Posted: Thu Aug 30, 2012 10:34 pm
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.

Posted: Fri Aug 31, 2012 9:39 am
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.

Posted: Fri Aug 31, 2012 10:27 am
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.

Posted: Fri Aug 31, 2012 10:39 am
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

Posted: Sun Sep 02, 2012 1:38 am
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...