[dev] Gecko AI

Topic for keeping tracks of updates

Discussion about the game and its default mods.
Post Reply
Gecko
Posts: 51
Joined: Mon Oct 04, 2010 10:05 pm

[dev] Gecko AI

Post by Gecko »

I'm currently working on creating a rather generic AI system for OpenRA (Only for the RA mod at this time)

You can find the most recent published sources @ http://github.com/geckosoft/OpenRA/tree/gecko_ai

I'll use this topic to inform of changes.

If you think you got a great idea for a bot to have, do tell :)

To give you the idea of the bot layout (system not feature complete yet):

Code: Select all

	RABot:
		InternalName: Gecko AI | Cheats!
		Brains:
			RETURN_FIRE:
				OnDamaged:					
					ReturnFire:
		Triggers:				
			INIT_CHEATS: Called on start (gives fast building) - Dev mode must be enabled!
				Enabled: true
				Actions:
					PlayerOrder: DevFastBuild
					DisableTrigger: 
			DETECT_MCV_DEPLOYED:
				Enabled: true
				Actions:
					Debug: MCV Deployed!
					DisableTrigger:
				Conditions:
					Actors: 
						fact: Detect CY
							<=Amount&#58; 1
			DETECT_CY_DESTROYED&#58;
				Enabled&#58; false					
				Conditions&#58;
					Actors&#58; 
						fact&#58; Detect CY
							Amount&#58; 0
				Actions&#58;
					Debug&#58; Construction Yard destroyed!
					DisableTrigger&#58;
					EnableTrigger&#58; DETECT_MCV_DEPLOYED	
			
		Groups&#58;
			BASESETUP&#58;
				Priority&#58; 2
				Actors&#58;
					powr&#58;
						Id&#58; PowerPlants
						Priority&#58; 1
					proc&#58;
						Requirements&#58;		
							Actors&#58;
								powr&#58; 1	
					tent&#58;
						Requirements&#58;		
							Actors&#58;
								powr&#58; 1
								proc&#58; 1		
					barr&#58;
						Requirements&#58;		
							Actors&#58;
								powr&#58; 1
								proc&#58; 1	
			WARFACTORY&#58;
				Priority&#58; 2
				Actors&#58;
					weap&#58; 1
				Requirements&#58;
					Group&#58; BASESETUP
			BASEUNITS&#58;
				Priority&#58; 3
				Actors&#58;
					e1&#58;
						Chance&#58; 50
						Amount&#58; 5
						Brain&#58; ONDAMAGEDTEST						
					e3&#58;
						Chance&#58; 50
						Amount&#58; 5
						Brain&#58; ONDAMAGEDTEST	
				Requirements&#58;
					Group&#58; BASESETUP
			AUTOPOWR&#58;
				Priority&#58; 3
				Description&#58; Automaticly builds Power Plants &#40;POWR&#41; when available energy is < 20% of total energy
				Actors&#58;
					powr&#58;
						CountActors&#58; false
						Requirements&#58;
							Power&#58;
								Type&#58; 1
								<Available%&#58; 20
								

[/code]

Iran
Posts: 92
Joined: Wed Sep 08, 2010 3:16 pm

Post by Iran »

Will it support splitting the AI mind into multiple files? How are you gonna handle different sides and difficulty settings?

This looks like a great start.

Gecko
Posts: 51
Joined: Mon Oct 04, 2010 10:05 pm

Post by Gecko »

Mind is just stored in YAML, cant really split up.

I has support for multiple sides already : The AI works on all sides + you can, in the 'groups', define both barracks for example (soviet / allies) and it'll ignore if the building is from the other side.

Might improve this later, but with the new trigger system, you can do things clean and have different groups per side :)

Iran
Posts: 92
Joined: Wed Sep 08, 2010 3:16 pm

Post by Iran »

Hmm, that's a nice way to support multiple sides. Wouldn't it be possible to split taskforces and miscellaneous settings up into seperate YAML files? I could imagine that one file can get pretty big.

Gecko
Posts: 51
Joined: Mon Oct 04, 2010 10:05 pm

Post by Gecko »

Actually, I think you can (ab)use Inherits for this :)

edit: Nope cant :(

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

You can merge multiple yaml files just fine.

Matt
Posts: 1144
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »

Note: someone offered a monetary bounty: Donating to AI dev

Post Reply