Jump to content


Photo

Analysis of AI under T&H and CA winning conditions


16 replies to this topic

#1 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 11 February 2005 - 02:09 PM

Tested under HARD and HARDER skills on map 2p_Fallen City with Ork opponent.

Generally, under both T&H and CA, the AI preformed the same - captured everything around it and expanded quickly outward. When I came and overtook his LPs, he would react accordingly although under HARD setting he would attack more frequently. Under both skills, he did push me back here and there but not by much. When I captured the required 66%+ of either the Critical or StratPoints (depending on the winning condition), the HARD AI would still attack more often provided it had built up enough troops. On Harder, it attacked less frequently BUT with a much larger force.

I understand what is going on and why the AI can easily get pushed back. The main differences between HARD and HARDER/INSANE is in the lines:

buildbasestrategy.ai - HARD (Ork side used)
 --percentage of opponents army to build up to
  max_army_percentage = 0.9,
  --attack rating needs to be greater than this prorated to attack
  attack_rating = 300,
Whereas under HARDER/INSANE the AI takes longer to get a much larger force which is then used to strike. The problem is the AI needs to understand that when an opponent captures 66%+ of the LPS/Critical Locations and the countdown starts it needs to set a new priority schedule -> ATTACK WITH EVERYTHING or build troops/vehicles quick and rush rush rush! Then once it takes a point and the opponent's countdown is off, it can hold the area, continue to buildup, then assault again. Further, having a lower attack_rating makes the AI attack far more frequently as noted in the different skillsets (Standard AI has a -1500 attack_rating so it keeps sending units). Its strange to note the Orks have a 300 attack_rating while the others have between 100-200 hence the reason they attack more often. Nevertheless, the Ork AI under HARD attacked quite often.

I'm sure this can be scripted to ensure the AI is competitive so if any opponent has a certain percentage of the Critical points/LPs it will go all-out in a "do-or-die" mentality and attempt to take it. Perhaps a new attack_rating should be made just for T&H and CA winning conditions where all AIs get a lower attack_rating so they are more apt to attack rather than waste valuable moments building up to their target assault size then unleashing it.

Comments for the team?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#2 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 11 February 2005 - 03:17 PM

Comment: Push back after beta release. To do it right a lot of coding is required. AI can't react if strat point is on unreachable plateau for walkers for instance. We should concentrate on annihilate first as this is far easier.

#3 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 11 February 2005 - 03:41 PM

I agree.. That can wait til the next release. I guess a Valentine's Release would be quite suitable. :dry:
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#4 giskard

giskard
  • Members
  • 155 posts

Posted 11 February 2005 - 03:56 PM

Theres something else involved here.

Theres a Max Int line or something like that, that basically says if you dont have enough troops then attack anyway. This is actually the default for easy difficulty but the very easiest attacks on harder difficulty levels also use this too.

The line that lists the units the AI should always have causes it to retreat when its unit numbers drops to this mark. Yet it helps the AI build up a large attack force quicker because it always keeps that amount of units spare.

I have seen the AI build up large armies by pulling back 2 units when an attack went badly. It doesnt take long and it can do a lot with 2 units to improve its situation.

Giskard

#5 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 11 February 2005 - 04:12 PM

Yep.. seen that too! However, when anyone plays these win conditions and have been beaten back allowing one's opponent to take over the lead, its desperation time! Once that countdown starts for your opponent, you go into "hyper mode" and "go all out" to make sure they don't reach the finale.

I'm sure we could put in a simple script that says If EnemyPlayer owns % of StratPoints/objectives then attack. Once done, reset state and continue on as normal. I think this would not be too hard to accomplish.

If we can get this perfected this would be huge for the community as T&H and CA are important game modes as they extend the game behind just pure deathmatch. Again, unless we can come up with something then we'll leave it for next release.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#6 quiet_man

quiet_man
  • Members
  • 33 posts

Posted 11 February 2005 - 07:33 PM

@thudo
had a bussy week but have some time at the weekend and plan to take a closer look at the code.
If you want me to test a new version, just send it by e-mail.

My current plan on the long term is to look after the general strategy part. Like reakting to long range attacks (always an AI issue) or the decision tree we discussed.
But I will need some time to understand more of the code.

quiet_man

#7 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 11 February 2005 - 08:09 PM

I'm sending the latest build to you guys tonight! I have Corsix. Larkin, and your email but don't have Giskard's email. Have I missed anyone?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#8 giskard

giskard
  • Members
  • 155 posts

Posted 12 February 2005 - 10:30 AM

Thudo: You need an entry like this to be enabled once that counter starts.

{--attack rating needs to be greater than this prorated to attack (always attack)
  attack_rating = -500,

The Int_Max var controls that stuff in other scripts. However the uplove line is from the easy buildbasestrategyinfo.a and basically does what you require. But in easy mode it attacks with what it has available which usually isnt a lot.

At harder difficulty levels it should be better.

I think its the attackplanai.ai that is used to switch tactics and can control the above stuff. Need to check that out though to be certain. Ive played with this my self and seen improvements but my heads full of file backup plans and reorganising my files at the momentment so i dont have time.

Giskard

Edited by giskard, 12 February 2005 - 10:33 AM.


#9 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 12 February 2005 - 06:23 PM

Yea I realized the lower the attack_rating value is the faster he attacks..

The problem is: if we set the value low for all our Difficulty Skills then the game divulges into any braindead RTS AI out there -> AI that just keeps blindly sending cannonfodder towards the player. For T&H and CA, this value might be useful when an AI looses 65%+ of the Strat/CritiicalPoints on a map. Even then, however, any player just can't keep sending fresh troops not reinforced or upgraded into combat. U need a sizable force to effectively take over points if the enemy took them from you.

A Dynamic attack_rating that changes for the situation would rock.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#10 quiet_man

quiet_man
  • Members
  • 33 posts

Posted 12 February 2005 - 08:37 PM

I have the impresion the AI is going to much for light units in late games

what happens if the AI forces are just bashed and it is low resources? Not income but reserves!!!
will it start building light units and as this units are fast build and as fast lost, it might never get enough resources to build heavy ones?
Or it might reach the unit cap?

how can we make sure that it goes for heavy units?

quiet_man

#11 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 12 February 2005 - 09:00 PM

The AI goes for balanced forces - For Ork, as example, he'll buid Nobs, Sluggas, StormBoyz, Shootas and mix 'em with Loot Tanks, KillKans, and WarTrakks so its purely balanced. I watched this extensively and its not a prob. The thing is: to get the AI "to be desperate" when that clock sounds or when the opponent captures 65%+ of the winning conditions requirements. That would make the AI go nuts and start focusing on getting one or more of those opponent's assets quickly to stop that clock.

Edited by thudo, 12 February 2005 - 09:00 PM.

Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#12 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 12 February 2005 - 09:24 PM

AI should react on special take and hold situations. It should adept while playing different map sizes and should consider its starting position. There are maps where it is directly facing the enemy in short distance OR be safe in the last corner depending on its start position. All this amd much more should be added. My next goal though is to send jumpers/teleporters to unreachable positions.

Btw, why don't you release the beta ?

#13 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 12 February 2005 - 09:28 PM

I am in the last few hours of testing.. Yes I'm a little anal. :p Corsix would hit me over the head with a wet noodle being a little on the tardy side. Just some final minor things then I'll send it to all of you and ensure Corsix gets what he needs to package our first v1.0 up! Yehaaaa!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#14 Corsix

Corsix

    Code Monkey

  • Hosted
  • 290 posts
  • Location:Berkeley, UK
  • Projects:DoW AI, DoW Mod Studio
  •  Blue Text :)

Posted 12 February 2005 - 10:42 PM

Corsix would hit me  over the head with a wet noodle being a little on the tardy side

<{POST_SNAPBACK}>

Did you forget a 'for' in there: Corsix would hit me over the head with a wet noodle for being a little on the tardy side
Posted Image

#15 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 12 February 2005 - 10:46 PM

Yes Oh Grammatically-correct superior being. :p
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#16 Corsix

Corsix

    Code Monkey

  • Hosted
  • 290 posts
  • Location:Berkeley, UK
  • Projects:DoW AI, DoW Mod Studio
  •  Blue Text :)

Posted 12 February 2005 - 11:04 PM

lol (I didn't even know what tardy meant half an hour ago)
Posted Image

#17 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 14 February 2005 - 01:50 PM

Looking deeper into the AI sources it seems that BigFoot did not finish the code that will let the AI react to T&H.

This functions is never used AFAIK :

--counter victory objective
function CpuManager:CounterVictoryObj()

	self:Reset()
	
	local attack_strat = self:AddStrategy( "AttackStrategy", 1 )
	
	--make the attack strategy attack strategic objectives no matter the cost
	attack_strat:SetVOFlag()
	
end

Can you confirm ?

Edited by LarkinVB, 14 February 2005 - 01:53 PM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users