AI Paths Unpacked: RimWorld Routing Quirks and Tactics

A colonist's route bending around a muddy marsh toward a stone-walled base in RimWorld

Your colonist walks around the mud instead of through it, ignores the shortcut door, and takes the long way past your trap corridor. None of that is random. RimWorld picks the cheapest route, and every kind of cell has its own price.

RimWorld 1.6Core game numbers. DLC notes are marked where they apply.

  • Known trap: +800
  • Outside area: +600 a cell
  • Turret field: range + 4
How a route is priced

Pawns count ticks, not tiles

Each step costs the pawn's own move time plus the cost of the cell it steps onto. A colonist with the normal 4.6 move speed needs about 13 ticks for a straight step and about 18 for a diagonal one. Mud adds 14 to every step, so one muddy cell costs about as much as two cells of bare soil. Pawns add up the cost of the whole trip and take the lowest total, so a longer road over good ground often wins.

On a cell with both floor and furniture, only the highest cost counts. A shelf standing on mud costs 50, not 64.

Two routes to the same shelf: a short line through mud and marsh and a longer line along a concrete path
The concrete path is longer but cheaper. Marshy soil adds 14 per step, concrete adds nothing.
CellExtra ticks per stepWhat it means for you
Most built floors (concrete, wood, stone tiles), smooth stone, broken asphalt0The fastest ground in the game. Even a cheap concrete strip pays off on busy routes.
Packed dirt, rough-hewn stone, straw matting1Close to free.
Soil, rich soil, stony soil, rough stone2The normal baseline outdoors.
Lichen / sand3 / 4Slightly slow.
Mud, marshy soil, soft sand, ice14About double a normal step. The main reason for "weird" detours.
Shallow water and marsh30Undrafted pawns treat it as far worse (an extra 180 per cell when planning), so they swim only if there's no sane way around.
Deep waterNo pathNot walkable, and standard bridges can't be built on it. Chest-deep water can be bridged.
Item stacks on the ground14A cluttered hallway is a mud hallway.
Chairs, stools, bushes30Keep them off the walking line.
Beds, tables, hoppers, trees, sandbags, barricades42A pawn walking along a row of sandbags only gets slowed by the first one.
Shelves50Shelves in a corridor reroute haulers.
Fence80Pen animals can't cross it at all. Use a fence gate.
Traps

Why colonists step around traps and raiders don't

A pawn that knows about a trap treats its cell as costing 800 when planning a route, and if it does walk over it, the step takes 40 extra ticks. That is why haulers take a long loop around your trap corridor. Pawns that don't know about the trap see no cost at all and walk straight in.

Colonists leave through a door while raiders, unable to open it, take the trap lane
Give colonists a door. Raiders can't open it, so the only open lane they have is the trapped one.
Who walks over the trapBase chance it fires
Enemies who don't know it's there100%
Your colonists, slaves and tame animals0.5%
Visitors and traders from friendly factions0%
Calm wild animals20% (5% for an IED)
Wild men30%
Anyone with the Nimble traitone tenth of the above
Trap-immune creatures0%

Who knows about a trap

Your own pawns, friendly visitors, released guests, calm wild animals and wild men. Smart raiders and sapper raids spot about 30% of your traps and route around those. Plain assault raiders know none of them.

Placement that works

Traps can't touch each other, diagonals included, so leave an empty cell on every side: every other cell in a row, with a gap between rows. Put them where raiders have to walk and your colonists don't, and add a door for your own traffic.

Doors and allowed areas

Doors, forbidden doors and allowed areas

In 1.6 an allowed area no longer only limits jobs. It also bends walking routes: an undrafted colonist pays 600 extra for every cell outside its area. It will walk around a building to stay inside the zone and only cuts outside when the inside route is far more expensive. Drafted pawns ignore this.

Left: a colonist follows an L-shaped allowed area instead of a straight shortcut. Right: a held-open forbidden door blocks a colonist but lets a raider through
Left: the shortcut leaves the area, so it loses. Right: a door that is held open and forbidden stops colonists but not raiders.

Door speed by material

Colonists pay the door's opening time as part of the route. A slow door on a main hallway pushes pawns toward any other exit.

MaterialDoor, ticks to openPowered autodoor
Wood38about 9
Steel, plasteel, silver, gold45about 11
Uranium6015
Any stone blocks10025

An autodoor costs 40 steel, 2 components and 25 of the material you pick, and uses 50 W. Without power it opens as slowly as a plain door of the same material. Walking through two closed doors in a row adds another 45 ticks, so airlocks belong on rarely used exits, not on the kitchen hallway.

The held-open trap. Colonists won't path through a forbidden door, even one held open (a pawn in a mental break may ignore that). Raiders can't open your doors, but an open door lets them through. Set a door to Hold open and forbid it, and you've made a gap only enemies can use. That's useful for a killbox gate and a disaster on a perimeter wall.
Hazards

Fire, water and darkness

  • A cell with a ground fire adds 1000 to the route and each burning neighbor cell adds 150. Pawns will walk a long way to skirt a grass fire, which is why firefighters sometimes approach from the far side.
  • Shallow water and marsh cost 30 per step. Undrafted pawns also count an extra 180 per cell when planning, drafted ones only 18. Draft a colonist if you want it to wade.
  • Deep water is impassable for walking pawns.
  • With Anomaly, pawns caught in unnatural darkness add 300 per dark cell. Ordinary night darkness has no extra per-cell route penalty.
  • Snow and sand buildup slow each step. The heavier of the buildup penalty and the cell's own cost applies; they don't add up. Sand buildup comes with Odyssey.
Raider AI

How raiders pick their route

Three raid routes around a base: a straight assault line, a smart raid looping outside a turret's range, and sappers heading for a bedroom
A plain assault walks into the turret. A smart raid loops outside its range plus 4 cells. Sappers aim for a bed.
Raid typeHow it movesWhat to build
AssaultTakes the cheapest open route to your base. Ignores turret range and knows no traps.One open entrance with traps and a killbox.
Smart assaultStrongly prefers to stay out of what your turrets can see, out to their range plus 4 cells, and spots about 30% of traps. It will still cross a turret field when every other way is worse.Hide turrets behind walls so they only see the entrance, or let the detour lead into traps.
Staged attackGathers and waits near your base first, then attacks like an assault.Same as assault. Use the waiting time.
SappersMine through walls toward an owned bed (or a building or a colonist). Also avoid turrets and spot some traps.Thick outer walls near bedrooms and a mobile response team.
BreachersBlast or cut their own hole in the wall instead of looking for a door.A plain killbox won't catch them. Meet them where they breach.
SiegeBuilds a mortar camp at range.Mortars or a sortie.
Closed doors read as walls. Raiders can't open your doors, so they treat a closed one like a wall. An open route pulls most of them in, though some will still smash a building, door or wall they pass close to. Leaving a single open path is how a killbox gets used, and an accidental second open path is how a killbox gets skipped.

More on base defense: combat defense and raid defense tips.

Fix list

Common detours and how to fix them

What you seeWhyFix
Colonists loop around a field instead of crossing itMud, marsh or sand on the straight lineLay a concrete or wood floor strip. Floors cost 0.
A pawn ignores the obvious doorThe door is forbidden, or the route leaves its allowed areaUnforbid the door and check the area overlay.
Everyone crawls through one doorwayStone door (100 ticks) or two doors in a rowUse wood, steel or a powered autodoor and remove the extra door.
Haulers take the long way past the defenseKnown traps cost 800 eachGive colonists their own door that skips the trap lane.
Hallways feel slowItems (14), chairs (30), shelves (50) on the pathKeep a clear walking line. Put storage in rooms off the hall.
Penned animals stay stuckFences are impassable for pen animalsAdd a fence gate on the side they need.
Raiders skip the killboxAnother open path, or a smart raid avoiding turretsClose every other gap and hide turrets from the outside.

See the routes yourself

  • Turn on dev mode, open the debug settings menu and enable Draw paths. Select a pawn to see the route it is following.
  • Enable Draw avoid grid during a smart raid to see where your turrets push raiders.
  • Plan the walking lines when you lay out the base. The base layout tool helps.