Fransottos aiBots

Added tweaked Ai/Bots for openRA, now updated again.

Information and discussion for custom maps and mods.
Post Reply
fransotto
Posts: 4
Joined: Fri Jan 21, 2022 8:57 pm

Fransottos aiBots

Post by fransotto »

Hello,

I have played OpenRA for many years and 99% of the time skirmish games against bots. Anyway, I have decided to share my latest bot files.

I am doing the tweaking like this; Once I have made some alteration, I do a round of games; 8 bots FFA, 8 bots team on two different maps -one map there the ore is "behind" the base and one map there the ore is in the middle of the map, a single bot against "rush ai" and myself playing against them all with superweapon on.

The bots are not optimized for naval warfare and games on very small maps.



Installation;
Replace the mod.yaml in the "C:\Program Files\OpenRA\mods\ra" folder and then add the bot files in the "C:\Program Files\OpenRA\mods\ra\rules".


The bots are so far (more will come)

-"Air AI"
This bot is my "original bot" and my try to make a bot concentrating on air. No success, however its attacks are a little tweaked so the bot is not wasting the planes and helicopters in the mindless way the standard bots are doing. A pretty weak due to aircrafts is such sinkhole for the AI, but fun bot anyhow.

-"Horde AI"
The bot aims for 4 barracks and 4 factories as soon as possible in order to pump out rocket soldiers and artillery, it takes a while before it attacks but it doesnt takes too long before it start sending waves of approx 50 units.

-"Base AI"
The Base crawler. I am still tweaking the amount of mcv it is suppose to spawn contra factories and refineries. For the moment I am happy as it beating the standard bots frequently. Play with the rule you/bots are allowed to build within allies bases and you will see a pretty quick total take over of a map.

-"Raid AI"
More of a "support bot" to the other three one. Quite weak bot. The aim is to as fast as possible send 5 units on raid and constant sending out these small parties to interrupt other AI, destroy harvesters or just be general annoying. The build order goes quite fast to nuke as well. This bot builds medics, mechanics and Tanya. The code for engineers are there as well. The engineers and mechanics starts to take other buildings but is interrupted all the time for some reason. The medics however is working just fine and Tanya and two medics can actually be quite fun to see in action.

These bots are made for having fun. I always play with nukes and "build off allies", to get some more challenge I combine the "Raid AI" with one of the other to get some "randomness" in the attacks. These bots does not show the full potential if they start to expand with navy.

For examples here comes some screen shots from a game there the "four standard AI" is against these four;

https://1drv.ms/u/s!AvRys0HbiMNaukWk_S4iFQxcQB0v
The "Raid AI" doing an attack quite early into the game, the bot is aiming for some quick barracks, some quick defense. Before it starts to develop into a "full base".

https://1drv.ms/u/s!AvRys0HbiMNaukJgrEKQGkylB3bz
The "AIR AI" aims for a quite soft start with 2 factories, 2-3 refineries and a barrack. The "air ai" goes normally for 2 barracks and 2 factories as default in order to pump out units a little faster.

https://1drv.ms/u/s!AvRys0HbiMNaujws1nEErnfnMKzu
The "Horde AI" starts slow and use to get beaten fast on maps there the AIs are close to each other. However, once it has the base fleshed out it becomes a powerhouse. Maybe not the most efficient squad setup, but its fun.

https://1drv.ms/u/s!AvRys0HbiMNaukHSccZXxKDcgFr7
The "Base AI" crawling slowly. If this AI left unattended it just becomes way too big -At this screen shot it has been recently hit by 3 nukes any other AI would have crumble.

https://1drv.ms/u/s!AvRys0HbiMNaukPgH0M5XvOBXDva
Example of when the "Air AI" is retreating, it works quite well with the aircrafts also so this AI is not really wasting units like the others. Of course it makes some really strange decision, but hey -nobody is perfect.

https://1drv.ms/u/s!AvRys0HbiMNauja1i8i7R6nCfuXT
The "Raid AI" got Tanya, a medic, a rocket solider and a artillery running around creating havoc. I must have Tanyas explosive up and running one day!

https://1drv.ms/u/s!AvRys0HbiMNaujTa4sFrbeh_E13L
Just before this game ends. To show the "base AI" expansion. As said before, combine this AI with another one to get a quite nice challenge.
Attachments
fransottoai3.zip
(10.82 KiB) Downloaded 55 times
Last edited by fransotto on Thu Jan 27, 2022 10:22 am, edited 3 times in total.

fransotto
Posts: 4
Joined: Fri Jan 21, 2022 8:57 pm

Re: Fransottos aiBots

Post by fransotto »

Instructions how to install the bots have changed. Replace the mod.yaml in the "C:\Program Files\OpenRA\mods\ra" folder and then add the bot files in the "C:\Program Files\OpenRA\mods\ra\rules".

The bots are now updated with following changes.

-Air;
*Aircrafts tweaked a little more in order to not do kamikaze attacks against enemy base, more likely to attack harvesters and do base defense tasks. In order to save some economic the helipads and airfields are constructed a little later into the game.

-Base;
*Better base defense and smaller attack squads. Added use of mechanics and they are sometimes repairing if any own or allied units is within range. Added thieves as well.

-Horde;
*A more aggressive approach toward weapon factories and barracks.

-Raid;
* Engineers and thieves are now doing ok. Not perfect but its a fun addition. You really have to watch out for thieves late game. Also demolition trucks are added. Use ukraine for best experience :)

fransotto
Posts: 4
Joined: Fri Jan 21, 2022 8:57 pm

Re: Fransottos aiBots

Post by fransotto »

Time for another update.

The zip file in the original post is updated.

Changes;

-In general; Air, Horde and Base do now build mechanics, I have noted that mechanics if stays in the base occasionally repair harvesters coming nearby. Pretty neat and fun. Air and Horde also build 1-2 extra construction yards. It comes a little too early in the game but against the standard AI it works really well.

-Air bot; more tweaking of the air units. The idea is to have them showing up "mid game" as there are more targets not protected by base-defense at that time. Works quite ok. As air units and ground units seem to share same settings the squads size and composite has change a little. It might be that I tweak this bot to become more like a "tech-bot" later on. As for now it doing fairly good against the "rush-ai" and "horde-ai".

-Horde bot; I am happy with this bot by now. According to me the most challenging and strongest bot in OpenRA. A little slow in the start but becomes a really nice powerhouse once all the factories and refineries are up and running.

-Base bot; The balance between base expansion and base defense works quite ok. Increased the squad size so it defends its harvesters quite ok by now. A little slow in building nukes. Its really hard to try to stop this bot with only nukes and air attacks.

-Raid bot, I have now manage to rush a engineer so watch out! -In almost each game you will have an engineer trying to take over refinery or construction yard for you within the first minute. Engineers and thieves are tweaked more so the capture rate is quite high. The bot actually takes over oil derricks and other neutral buildings at rare occasions. As earliuer mentioned, this bot works best as a ally or support to other bots. The plan is to make it expand with small tight well defended bases around the maps. Works sometimes for the moment.

fransotto
Posts: 4
Joined: Fri Jan 21, 2022 8:57 pm

Re: Fransottos aiBots

Post by fransotto »

Question to all you modders out there; Does it work to add LUA scripts to the Ai-yaml files like it does to the map files? To take these Ai to the next level I need to have custom "rules", like having aircrafts attack/avoid certain units.

abcdefg30
Posts: 526
Joined: Mon Aug 18, 2014 6:00 pm

Re: Fransottos aiBots

Post by abcdefg30 »

It is possible to edit the World actor from ai.yaml to reference Lua scripts, as the game's yaml merger should take care of consolidating that and world.yaml. The Lua scripts still need to be separate files though.

Post Reply