CREW AI OVERVIEW

PULSAR: Lost Colony has built-in support for AI crewmembers. There is one for each class with the exception of the Captain, which requires a real player.

To add bots to the game, open the TAB menu and click on one or more of the following buttons:
Add Pibot - Add Scibot - Add Engbot - Add Weapbot.

Screenshot (6).png



Each bot represents one of the 4 available. They have unique behavior and systems to help them fulfill many of their classes’ specific requirements. By default, AI crewmembers have priorities set up to make them immediately functional. They will react to the changing conditions of their environment, their ship, the current captain’s order, and many other factors.

Customizing the AI Priorities

Depending on your preferences or playstyle, you may wish to change how the AI performs in certain situations or create entirely new ways for them to react. This can be done using the AI Priorities Menu.

Screenshot (5).png

First, we’ll go over how the AI functions, using some of the default priorities as an example. Then we’ll explain how to tweak or add new overrides to change their behavior. Lastly, we’ll go through an example of how you could add a new reaction to your AI crew.

How the AI Works

Each AI crewmember has a list of all possible actions they can take at any one moment. These are called priorities. Since the AI can do only one thing at a time, they need a way to determine which action is the most important at the current moment. In order to do that, they list all their possible actions with a rating for each one. The highest rated action for the current circumstances is the action the AI will engage in. The ratings of each priority fluctuate based on many personal and environmental factors. This allows them to react to situations.

For example, in this scenario the Engbot’s highest priority is “Man Station” so they are dutifully at their station assisting the battle. A few moments later, an enemy missile crashes into the ship’s hull causing a lot of damage to the ship systems. Before the missile hit, Engbot’s rating to “Repair System” was 0, because the systems were all undamaged. After the missile, the rating skyrockets to a 3 or 4, becoming the highest rated priority. Engbot leaves their station and begins to repair the ship’s systems. When the systems are adequately repaired, the rating for “Repair System” is lowered and the next highest priority “Man Station” is once again at the top of the list. Engbot returns to their station to assist in the fight once again.

This example highlights how the list of priorities can quickly change and how the AI are always trying to optimize their time by tackling the most important priority first.

Screenshot (4).png

Each priority can have 6 different levels or ratings.

They are displayed by showing 0 to 5 filled in pips.

[ ] [ ] [ ] [ ] [ ] or 0 indicates that this action is to be ignored.
[O] [ ] [ ] [ ] [ ] or 1 means this action is not very important right now.
[O] [O] [ ] [ ] [ ] or 2 means this action is somewhat important right now.
[O] [O] [O] [ ] [ ] or 3 means this action may be important right now.
[O] [O] [O] [O] [ ] or 4 means this action is important right now.
[O] [O] [O] [O] [O] or 5 means this action is very important right now.

To change the rating of a priority, click on the number of pips you’d like to be filled in. If you want to assign 0 as a rating, click on the first pip twice.

Overrides

Overrides are how the AI becomes reactive and dynamic! Each priority can be assigned a number of overrides (up to 15) which will change the rating based on the specific conditions. Let’s look at Engbot’s “Fire Patrol” setup. Here we see 5 overrides in place.

Screenshot (9).png

Each override consists of a statement, a rating, a position, and an additional settings button. The AI processes overrides from top to bottom, looking for the first statement that proves true. If a statement is currently false, it greys out the override to show that it’s not currently active. The AI then moves to the override below it and repeats the process.

When it finds a true statement, it takes the rating next to it and uses that as it’s priority rating. Any overrides beneath this one are ignored. Sometimes two overrides may be true at the same time, however the AI will only look at the first true statement it finds.

Let’s go through the override stack. Starting at the top we have:

  • “Fire extinguishing item is NOT equipped” [ ] [ ] [ ] [ ] [ ]
    This statement is false because Engbot does in fact have a fire-extinguisher equipped. Next!

  • “On Hostile Ship” [ ] [ ] [ ] [ ] [ ]
    This statement is false. Engbot is on the bridge of your ship right now. Next!

  • “Nearest Fire Dist < 5m” [O] [O] [O] [O] [O]
    This statement is false. There are currently no fires aboard the ship. Next!

  • “Fires On Current Ship > 2” [O] [O] [O] [O] [ ]
    This statement is false. There are currently no fires aboard the ship. Next!

  • “Fires On Current Ship > 0” [O] [O] [O] [ ] [ ]
    This statement is false. There are currently no fires aboard the ship. Next!

  • Base Importance [ ] [ ] [ ] [ ] [ ]
    This is the base priority under all other overrides. If nothing else is true, then this rating will be used. Since there are currently no fires, Engbot isn’t trying to extinguish fires.

Let’s switch it up a bit. This time, your ship was hit and 2 fires have started.

The first 4 overrides are still false, so they get passed. Then the AI processes the next one:

  • “Fires On Current Ship > 0” [O] [O] [O] [ ] [ ]
    This statement is true. The number of fires aboard your ship is greater than 0. The priority for this task is now 3, meaning this may be important for Engbot to do if they don’t have anything more pressing to attend to.
    Let's say Engbot is preoccupied with a more important task. As time passes, the number of fires grows. The moment they increase, Engbot’s “Fire Patrol” rating will change from 3 to 4.
    This is because a statement which was previously false is now true.

  • “Fires On Current Ship > 2” [O] [O] [O] [O] [ ]
    Since there are now more than 2 fires aboard the ship and this override is higher in the stack, this statement is true and 4 is the rating that the “Fire Patrol” priority will use.
    The fires are beginning to spread, and it’s becoming more important to Engbot to handle them.

This is a simpler example, but hopefully this shows how the AI can change plans and react to an constantly changing environment.

Customizing the AI

To customize the AI, be sure you’re playing as the Captain and add the bots you wish to customize to the game. Then click on the “Crew AI” button in the TAB menu.

For each AI crewmember, you’ll see their name and class color, as well as the list of priorities. They are listed in the following ways:

  • Top Priorities: displays the current top ranking priorities

  • All Main Priorities: displays the priorities that are common to all classes

  • All Class Priorities: displays the priorities that are unique to AI crewmember’s specific class

  • Behavior Tweaks: Some priorities like “Manage Reactor” are important but vague. Behavior tweaks go into more detail about what it should mean when an AI is performing a vague action like “Manage Reactor”. In this example it would include things like tweaking specific power levels or when to overclock the reactor.

  • Sub-Priorities: These work similarly to behavior tweaks, but are listed under a single priority. For example, when Engbot is using the “Man Station” priority, the sub-priority listing is then used to determine what specifically Engbot should be doing.

Below that you’ll see a text field to change the name of the bot, a way to customize their appearance (though you’ll need to be near a Barber station), and a way to save or load AI configurations.

Customizing AI priorities involves changing / adding overrides. First you’ll need to select the priority you want changed. Then you’ll see the override stack. From there you can re-order, remove, tweak, or add new overrides that will interact with this priority.

Screenshot (13).png

To reorder an override, click on the up or down arrow buttons to the right of the override.

Screenshot (12).png

To remove an override, click on the red [-] button.

Screenshot (11).png

To tweak an override, click on the [*] button to the far right of that override. Certain overrides have a X value in their statement, which you can customize here. This is also where you can invert the statement by pressing the [!] button.

Here are some examples of statements being inverted:

  • Fire extinguishing item is equipped turns into Fire extinguishing item is NOT equipped

  • Coolant < 50% turns into Coolant >= 50%

  • NO Target Ship turns into HAS Target ship

To add a new override, click on the [ + NEW ] button on the top right of the menu. This will open all the available overrides.

There are many to choose from, and they are grouped in the following ways: Alert Levels, Captain’s Orders, Ship Conditions, Crew Conditions, Personal Conditions, and Sector Conditions.

Custom Reaction Example

Let’s say you want to customize the AI to jump the ship on your command. This will be an order you give them during emergencies.

First, create a new Captain’s Order. Go to the captain section of the TAB Menu.
Click on an empty Custom Order text field. Let’s name it “Skedaddle!”

We’ll need to modify Pibot and Engbot for this since they both play a role in preparing and initiating the jump procedure.

Starting with Pibot, we’ll open up their priorities and click on Fly Ship.
For our custom “Skedaddle!” command, we want Pibot to stop whatever they're doing and start flying the ship right now. Add a new override and click on “Skedaddle!” under the captain’s orders list. New overrides are added to the bottom of the stack, which is fine for what we’re trying to do. Make sure it’s set to the maximum number of pips at a rating of 5. This is an emergency maneuver, after all.

Screenshot (8).png

Then click on the “Line Up Ship For Warp” sub-priority under “Fly Ship”. Since we want them to perform that specific action while flying the ship, add a new override and click on the “Skedaddle!” order. Like before, it gets added to the bottom of the stack, but this doesn’t work for us. If we’re running away from an enemy ship, we need to make sure we’re above “Number of hostile ships >0” otherwise it’ll use that rating instead of whatever we put for “Skedaddle!”. Using the arrows, reorder the “Skedaddle!” override so it’s above “Number of hostile ships >0” Make sure to also set the rating of “Skedaddle!” to 5.

Screenshot (9).png

Almost done! We now need to make sure Engbot does their job. Go to Engbot’s “Man Station” priority and add the “Skedaddle!” override at the bottom of the stack with a rating of 5.

Screenshot (10).png

We want Engbot to start charging the warp drive immediately. Open the “Charge Warp Drive” sub-priority under the “Man Station” sub-priority. Add the “Skedaddle!” override, set its rating to 5, and place it above “Number of Hostile Ships <=0”.

Screenshot (7).png

Finally, go to the “Jump Ship” sub-priority under the “Man Station” priority and add another “Skedaddle!” override. Set it’s rating to 5 and place it above “warp drive is ready”.

Screenshot (11).png

You should now have customized the AI to react to a custom order! The only thing you’ll need is a waypoint on the starmap for Pibot to align the ship to. Another thing to keep in mind is that the AI will continue to jump until you change the current order to something else.

Hopefully this demonstrates the flexibility of the AI system! We recommend testing out your changes and additions before you need to rely on them. Keep in mind, because this system gives you a lot of freedom it’s sometimes easy to break things. To help get the most out of this system, here is some advice:

  • Be wary of infinite loops. Some overrides reference other priorities, so it’s sometimes possible to create a loop. If you notice the AI acting strange or repeating actions in an adverse way, they may be configured to go through a never ending loop.

  • Use higher ratings less frequently. If tons of overrides use the maximum 5 rating, it loses its punch. The AI’s behavior may become more unpredictable.

  • Look at the defaults. The default AI settings may help you understand how to format something or hold clues as to why your setup may not be working as expected.

  • Use false statements as additional confirmations. Since you can invert the statement of any override, you can set them up so false statements can confirm things for your true statement. An example of this is Weapbot’s “Launch Nuclear Device” default override stack. The first five overrides act as a setup for the sixth override. The first 6 overrides work together to form this logic statement:


    “I will try to launch a nuke when my Captain orders an Offensive Attack, I have a nuclear device installed, I’m not on a hostile ship, there is a targeted ship within 3km of us, and we are in Red Alert.”


    As we can see from the override stack, if any of the top five statements were true, then the priority would be 0. To reiterate, using false statements can be a way to confirm multiple conditions are true when creating overrides.