Jump to content


Photo

C&C3 Advanced AI objectives list.


  • Please log in to reply
75 replies to this topic

#21 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 05 September 2007 - 07:06 PM

Yeah it would be nice to see what you have so far. And I have the SDK working now But the AI looks so confusing. Could you Tell me a few things like what is

Overlord AI?

And loads of things I just dont understand that you might would be good for an explanation thanks ^_^

#22 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 05 September 2007 - 07:50 PM

Overlord = Steamroller Personality in-game. It also could be Offensive = Steamroller but unclear. Doesn't really matter as I'm using the Optimal or Balanced one. Thats all those Personalities are designated. Its decently straightforward ^_^
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#23 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 05 September 2007 - 07:54 PM

So your making all changes to Ballanced witch is Optimal.

I also Dont have a clue what Files I should be looking at any thoughts?

#24 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 05 September 2007 - 08:03 PM

What to look at depends what you want to achieve. What is it you want to do out of the grand ToDo list?

I'm on all building placements and general teching.

What comes next is tactics. This is what I need you chaps to look at then we can start merging code.

For example.. for the GDI AI to create a Sniper Squad then go to outside the enemy's base, create a 2xJuggernauts and then, using the Sniper's to paint the area so the Juggernauts fire from incredible range we have the following (using the GDIOptimal personality for example):

File: \CnC3Xml\SkirmishAI\Personalities\GDIOptimal.xml
Lines:
<States State="GDIOptimalSiege" Difficulty="MEDIUM HARD BRUTAL"/>
<States State="GDIOptimalSpotters" Difficulty="MEDIUM HARD BRUTAL"/>
What it does: Loads the 2 Tactic triggers for all three difficulty settings

<TacticalTarget TacticalAITarget="SiegeTarget" MaxTeamsPerTarget="1"/>
	<TacticalTarget TacticalAITarget="SiegeTarget" MaxTeamsPerTarget="1"/>
	<TacticalTarget TacticalAITarget="SiegeTarget" MaxTeamsPerTarget="1"/>
What it does: Sets the # of participants involved.

File: \CnC3Xml\SkirmishAI\States\GDIOptimalStates.xml
Lines:
<AIStrategicStateDefinition
		id="GDIOptimalSiege"
		UnitUpgradeMultiplier="0.0">
	<Heuristic>
	  <PathToTargetHeuristic PathExists="true"/>
	  <LateGameHeuristic/>
	  <SiegeThresholdHeuristic SiegeMode="true" Threshold="4.0"/>
	</Heuristic>
	<TargetHeuristic TargetHeuristic="ClosestStructureHeuristic" TargetType="SiegeTarget"/>
	<Tactic Tactic="SimpleSiege" TargetType="SiegeTarget">
	  <TeamTemplate MinUnits="2" MaxUnits="2" IncludeKindOf="CAN_ATTACK" ExcludeKindOf="AIRCRAFT" AlwaysRelease="false" AlwaysRecruit="false">
		<CreateUnits UnitName="GDIJuggernaught"/>
		<CreateUnits UnitName="GDIJuggernaught"/>
	  </TeamTemplate>
	  <TeamTemplate MinUnits="6" MaxUnits="10" IncludeKindOf="CAN_ATTACK" ExcludeKindOf="AIRCRAFT" AlwaysRelease="false" AlwaysRecruit="false"/>
	</Tactic>
  </AIStrategicStateDefinition>

  <AIStrategicStateDefinition
	id="GDIOptimalSpotters"
	UnitUpgradeMultiplier="0.0">
	<Heuristic>
	  <PathToTargetHeuristic PathExists="true"/>
	  <LateGameHeuristic/>
	  <SiegeThresholdHeuristic SiegeMode="true" Threshold="4.0"/>
	</Heuristic>
	<TargetHeuristic TargetHeuristic="SafestToGroundStructureHeuristic" TargetType="SiegeTarget"/>
	<Tactic Tactic="DefenseAvoidanceAttack" TargetType="SiegeTarget">
	  <TeamTemplate MinUnits="2" MaxUnits="2" IncludeKindOf="CAN_ATTACK" ExcludeKindOf="AIRCRAFT" AlwaysRelease="false" AlwaysRecruit="false">
		<CreateUnits UnitName="GDISniperSquad"/>
		<CreateUnits UnitName="GDISniperSquad"/>
	  </TeamTemplate>
	</Tactic>
  </AIStrategicStateDefinition>
What it does: Builds both Sniper and Juggernauts to set up for the tactic

File: \CnC3Xml\SkirmishAI\Targets\AITargetHeuristics.xml
Lines:
For Juggernauts:
<AITargetingHeuristic
	id="ClosestStructureHeuristic"
	HeuristicType="EnemyStructure"
	ReturnTargetType="Structure"
	SortType="Distance"
	VitalKindOf="STRUCTURE"
	ForbiddenKindOf="NEUTRAL_TECH CIVILIAN_BUILDING WALK_ON_TOP_OF_WALL DEFENSIVE_WALL WALL_UPGRADE WALL_HUB WALL_SEGMENT WALL_GATE BASE_FOUNDATION"
	/>

For Snipers:
<AITargetingHeuristic
	id="SafestToGroundStructureHeuristic"
	HeuristicType="EnemyStructure"
	ReturnTargetType="Structure"
	SortType="ThreatToGround"
	VitalKindOf="STRUCTURE"
	ForbiddenKindOf="NEUTRAL_TECH CIVILIAN_BUILDING WALK_ON_TOP_OF_WALL DEFENSIVE_WALL WALL_UPGRADE WALL_HUB WALL_SEGMENT WALL_GATE BASE_FOUNDATION"
	/>
What it does: Sets the tactical behaviour of how the units get into place to make the overall tactic work.

Essentially, the hardest part of creating a tactic for 2 or more units to involve themselves cooperatively is the script you create in \CnC3Xml\SkirmishAI\States\GDIOptimalStates.xml . Thats where all the fun is.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#25 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 05 September 2007 - 08:10 PM

Ok that sounds easy But what part is the script. Eg what part tells them to do it after they are built?

#26 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 05 September 2007 - 08:21 PM

Edited more above.. GDIOptimalStates.xml, for the Optimal Personality, is the MAIN SCRIPT.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#27 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 05 September 2007 - 08:22 PM

I need to do some basic work and do some changes so I can see if they work Mainly Build orders.
I guess thats done in opening moves?

#28 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 05 September 2007 - 08:27 PM

BuildOrders do sorta work.. I'm working in that field. Problem is I can't force build defenses like an Obelisk. There is a script controlling that somewhere BUT when it comes to Tech buildings for example.. this I can control. Generators are, however, built based on if the AI fails below a threshold and needs to emergency build them to get very critical power.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#29 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 05 September 2007 - 08:32 PM

<SkirmishOpeningMove
	id="GDI_EASY"
	Side="GDI">
	<Order Build="GDICrane" />
	<Order Build="GDIRefinery" />
	<Order Build="GDIRefinery" />
	<Order Build="GDIPowerPlant" />
	<Order Build="GDIRefinery" />
	<Order Build="GDIPowerPlant" />
	<Order Build="GDIWarfactory" />
	<Order Build="GDIWarfactory" />
	<Order Build="GDIRefinery" />	


I changed this around But I dont know 1 if it will work and 2 How do I compile a mod Its hard.

#30 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 05 September 2007 - 08:37 PM

1) Yes it will work but thats alot of Refineries d00d. Keep it real.
2) There is a thread I created in the CNC3.net Editing forum on this. Go there.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#31 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 05 September 2007 - 09:41 PM

I've just had a first AI-instead-of-me-game and honestly, that AI sucked :p It would have never won without my help...
You (thudo) are still working that way though, is that correct?
Also somehow the speedup didn't take effect, but maybe that's just the pure old "cannot override gamedata.ini" thing.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#32 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 06 September 2007 - 01:23 AM

Don't trust the AI scripts when the AI is playing as you! Thats the first thing I noticed. The AI scripts fire off correctly as the OTHER player which is the natural AI player. The AI-as-you player is NOT the true representative of the AI scripts. Generally, yes, but don't entirely trust it. Always watch the 2nd player (The AI) on the other side of a 1vs1 map for your results.

As for why the game isn't running super-fast: if you guys want the .big file I created that makes the game so insanely stupidly quick just PM me your emails and I'll send it.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#33 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 06 September 2007 - 12:29 PM

Well Maybe the Other Files that we dont know what they do control the AI/Human AI maybe they have some soft scripting and such like a few small build orders.

Just An idea. Also Them changes I made didnt take effect is there a way to change that build order I created to a brutal AI and make the weighting higher if so how?

Also Where Can I get the Gamedata or could you upload yours thudo with the FPS change and the Ai override things that would help me greatly:)

Thanks Hogo

#34 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 06 September 2007 - 01:30 PM

Find it attached below.

What it gives:
o AI controls human player
o Insane Game Speed (good for quickly testing games)
o Camera now can zoom in super-low

How to get it working:
Simple. Unzip the attachment below into your <installed CNC3 folder>\Core\1.8. Thats it!
Run the game as usual.

Attached Files


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

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#35 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 06 September 2007 - 04:56 PM

Is there a way this can be turned into a standard mod? That way people can select it when launching the game.

#36 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 06 September 2007 - 05:04 PM

Of course.. use it like a regular C&C3 mod if you like as outlined in the C&C3 Editing forum on how to get mods working ingame. I just prefer my method as it always is running which I want.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#37 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 06 September 2007 - 09:15 PM

How do you change the Weighting of Opening Build Orders and Difficulties? Would help greatly

Thanks

#38 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 07 September 2007 - 01:22 PM

Its in the \CnC3Xml\SkirmishAI\States\AIStates.xml file. You will see Unit Preferences based on the tactic used. ie.

<AIStrategicStateDefinition
  id="GDIUnitPreferences"
  UnitUpgradeMultiplier="0.0">
	<Heuristic>
	  <ConstantHeuristic Weight="999.0"/>
	</Heuristic>
	<UnitModifierByName UnitName="GDIZoneTrooperSquad" UnitPreferenceOffensiveModifier="300%" UnitPreferenceDefensiveModifier="100%"/>
	
	<UnitModifierByName UnitName="GDIPitbull" UnitPreferenceOffensiveModifier="175%" UnitPreferenceDefensiveModifier="100%"/>
	<UnitModifierByName UnitName="GDIAPC" UnitPreferenceOffensiveModifier="175%" UnitPreferenceDefensiveModifier="100%"/>
	<UnitModifierByName UnitName="GDIPredator" UnitPreferenceOffensiveModifier="200%" UnitPreferenceDefensiveModifier="100%"/>
	<UnitModifierByName UnitName="GDIMammoth" UnitPreferenceOffensiveModifier="300%" UnitPreferenceDefensiveModifier="100%"/>
	<UnitModifierByName UnitName="GDIJuggernaught" UnitPreferenceOffensiveModifier="300%" UnitPreferenceDefensiveModifier="100%"/>

	<UnitModifierByName UnitName="GDIGolumCannon" UnitPreferenceOffensiveModifier="150%" UnitPreferenceDefensiveModifier="100%"/>
	<UnitModifierByName UnitName="GDIAABattery" UnitPreferenceOffensiveModifier="100%" UnitPreferenceDefensiveModifier="50%"/>
	<UnitModifierByName UnitName="GDITerraformingStation" UnitPreferenceOffensiveModifier="200%" UnitPreferenceDefensiveModifier="100%"/>
  </AIStrategicStateDefinition>
These are the standard preferences the AI gives for units. Not also it gives preferences to Defensive buildings as well. Not sure why they called the Sonic Tower the GDITerraformingStation. Very odd.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#39 Hogo

Hogo

    Pro Mapper XD

  • C&C Guild Staff
  • 1,295 posts
  • Location:England
  • Projects:Enemy Enhanced, Mapping
  •  Friendly face
  • Division:C&C Guild
  • Job:Division Staff

Posted 07 September 2007 - 03:17 PM

1 Last thing Does this also Apply to Base Building Ones like I make a build order can I make that Bo Used more than others?

#40 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 07 September 2007 - 03:30 PM

Well thats what I am trying to find out. The \OpeningMoves folder has the xmls to determine how the AI builds its initial structures. I generally force it to build right to the Superweapon and its MUCH better at getting to, say, the TempleofNod faster without compromising its offensive and map dominance. I am, however, trying to get the AI to build more Stealth Gens just because they really screw the enemy up but fortunately I have allowed the AI to spread Stealth Gens around now so they cover a better width of his base. Before it was set to Center or some useless placement. Now its more widespread.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users