Jump to content


Photo

AI computing cycles question


3 replies to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 05 August 2007 - 07:49 PM

Hi Arkhan. How many calls is the AI making to squad tactics lategame.Did you change anything ? I have some code which worked before but in a big 4 vs 4 battle I now can see chaos slavers kill themselves with forced labour one after the other. The labour-off limit seems to be missed.

function SlaveTactic:DoAbilities()

	-- Forced labour if we're doing well and building
	if (self.squad_ai:GetHealthPercentage() > 0.4 and self.squad_ai:IsBuildProgressing() and not self.forced_labour) then
	
		-- Turn on ability
		self.squad_ai:DoSpecialAbility( Slave.forced_labour )
		self.forced_labour = true
	
	elseif (self.forced_labour and self.squad_ai:GetHealthPercentage() < 0.3) then
		
		-- Turn off ability
		self.squad_ai:DoSpecialAbility( Slave.forced_labour )
		self.forced_labour = false
	end
end

Edited by LarkinVB, 06 August 2007 - 08:22 AM.


#2 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 05 August 2007 - 09:23 PM

In 2.5 I only changed the AI Highspeed mode.

Normally, there are two cycles per second. The cycles switch between tactics and strategies + plans. In a normal 8 AI players late game, it would therefore take up to 8 seconds until the tactics are called again. With AI Highspeed option it gets even worse with 16 seconds.

The current settings are

function SlaveTactic:DoAbilities()

	-- Forced labour if we're doing well and building
	if (self.squad_ai:GetHealthPercentage() > 0.6 and self.squad_ai:IsBuildProgressing() and not self.forced_labour) then
	
		-- Turn on ability
		self.squad_ai:DoSpecialAbility( Slave.forced_labour )
		self.forced_labour = true
	
	elseif (self.forced_labour and self.squad_ai:GetHealthPercentage() < 0.6) then
		
		-- Turn off ability
		self.squad_ai:DoSpecialAbility( Slave.forced_labour )
		self.forced_labour = false
	end
end

and I think they are enough to handle 8 AI's. I increased the forced labour stop limit in one of the last versions, since it was already too much for them. I guess your stats are from DowPro. I'd advice to raise them too.

Edited by ArkhanTheBlack, 05 August 2007 - 09:25 PM.


#3 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 07 August 2007 - 07:44 AM

In a normal 8 AI players late game, it would therefore take up to 8 seconds until the tactics are called again. With AI Highspeed option it gets even worse with 16 seconds.


Are you sure ? 8 seconds is long enough to make decisions like fleet of foot, force labour or armored nobz surge unusable. 8 seconds is likely more then enough to kill a slave with forced labour in any case, regardless of limits to switch on/off.

#4 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 07 August 2007 - 11:05 AM

Well, the worst case is usually 7 seconds since 8 AI games are only test scenarios. Lots of AIs usually means a big map, and therefore the walking times are longer which reduces the FoF problem.

Forced labour does work with the current settings, therefore it's not really a problem. Not sure about nobz surge. But a reduced effiency of some abilities is simply a price we have to pay to handle lots of AI's...



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users