---
key: practice/maintenance-patrol
type: practice
id: maintenance-patrol
lang: en
title: Maintenance patrol
summary: 'Connect perception, memory, action selection and route following.'
updatedAt: '2026-10-20'
status: active
url: 'https://gamemechanics.pro/en/knowledge/practice/maintenance-patrol/'
jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/practice/maintenance-patrol.json'
markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/practice/maintenance-patrol.md'
aliases: []
tags:
  - NPC behavior
sourceIds:
  - source-3e6c21889ae768e0
  - source-6f794a271cd60b9c
sources:
  - id: source-3e6c21889ae768e0
    title: 'Challenges for Game Designers: author website'
    url: 'https://designgames.wordpress.com/'
    verifiedAt: null
  - id: source-6f794a271cd60b9c
    title: 'Challenges for Game Designers: table of contents'
    url: 'https://designgames.wordpress.com/toc/'
    verifiedAt: null
relations:
  - type: practices
    direction: incoming
    label: What this helps you learn
    key: lesson/npc-perception
    title: NPC perception and target memory
    url: 'https://gamemechanics.pro/en/lessons/npc-perception/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lesson/npc-perception.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lesson/npc-perception.md'
  - type: practices
    direction: incoming
    label: What this helps you learn
    key: lesson/npc-action-selection
    title: How an NPC selects an action
    url: 'https://gamemechanics.pro/en/lessons/npc-action-selection/'
    jsonUrl: >-
      https://gamemechanics.pro/api/v1/knowledge/en/lesson/npc-action-selection.json
    markdownUrl: >-
      https://gamemechanics.pro/content/knowledge/en/lesson/npc-action-selection.md
  - type: practices
    direction: incoming
    label: What this helps you learn
    key: lesson/npc-pathfinding
    title: Pathfinding and following a route
    url: 'https://gamemechanics.pro/en/lessons/npc-pathfinding/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lesson/npc-pathfinding.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lesson/npc-pathfinding.md'
  - type: practices
    direction: incoming
    label: What this helps you learn
    key: path/npc-behavior
    title: NPC behavior
    url: 'https://gamemechanics.pro/en/learn/npc-behavior/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/path/npc-behavior.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/path/npc-behavior.md'
  - type: uses
    direction: outgoing
    label: Sources in the selection
    key: resource/challenges-for-game-designers
    title: Challenges for Game Designers
    url: >-
      https://gamemechanics.pro/en/resources/#resource-challenges-for-game-designers
    jsonUrl: >-
      https://gamemechanics.pro/api/v1/knowledge/en/resource/challenges-for-game-designers.json
    markdownUrl: >-
      https://gamemechanics.pro/content/knowledge/en/resource/challenges-for-game-designers.md
placements:
  - title: In the original collection
    url: 'https://gamemechanics.pro/en/practice/#maintenance-patrol'
supersededBy: []
attributes:
  topic: npc
  level: intermediate
  minutes: 90
endsAt: null
provenance: >-
  Thematic inspiration: Challenges for Game Designers by Brenda Brathwaite and
  Ian Schreiber. These scenarios, constraints and checks are independently
  written around broad game-design learning topics. This is not a translation or
  a sequential retelling of the book exercises.
license: CC-BY-4.0
codeLicense: MIT
attribution: gamemechanics.pro contributors
---
# Maintenance patrol

id: maintenance-patrol
type: practice
key: practice/maintenance-patrol
lang: en
status: active
url: https://gamemechanics.pro/en/knowledge/practice/maintenance-patrol/

Connect perception, memory, action selection and route following.

## Goal

Connect perception, memory, action selection and route following.

## Scenario and materials

A robot patrols a station, detects a fault and moves to repair it. A door may close between it and the target. Store the robot’s known target position separately from the actual world state.

A small scene or step-by-step model with an event log

## Constraints

- Use one map, one robot and one fault. Specify the graph and edge costs explicitly.
- The robot learns through observations only; its memory expires.
- Every action change logs time, observation and reason.

## Steps

1. Define patrol, move-to-fault, repair and search states, including transition conditions.
2. Separate observations from memory. Losing sight must not instantly reveal the target’s new position.
3. Connect action selection to path search and movement; recompute after a closing door or return an explicit failure.
4. Repeat these scenarios: visible target, lost target, closing door and unreachable target. Preserve identical starting conditions.

## Deliverable

A runnable scene or reproducible step-by-step model, map, transition table and four logs explaining decisions.

## Check your work

- Identical starting conditions and observations produce identical decisions.
- After losing sight, the robot uses the last known position until memory expires.
- A closed door causes neither wall traversal nor endless path recomputation each frame.
- Target reached, no route and start equal to goal are distinguishable results.

## Reflect

Which wrong decision came from memory, which from priorities and which from navigation? Change only one of these layers.

## Connected materials

- What this helps you learn: [NPC perception and target memory](https://gamemechanics.pro/en/lessons/npc-perception/) (key: lesson/npc-perception)
- What this helps you learn: [How an NPC selects an action](https://gamemechanics.pro/en/lessons/npc-action-selection/) (key: lesson/npc-action-selection)
- What this helps you learn: [Pathfinding and following a route](https://gamemechanics.pro/en/lessons/npc-pathfinding/) (key: lesson/npc-pathfinding)
- What this helps you learn: [NPC behavior](https://gamemechanics.pro/en/learn/npc-behavior/) (key: path/npc-behavior)
- Sources in the selection: [Challenges for Game Designers](https://gamemechanics.pro/en/resources/#resource-challenges-for-game-designers) (key: resource/challenges-for-game-designers)

## Sources and provenance

Thematic inspiration: Challenges for Game Designers by Brenda Brathwaite and Ian Schreiber. These scenarios, constraints and checks are independently written around broad game-design learning topics. This is not a translation or a sequential retelling of the book exercises.

- [Challenges for Game Designers: author website](https://designgames.wordpress.com/) (id: source-3e6c21889ae768e0)
- [Challenges for Game Designers: table of contents](https://designgames.wordpress.com/toc/) (id: source-6f794a271cd60b9c)

CC-BY-4.0 · gamemechanics.pro contributors
