Multi-Rush AI

Multi-Rush AI

A small disclaimer: this page talks about the most complicated AI presented on the Pixel Perfect Guide. It delves into the world of end-game strategies with all of their complexity. Check out the home page for more basic guides if you’re just starting out. The guide below will be useful once you have a good understanding of rush AI, Python 3 researched, and at least three 100% rushers.

Why Multi-Rush

The rush ability in pixel starships is one of the most powerful because it allows you to front-load damage at the start of the battle. “Multi-rush” simply means using multiple rushers to rush a room in quick succession. Using multi-rush to punch through the enemy shield quickly or land boarders within the first few seconds will allow you to cripple the enemy ship. Just remember that multi-rush strategies are aggressive and a require commitment. If your first assault fails, you will probably lose because many of your crew abilities have been used already. Most rush crews are not good for long battles, as they need all of their training and items focused on ability. So past their initial rush, they will not have much use. There are a few exceptions though, such as the legendary Cyber Duck (with high SCI support stat) or Galactic Succubus (high WPN).


Four common multi-rush strategies you can use:

  • Ion Rush – The ion cannon is the most powerful weapon in the game and its long reload time means that it’s a great candidate for rushing. A multi-rushed ion cannon can create insane DPS.
  • Hangar Rush – A hangar with five craft out has the best DPS in the game. Getting all craft deployed at the start of the battle can be very powerful, and allows to turn the hangar off quickly to save power. As a side benefit, it synchronizes the shots from the crafts so that you are more likely to score hull damage.
  • Teleport Rush – Rushing boarders is more aggressive than the first strategies because you are committing both a rush crew and a boarder for every boarder you send over quickly. However, if you can get a foothold on the enemy ship and disable rooms instantly this strategy has a huge payoff. A successful teleport rush will often win without taking any hull damage.
  • Teleport Rush with Cloak – This is very similar to the Teleport Rush, but uses the cloak to stage boarders. It is less likely to get interrupted and is a little easier to set up in terms of crew positioning. The cost for this is having to include the cloak room on your ship and armor it.

ION Multi-rush

What’s common between the ION, EMP, MG and PD? All of them fire a volley of shots. During the firing (until all volleys are over), and during cooldown, it is not possible to rush the room again. All of the examples of rush AI below will ensure that you rush the room super quickly, which is not helpful for rooms with a volley. To rush rooms with volleys one option is the staggered multi-rush described on this page. The trick is stationing the crew exactly far enough away so that the time it takes for them to run to the room is the length of the gun’s volley. The second rusher should run into the room just after the gun stops firing and rush it again.

If you have two 100% rushers and are trying to figure out what gun to put them on at the start of the battle – the ION is clearly the winner for straight damage. Even against a shield, it will do 3.3 damage per volley and the EMP will only do 2.1. Of course, the hangar and teleport both are very good when rushed, but serve different purposes than the straight damage of ION.

Hangar Multi-rush

Rushing out multiple craft from the hangar gives you a big boost in DPS early. A hangar not being able to run more than 5 crafts at a time, many players like to get them all out at once, then power down the room to avoid using 4 energy. There are different ways to multi-rush hangar. If you have 100% ABL rushers, the easiest way consist in starting your rushers (up to 5) directly in Hangar, with an AI such as :

1) None – Use Special Power
2) Enemy Ship has full shield – Target hangar
3) Your Ship has full shield – Target hangar
[repair commands, if needed, go here]
4) Target home room (whatever room you want to boost)

Lines 2 and 3 hold the crews in the hangar for a few seconds, to give everyone enough time to rush, after which they will move to man their home room (replace “home room” by the rooms which work best for their stats, like an Engine, a Laser, a Shield, etc).

This multi-rush technique has been possible only since end of 2020, after the game developers changed the way rush abilities were processed. Nowadays a rush will only be able to trigger if the room is not on cooldown, in the middle of a volley, or already charged at 100%. When one of these conditions prevent the rush, it will simply be held, and triggered as soon as it’s applicable. So the senior rusher (the one processed first) will rush on frame 1, which will block all the others from using their since it brought the room to 100% charge already. Then the second rusher will rush on frame 2, and so on.

In older days however, this was not the case. All the rushers would have rushed together on frame 1, and since the room can not charge over 100%, it would have wasted 4 out of the 5 rushes, having only one craft released. To overcome this issue, people used “twitching” AIs, to guarantee only one crew at a time was effectively targeting the hangar. This type of AIs are not needed anymore in the case of Hangar if you have five 100% rushers, but still have applications if you want to use more than 5 crews (if their ability is below 100%), or to rush other rooms like Cloak or Teleport with more than 3 crews. The old hangar twitch rush is described below, for educational purpose.

Hangar Twitch Multi-Rush

The AI of a twitch multi-rush is incredibly short, but complicated in how it operates. Here’s what you’ll need to get set up:

  • Multiple rushers, 100% is preferable. Let’s say they are A, B, C and D – with A being the oldest (most seniority) and D the newest.
  • Empty spaces equal to the number of rushers, in empty rooms. Let’s call the destination Room Y. By empty, I mean no crew can start in room Y or target it, at least when the battle starts. For example, if you have four rushers, you’ll need at least four places in stand in empty rooms.
  • All rushers should begin the battle in the hangar.

1) Target room has no friendly – Use special power
2) Target room has no friendly – Target your hangar
3) None – Target Room Y

You’re probably thinking there’s no way it’s that simple. But it is! The AI uses conflicting commands that cause the crew to target one room in one frame, and a different room in the next frame. This creates a “twitching” or “dancing” effect where the crew stays in place but oscillates back and forth very quickly. Each crew cycles through being the only crew targeting the hangar, and only executes their rush if they are the only crew targeting the hangar. No two rushes occur in the same frame. Skip down to “Frame by Frame Analysis” to see exactly what happens.

Remember that a room doesn’t have to be at full power to rush, so you should set the hangar to 1 power during the rush and then you can decrease it to 0 afterwards.

How to improve the rush crew

Even after the abilities are used, the crew will continue to “twitch” because in the three simple commands above, there’s never anything telling them that they can stop. Ideally we want these rush crew to be useful after they complete the rush. This is tricky to execute because the commands needed for the rush must have precedence at the start of the battle. If you just want the rusher to stand in a room to boost it and do no repairs, you can use the AI below. However, the main problem with this is that if the home room does not have another crew in it, your crew will go to the hangar because of command 2.

1) Target room has no friendly – Use special power
2) Target room has no friendly – Target hangar
3) Enemy ship has full HP – Target Room Y
4) None – Target home room (whatever room you want to boost)

Repair AI with these rush crew is actually possible, mainly because the rush itself is done within a second of the battle starting. None of your rooms will be damaged then, so you can have your crew’s repair command be above the rush commands and they won’t interfere with the multi-rush. Command 2 ensures they go to the right home room once the enemy ship is damaged at all. One last warning, this will work reliably in attacks (since the enemy always start at full health), but in defenses, if you are attacked by a ship already damaged, line 2 will prevent the rush. If that is concern you could use a lower HP trigger (Enemy Ship HP < 75%), or use different conditions (like shield commands).

1) Repair AI
2) Enemy ship HP < 100% – Target home room (whatever room you want to boost)
3) Target room has no friendly – Use special power
4) Target room has no friendly – Target hangar
5) None – Target Room Y

Teleport Multi-rush

Overview

Multi-rushing the teleport is the way to make sure your boarders get onto the enemy ship in the first few seconds of the battle. Unlike the hangar rush, you can’t have your rushers all start in the teleport since there isn’t room. Also, you’ll need your boarders to get to the middle point of the teleport room to be ready to go when the teleport is charged. The way to do this is to have a line of boarders entering the teleport from one side, while a line of rushers enters from the other side. Each rusher will fully charge the teleport as each boarder enters.

The teleport room is three blocks wide, so like all other rooms of that width it has three places for crew to stand (left, middle, and right). In addition, the teleport has a fourth place to stand, in the middle of the room. I’ll call it the “pad”, and it’s the location that crew go when they are told to board the enemy ship. The pad is different from the other three places to stand because an infinite number of crew can stand there. Think of the pad as a waiting zone, very similar to the waiting location next to a lift when crew wait for the elevator to come. In the case of the teleport, the hyperspace elevator comes and retrieves one crew from the pad whenever the teleport is charged.

Important note – to ensure the sequencing of rushers and boarders is even, all your rushers and boarders must have enough stamina to reach the teleport running at their fast speed. If this is not the case, start the rushers farther away to make sure the boarders are ready on the pad by the time their rusher arrives. You may need to rearrange your rooms to ensure that you have enough spaces to the left and right of your teleport that the boarders and rushers can both be in position.

Boarder Placement and AI

Boarding AI with multi-rush is straightforward, because the main goal is to get the boarders to the pad as fast as possible. If you already use the teleport, you can probably re-use whatever boarding AI you already have. The key is to stage the boarders correctly: one boarder should start in the teleport, and the rest should start in rooms to one side of the teleport. As soon as the battle starts, they’ll all enter the teleport and head to the pad. Start with very simple boarder AI until you get the multi-rush to work, and then add more complicated boarder AI.

1) None – Use special power
2) Enemy room HP > 0% – Target condition room

The most common error with boarder AI is not targeting enough rooms. For example, if the only targeting command for your boarders is “Enemy ship has full shield – target enemy missile room”, and the enemy has only one missile, then only three boarders will attempt to board. The missile only has three spaces so the three most senior crew will target them. If you have boarders sitting on your ship doing nothing, make sure you are targeting enough enemy rooms!

Rusher Placement and AI

All rushers should be staged in rooms on one side of the teleport, opposite the boarders. This way the boarders and rushers can enter the teleport at the same time and each rusher will fire their ability on one boarder. No rushers will start in the teleport, because the first rusher can fire his ability as soon as he moves into the teleport. The first boarder, who starts in the room, needs time to reach the teleport pad before the first rush fires.

The teleport rush AI is more complicated than the hangar rush AI, because teleport rushers still need to take turns targeting the teleport but there are many more rushers than can fit in the teleport. You’ll need to set up the rushers so that they run through the teleport without stopping in it, to allow the crew behind them to enter. Also, you’ll need to ensure that each rusher takes turns targeting the teleport so that rushers don’t use their abilities in the same frame and waste their rush. Counter-intuitively, the secret to doing this is to artificially limit the number of spaces available in the teleport room.

Imagine that the teleport was one grid space wide, like a security door. It would only have one place for crew to stand, plus the pad for boarders. In this case, only one rush crew could ever target the teleport in each frame. A Xin crew could only target the teleport in a frame if no higher seniority crew are already targeting it, and once that Xin crew targets it, no lower seniority crew can target it in that frame. With twitch AI, the Xin crew would stop targeting the teleport in the next frame, and the next lowest seniority crew would have a chance to target it. (See “Frame by Frame Analysis” below for this cascading effect). The easy way to ensure that the teleport has one open place is to put two defending crew in the teleport at the start of the battle. These two crew cannot move from the teleport until the rush is complete.

The last piece of the puzzle is to ensure that even with the twitch AI, the rush crew move toward and through the teleport. One of the rooms in the AI is the teleport, and the other room (Room Y) must be on the other side of the teleport from the rushers, so that the shortest path to Room Y runs through the teleport. This way, the rushers will run straight towards the teleport once the battle starts. In their head, they’ll constantly be changing targets, but since the route to both targets is through the teleport, they’ll run that way at full speed. The same constraints apply as the hangar multi-rush; Room Y that the rushers are targeting must have no crew in it.

1) None – Use special power
2) Target room has no friendly – Target teleport
3) None – Target Room Y

Once you implement this, you’ll notice that the rushers do run through the teleport, rush, and then run all the way to Room Y. At this point they’ll stop twitching because command 2 will be false as all the rushers will have arrived. Why do the rushers keep running to Room Y if they are alternating targeting the teleport and room Y? The short answer is that they spend most of their time targeting Room Y, so they’ll walk all the way there. Each rusher is targeting the teleport for only one frame, and then when they stop targeting the teleport the next lowest seniority crew targets it. The original crew will only target it again once all other rushers have done so. This means they will only spend 1/(# of rushers) frames targeting the teleport, and most of their time targeting Room Y. Don’t worry that the rusher might run all the way through the teleport without targeting it – even if you had 10 rushers, they wouldn’t be able to all cross over the teleport before 10/40th’s of a second had elapsed. Each one will have a frame where they are targeting the teleport and are also in the teleport to do their rush.

Teleport Multi-rush with Cloak

The multi-rush with cloak is the most offensive strategy in pixel starships. You can cloak your ship in the first frame of the battle, and then when you come out of cloak, your stacked boarders will all fly onto the enemy ship. With this strategy it’s possible to disable all your opponent’s reactors within seconds, if you have enough boarders and rushers.

You’ll need everything that’s required in the teleport multi-rush, plus the cloak room on your ship and another 100% rusher to rush it at the start of the battle (you can also use multiple rushers that add up to 100%). However, you’ll need one less rusher than boarder, because the teleport will charge once for you during the cloak.

Boarder Placement and AI

The boarder AI is identical to the teleport multi-rush, but the placement is easier. You don’t need the boarders to run into the room in a careful sequence, you just need them all to get to the teleport pad by the time the cloak expires. For a max level cloak, this is 6.5 seconds, which is quite a bit of time. One major benefit of running cloak multi-rush is that you have more flexibility when designing your ship, because you don’t need as much unobstructed staging room on either side of the teleport.

Rusher Placement and AI

The rusher AI is a bit more complicated with the cloak, but very doable. The key is that we want all our rushers to be in the teleport when the cloak ends, but we also want only one at a time to be able to target the teleport. In the non-cloak variant using the twitch AI, the rushers move all the way through the teleport because they only spend a small fraction of the time targeting the teleport. How do we get them to stay there until the cloak ends? The rushers can utilize the pad during the cloak, since an infinite number of crew can be standing on it. You can make your rushers go to the pad by telling them to board the enemy ship while your ship has cloak. Then when your cloak ends, the rushers will leave the pad and head to Room Y – but not before briefly targeting the teleport and using their rush. Like the non-cloak variant, make sure that two of the spots in the teleport and taken up with stationary defending crew, so that only one of the rushers can target the teleport at a time.

1) None – Use special power
2) Your ship has cloak – Target enemy random room
3) Target room has no friendly – Target teleport
4) None – Target Room Y

If your rushers have higher seniority (are older) than your boarders, you may find that the rushers take spots in the room you want the boarders to go to, if the random room they target happens to be the room type the boarders are trying to board. You can fix this by having the rushers and boarders target different rooms on the enemy ship. Just make sure that both rushers and boarders have enough spots to target on the enemy ship. If any crew are standing still while the rest are behaving properly, you are probably not targeting enough rooms.

Frame by Frame Analysis

You asked for it. Here is exactly what happens in the mind of your crew when you tell them to dance about. This specifically is the hangar multi-rush, but the principles apply to any dancing/twitching where crew fight for a spot in a room.

Our four rushers are A, B, C, and D, with A being the oldest. Each crew will execute all of their commands in every frame (40 frames per second), with oldest crew going first. When a crew executes commands, movement commands will happen first, then special ability commands.

1) Target room has no friendly – Use special power
2) Target room has no friendly – Target hangar
3) None – Target Room Y

Frame One

A executes commands first. He is targeting the hangar to start, which has B, C, and D in it already. This makes command 2 false; command 3 is the first true movement command, so A will execute that and start walking towards room Y. Command 1 is not performed, because A is not targeting the hangar, AND there are friendly crew in the hangar anyways.

B executes commands next. He is also targeting the hangar to start, which now has only C and D in it. Like A, he will start walking towards room Y, without using his special ability.

C executes commands next. He is also targeting the hangar to start, which now has only D in it. Like A, he will start walking towards room Y, without using his special ability.

D executes commands next. He is targeting the hangar to start, and everyone else has left! Command 2 is true so he will keep targeting the hangar, and command 1 is true so he’ll execute his rush! Crew do not need to be “in position” in a room to execute their rush. If you were paying attention closely, you would realize that crew D would target the leftmost position in the hangar (where the oldest crew in a room stands) because he is the only/oldest crew in the room now. Since he started as the newest crew on the right side of the hangar, he’ll stand walking to the left. Thankfully this doesn’t matter and the rush can be triggered from anywhere in the room.

Frame Two

A is currently targeting room Y, which has no one in it. This makes command 2 true, so he’ll target the hangar. He won’t use his rush though, because D is standing in the hangar.

The same is true for B and C.

D is targeting the hangar, which has A,B, and C in it. Command 3 is true, so he’ll start going to room Y.

Frame Three

A is targeting the hangar, which has B and C in it as well. This makes command 3 the first true command, and A will start going to room Y.

B is targeting the hangar, which has C in it. This makes command 3 the first true command, and B will start going to room Y.

C is targeting the hangar and is the only crew doing so. He will keep targeting the hangar due to command 2, and use his ability due to command 1. Our second craft is launched!

D is targeting room Y which has no one in it, so he’ll target the hangar.

Frame Four

A is currently targeting room Y, which has no one in it. This makes command 2 true, so he’ll target the hangar. He won’t use his rush though, because C is standing in the hangar.

The same is true for B.

C was targeting the hangar, but now A, B, and D are so he’ll target room Y.

D is targeting the hangar, which has A and B in it. Command 3 is true, so he’ll start going to room Y.

Frame Five

A is targeting the hangar, which has B in it, so now he’ll target room Y.

B is the only crew targeting the hangar, so he’ll keep targeting it and use his rush. The third craft is launched!

The AI continues in a similar manner until all the craft are launched, putting out one every 2 frames, or 2/40’ths of a second.

Multi-Rush AI

2 thoughts on “Multi-Rush AI

  1. bonjour il serait possible de faire ce tuto en francais car je ne suis pas une maitre en anglais et les traducteurs automatique traduise mal

    1. Salut, je maintiens le site et suis Français aussi, j’avais pensé en faire une version multilingue un jour quand j’aurai le temps de tout traduire. Mais j’ai peur que ce ne soit pas pour tout de suite, je suis trop occupé en ce moment. Si tu as des questions précise sur ces IAs ou a besoin d’aide tu peux tjs passer demander sur notre serveur FR : https://discord.gg/jMXXNM7Ea6

Leave a Reply

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

Scroll to top