Room AI Tricks

ROOM AI TRICKS

These are AI snippets that I’ve developed. Feel free to use them, or tinker with them to get what you need. If you understand how they all work, you’ve mastered AI. 🙂 

Target teleport while boarders are there 

Once teleport becomes common in your opponents, you generally want to shoot the teleport to weaken the boarding crew before your ship is overrun. After the boarding crew are dead, you would rather be shooting a different room type. 

With python 2, the below AI is a good solution. It uses the fact that you won’t do hull damage until all the crew are dead in the teleport. You’ll keep targeting the teleport even if it’s repaired, until the enemy ship has taken hull damage, then you’ll switch to the enemy shield. Command 2 makes sure that you maintain focus fire on the shield room you pick first (SHL or SB) by continuing to target it if it’s damaged. If there are no shields it will go to command 5.

1) None – Increase power by one
2) Enemy room HP < 50% – Target condition room
3) Enemy ship has full HP – Target enemy teleport 
4) None – Target enemy shield
5) None – Target enemy missile

Python 3 can accomplish the same thing with the continue current job command. This AI uses focus fire to initially target the teleport with command 2, and command 3 to stay locked on it. However, once the crew is dead, command 3 is false and the next true and valid command is 5/6/7 depending on what rooms the opponent has, so the weapon room will retarget. However once it chooses the first available room from commands 5,6, or 7, it will never retarget because of command 4 – so you keep the benefits of focus fire. The only time this doesn’t work is if you kill the final crew in the teleport and destroy the room with the same shot (so in the same frame). However this should be rare because a crew in the room will keep it at high health, and once the teleport is repaired you’ll have another chance to retarget.
Note that crew standing on the pad waiting to teleport to your ship do not count as crew in the teleport for the purpose of command 3. So your weapons may destroy the room and move on to the next target even if some enemy crew are waiting to teleport over.

1) None, increase power by one 
2) Enemy ship has full shield, target enemy teleport 
3) Target room has enemy, continue current job 
4) Target room destroyed, continue current job 
5) None, target enemy med room 
6) None, target enemy missile room 
7) None, target enemy shield 

Missile targeting room with crew (PY3)  

You may want to use jungler missiles but not target a specific place – you just want to shoot wherever enemy crew are at. This AI uses the fact that we are shooting teleport and then shield rooms, so those rooms will constantly not be at full health. 

Missile AI: 

1) Enemy reactor HP > 0%, increase power by one 
2) None, decrease power by one 
3) None, set highest character damage 
4) Enemy ship has full shield, target enemy shields 
5) Target room has enemy, continue current job 
6) Target room HP is full, target enemy teleport 
7) Target room HP is full, target enemy shields 
8) Enemy room has full HP, target condition room 

Laser AI: 

1) None – increase power by one 
2) None – target enemy teleport 
3) None – target enemy shields 

Long explanation: 

Line 5 of the MSL is the core – if we’re targeting a room with enemy crew, keep targeting it. Everything else is used to cycle through random rooms to find one with crew. We start off targeting shield rooms in command 4 since it’s most likely to have crew, and shoot until they are all dead. Say that the shield room still has full HP at that point. The next true and valid command is 6, so the MSL targets the teleport. Of course this is our focus fire target, so as soon as one of our lasers hit it, it won’t be at full health. If there are crew in there repairing, we’ll shoot it because of line 5, but otherwise the next true and valid command is 8. It’s important to note that the teleport is not at full health in that frame, so the teleport doesn’t satisfy command 8. The AI will pick a random full health room to target. If it has crew, great, we shoot it; but if not we cycle again. 

Targeting different rooms of the same type (micro-delay)  (PY3)

As we learned in More AI, targeting that happens in the same frame picks the same room. You can use a simple trick to have your targeting happen one frame later, so that it choose the second of a room type. This is super useful for targeting one AA with emp, while the rest of your lasers shoot the other. It can also be used to shoot both cannons, or both shield rooms. 

Laser AI, basic focus fire: 

1) None – increase power by one 
2) Enemy ship has full shield – target AA 
3) Enemy ship has full shield – target enemy shield room 

MSL to EMP the second AA: 

1) None – increase power by one 
2) Target room has no friendly – target AA 
3) None – target enemy lasers 

Note that for this to work, you shouldn’t have boarders every enter the AA or the lasers (whatever room type is in MSL command 3) since that would make 2 false and the MSL would target the lasers. 

There is a Python 2 way to do this, but it’s less effective as the first one or two missiles will hit the first AA. As soon as your lasers destroy that AA, it will switch to the other one and stay there the rest of the battle since that second one won’t take damage. 

MSL using EMP: 

1) None, increase power by one 
2) Enemy AA HP greater than 0%, target condition room 

EMP every reactor (PY3)

I like to use the PP or the PD to ping enemy reactors, since the small amount of system damage is not that useful for shooting the main focus room. I use this AI to shoot all reactors. It makes use of the fact that the PP, PD, or EMP all do some system damage, which makes the full HP condition not true and the AI will look for a full health reactor. This only works if you do not shoot or board whatever room is in command 2. This AI is also effective at making the opponent’s repair crew run all around the ship, since you’re doing tiny amounts of system damage to five different rooms (if they have the fusion reactor, coal reactor, and regular three reactors). [Note – this strategy is less effective now that mines are not permanently disabled from EMP damage, but it’s still useful if you want to power your shield-busting weapon all battle.]

1) None – increase power by one 
2) Target room HP less than 100% – target enemy lasers
3) Enemy reactor HP greater than 0% – target condition room 

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top