AIs rating how successful their attacks are

AIs rating how successful their attacks are

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
unpossible
Posts: 871
Joined: 10 May 2005, 19:24

AIs rating how successful their attacks are

Post by unpossible »

Can the AIs rate how good that last attack they attempted was and if it was a total failiure (eg all tanks stuck on wrecks and shredded by cannons) improvise a new plan?

for example the AI sends a group of 20 units to the enemy base, they meet up with the enemy's army and the combined firepower obliterates them. Instead of doing the same over and over, the ai could decide to build a heap of bombers and gunships or artillery to back up the next push, or even resort to a massed air attack. Or maybe just make the next army bigger/contain more tech 2 tanks and high tech stuff.

This is all assuming that you can make an ai that'll increase its economy for the whole game if you don't stop it and'll be guarding all its factories with a couple of farks etc :S.

Obviously this is a 'long game' plan and might be incompatble with the faster rushy sort...but assuming a player is able to build a significantly well defended base (a few ambushers can see off most of the AI's as long as they've got units to distract them) there should be some way for the AI to break the stalemate.

Mass brawlers FT[AI]W
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

AAI used learning to counter this at first, and NTAI/KAI used a varied buildtree approach combined with data from experience we'd hardcoded in.

AAI currently still uses the same approach only it's been recoded and changed somewhat, KAI has been subject to a lot of rewritting and we havent seen ought from krogothe in a while, NTAI uses the approach AAI takes now though it has several other attributing factors aside from having variations in the buildtree.

However this problem has been solved, and several solutions should become apparent at the onset of KAI 1.0 and Epic
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Yes unpossible, all that you said is quite possible, i already done some working proof of concepts you mentioned (with the exception of wrecks, which are easy to implement anyhow).
I am having trouble with motivation (spring wont let me do public AI tests with the test cheating builds) and with cpu requirements, which will be fixed once i add threads.
If you dont see my plans for KAI realized in spring, youll see them around once i patent them :wink:
If everything goes well over the weekend, i should have a couple of screenies on the new defensive placement AIs (both global and group) at level one, which select optimal defense locations for a base, being cacheable and dynamic as well. Level 2 will take a while and is dependent of CPU really, but will take more factors into account!
So dont worry, the AIs can only get better as time goes by!
User avatar
mr sharpoblunto
Posts: 24
Joined: 12 Dec 2005, 03:47

Post by mr sharpoblunto »

cpu requirements, which will be fixed once i add threads
Adding threads isn't nessecarily a magic bullet when it comes to improving performance, In fact depending on thier use it can reduce performance because of the extra overhead created by having to perform context switches between threads.

Combined with the fact that concurrency brings with it a whole host of other issues related to maintining integrity of shared data etc. And the fact that some tasks are unable to gain significant advantage through parallelistation, often better performance increases can be gained by improving existing algorithms and implementing efficient caching etc.

I'm not saying that threads are bad or that you shouldn't use them, Just saying that they won't nessecarily be a cure all for performance issues.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

hahah yes, i am fully aware of that, my bad for not expressing myself better! The problem is im doing things that take half a second of CPU time every 2 seconds, and it of course causes a half second freeze every two seconds, whereas with threads you wouldnt notice the slowdown provided your CPU usage was not too high already! Plus there are a lot more background strategic planning and iteration, much akin to a computer playing game of chess, which basically need threads in a real-time environment to work (or pseudo-threads, functions with timers that resume at the start of each frame).
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Can you explain a little bit about how to implement one of these psuedo-threads? It sounds like that might help out. :)
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Post by Chocapic »

i think you can pretty well use threads improving cpu usage and decreasing freezes or such only by keeping them to compute some information that gets more accurate by the time and you keep wanting it from time to time.
thus allowing to have the thread gathering that info and you using it (even if at start not very accurate)without delays, despite at the start its not very accurate.
like for instance denfense building placement.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Choca's post makes about as much sense as mine! But that just shows he "gets it" in AI!
Pseudo-threads are simply loops that check against a timer and stop if the time is over the time taken for a frame (33ms, but variable), resuming on the next frame. Youre better off with real threads (I am anyways!)
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Threads are a bit much for me, considering I just learned C++ this week :)
Post Reply

Return to “AI”