Pathing refers to the path that a character takes towards a goal. An effective spy will choose a path that will mimic the path that would be taken were the character controlled by an AI. "Bad pathing" refers to a path that betrays the spy's identity because it does not emulate the path an AI would take.
The basic algorithm that controls AI movement works as follows:
- Choose a goal pad. There are several factors which dictate what pad an AI will select:
- Pads which contain too many people are ineligible. (The definition of "too many" depends on the pad's size.)
- Bookcase and statue pads are ineligible when the AI holds a drink that has more than one sip left.
- (Suspected) double agents will not occupy a conversation circle which contains another (suspected) double agent.
- Outdoor pads are not preferred (but not completely forbidden) for AIs that are holding a drink on the Gallery map.
- Determine a path to the pad. In computing the path, the following ordered priorities are considered:
- Don't pass through map geometry or other characters
- Get to the goal pad
- Avoid violating another character's rudeness zone
- Prefer shorter paths
- Begin walking along the path, continuously re-evaluating to adapt to the movement of other partygoers. If several attempts to move around an obstruction fail, go back to step 1.
- Upon nearing the target pad, check again to make sure the pad is open. If it's full, go back to step 1.
- Select a target point within the pad and begin moving towards it.
- At any point, if another character occupies the target spot, stop momentarily, then go back to step 1.
NPCs will sometimes find their path blocked by another character that has suddenly moved in their way. When this happens, the NPC will immediately try to move around them. Sometimes, they both choose to go the same way to get past the other several times, causing them to "bounce" back and forth, until they both conclude that they can't get to their goal and decide to go elsewhere.
- Main article: Ambassador
The ambassador's briefcase complicates things when it comes to pathing. An NPC that has decided to go pick up the briefcase will suddenly stop and go do something else if someone else beats them to it, and will stop and put the briefcase down if something interferes with their attempt to return it. This causes pathing behavior which is unusual in other circumstances.
Second Book of SpyParty Strategy Edit
The Second Book of SpyParty says:
One of the greatest terminology mysteries for newer players who listen in on experienced players talking about the game is the word "pathing." It seems to be very important. Sometimes the sniper will shoot on the basis of this nebulous "pathing," and be correct! Whatever could it mean?
"Pathing" refers, roughly, to "walking around," whether like an AI or like a spy. Since the walking animation is the same whether you're a spy or an AI, walking like an AI depends entirely on what actual path you choose to walk, thus, "pathing."  There's not much too deep philosophy to pathing; for starters you should just know what the AI partygoers do, and imitate it. Here is a (non-comprehensive) list of AI-like pathing:
- AIs generally try to take the shortest available path to their destination, even if this means bumping against other partygoers or static objects like the central statue in the Courtyard maps. Unnecessarily wide and inefficient paths are suspicious.
- AIs tend not to enter conversation circles at a very crowded point if a less-occupied point is available when they start their path. People that stand unnecessarily close to another person in the convo are suspicious. Further, it is rare for AIs to stand at a point in the conversation circle that is obviously closer to or further from the center than the other people in the conversation. Try to stand in such a way that you form an actual circle with the other partygoers.
- AIs will sometimes make short corrections to avoid colliding with other AIs, but sometimes they will collide.
- When AIs collide, they will adjust their path slightly to the left or right and attempt to walk around each other. Sometimes their corrections cancel each other out and you get a repeating pinball effect; this can be imitated by a good spy and it is a very convincing way to look like an AI when done well!
- Sometimes when AIs collide, one or both of them will give up on what they were trying to do, make a roughly 180 degree turn, and go somewhere else.
- AIs never, ever stop dead outside of an action pad or conversation circle, not even for a fraction of a second. The spy can, but should not. Besides not doing so intentionally, you should also be careful not to do so unintentionally - when colliding with other partygoers or static objects, it is possible to stop dead very briefly if you don't "bounce" well, per tips 4 and 5 above.
- AIs never make microcorrections; that is, they never make short stuttered bursts to adjust themselves onto an action pad, or to adjust their position within an action pad. Making microcorrections is one of the most common and devastating errors for newer spies. Remember - the spy doesn't have to be right in the middle of an action pad; AIs land on pads in offset locations all the time.
- AIs rarely spin more than 180 degrees; someone doing so is more likely to be the spy.
- An AI has an equal chance to choose a destination that is far away versus one that is close by. Human beings are often biased towards short paths because they are easier, more noticeable, less stressful, and more predictable. Someone who too often walks short distances may be a spy. Sometimes AIs will take very short paths, paths that would seem silly to an average human. A common example is that they will be at a window, then walk perhaps one foot to the right and stop again.
- AIs can and will walk in places that would be unlikely in a real world party: between someone at the bookshelf and the bookshelf, in front of someone at a window, and so forth. On that note, they will also confidently walk clean through Toby the Waiter's tray, which does not clip with the character models.
- All of the above are not applicable or at least unpredictably applicable if the partygoer is trying to pick up the ambassador's briefcase.
These tips should help you figure out ways to look "AI-like" with your pathing. Remember that in addition to walking in such a way as to look like an AI, you must also walk in such a way as to avoid looking human. What we mean by this is that you must not just positively look like an AI (so that the sniper thinks you're less suspicious), you must also avoid errors that make you obviously the spy (so that the sniper thinks you're more suspicious). Part of doing this is just practice - the more practice you have, the more skilled you'll be at driving the spy. Part of it is also being attentive - even if you avoid technical errors, you might be guilty of "mission-like" pathing if you walk by the ambassador, even if you weren't thinking about bugging.
No matter how much practice and experience they have, even the most skilled spies have a chance of making small pathing errors, so part of what you must manage is your risk of committing an error. When you look at the party's terrain, one of the things you should look for is how easy it would be to move from point A to point B without committing pathing errors. If your path is heavily crowded, that makes the path more difficult. If Toby is active in the area, that makes the path more difficult. If your path takes you by a conversation circle where a person might pop out into your path unexpectedly, that makes it difficult too. Under circumstances such as these, you may wish to delay your movement, or move somewhere else. Even if you decide to make the original movement anyway, you should be prepared for the obstacles in your way. Don't just path properly - plan to path properly.
Finally - be prepared to deal with the consequences even if you make a pathing error. If you miss an action pad, the best course of action is usually to hold still for a moment, then smoothly depart for somewhere else. Twitching into your destination is generally not a good idea unless you're sure the sniper's not looking. Along the same lines, after a bad bounce or a stall while walking, recover quickly and continue walking, or else duck into a nearby action pad. In general, the goal in dealing with pathing errors is to minimize the amount of time your character is moving in a non-AI manner, and also to minimize the obviousness of such movement. You can do that best by recovering quickly into a safe path or destination, without overcorrecting or panicking.
- ↑ This is probably also partially derived from "pathfinding," a task AIs in many electronic games must manage.
- ↑ But not necessarily guilty. The AIs do sometimes head to crowded points unnecessarily; it's just a bit less likely
- ↑ Sometimes "deeper and shallower" are used to describe this.
- ↑ Collisions with other partygoers are usually referred to as "bouncing" or "bumping."
- ↑ Though again, AIs do spin bizarrely on occasion.
- ↑ The AI for picking up the briefcase can and will lead AI characters to do very bizarre, spy-looking things, even when they are very far away from the briefcase.