Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Intelligent systems: concepts and architectures

Core concepts and common architectures for intelligent systems used in pervasive computing: definitions (agent, sensor, actuator), reasoning and learning models (Bayes, MDP, knowledge-based, soft computing), architecture styles (deliberative, reactive, hybrid, layered), and worked examples showing B

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Intelligent systems are the software and hardware that make pervasive devices behave smartly: they sense the environment, reason or learn, and act. Engineers use these ideas when designing smart environments, wearable assistants, context-aware apps and middleware that must make decisions reliably with limited resources.

Key ideas

  • Sensors and actuators — A sensor converts physical phenomena to data (e.g., accelerometer → acceleration values). An actuator converts control signals to effects in the world (e.g., motor). Define units when measuring (SI units like m/s^2 for acceleration).

  • Percept — One reading or vector of readings from sensors at an instant.

  • Knowledge-based system — An intelligent system that stores explicit facts and rules (knowledge base) and uses a reasoner (inference engine) to answer queries or decide actions. Assumes domain knowledge can be expressed in symbolic form (logic, rules).

  • Soft computing — A set of techniques (fuzzy logic, neural networks, evolutionary computation) that tolerate imprecision and uncertainty. Definition: methods that trade exactness for robustness and low-cost computation.

  • Reactive architecture — An agent architecture with direct mappings from percepts to actions, typically using condition-action rules; no explicit internal model of the world. Assumes fast response requirements and limited computational resources.

  • Deliberative architecture — An agent architecture that builds and uses an internal model (world model) to plan sequences of actions. Assumes that the environment is at least partly predictable and time is available for planning.

  • Hybrid architecture — Combines reactive modules for fast responses and deliberative modules for planning. Typical composition: sensors → perception/preprocessing → parallel reactive and deliberative layers feeding an executive/arbitration module → actuators (fast reactive paths can bypass planning when needed).

  • Markov decision process (MDP) — A formal model for decision making under uncertainty defined by tuple (S, A, P, R, γ):

    • S: set of states
    • A: set of actions
    • P(s'|s,a): transition probability to new state s' given state s and action a
    • R(s,a,s'): immediate reward for s,a,s'
    • γ ∈ [0,1]: discount factor for future rewards Assumes the Markov property: next state depends only on current state and action. For partial observability, use a POMDP with observations O and observation model Z(o|s,a), and maintain a belief state b(s) updated via Bayes' rule; optimal control operates over beliefs.
  • Markov property — Exact statement: for a stochastic process {X_t}, the process is Markovian if P(X_{t+1}=x' | X_t=x, X_{t-1}=x_{t-1},...) = P(X_{t+1}=x' | X_t=x). Assumes complete state description.

  • Bellman optimality equation — Gives the relationship for the optimal state-value function V*(s): V*(s) = max_a sum_{s'} P(s'|s,a) [ R(s,a,s') + γ V*(s') ]. This equation assumes finite state/action sets or appropriate conditions for convergence.

  • Bayes' theorem — Exact statement: For events A and B with P(B) > 0, P(A|B) = P(B|A)·P(A) / P(B). In probabilistic perception, it updates belief P(state|sensor) from prior P(state) and likelihood P(sensor|state).

  • Entropy (information theory) — For a discrete distribution p over outcomes i: H(p) = - Σ_i p(i) log_2 p(i). Measures uncertainty in bits. Assumes logarithm base 2 for bits; base e gives nats.

  • Architecture diagram to draw for exam answers (describe exactly): draw a left-to-right layered block diagram: leftmost small block labeled "Sensors (percepts)" with arrows into a block labeled "Perception / Preprocessing"; arrow to two parallel blocks stacked vertically: top "Reactive Layer (condition → action)" and bottom "Deliberative Layer (world model, planner)". Both point to a block "Action Selection / Arbitration" which points to "Actuators" on the right. Label data flows and show a feedback arrow from actuators/world to sensors. This diagram clarifies hybrid architecture.

Formulas

P(A|B) = P(B|A) · P(A) / P(B) — P(A|B): posterior probability of A given B (unitless). Applies when P(B) > 0. By the law of total probability, P(B) = Σ_i P(B|A_i)·P(A_i).

H(p) = - Σ_i p(i) log_2 p(i) — H: entropy in bits; p(i): probability of outcome i (unitless). Applies for discrete distributions.

V*(s) = max_a Σ_{s'} P(s'|s,a) [ R(s,a,s') + γ V*(s') ] — V*(s): optimal value (expected cumulative reward) of state s (units: same units as reward R). γ: discount factor (unitless, 0 ≤ γ < 1 for infinite horizon). Applies to MDPs with well-defined transitions.

Q*(s,a) = Σ_{s'} P(s'|s,a) [ R(s,a,s') + γ max_{a'} Q*(s',a') ] — Q*: optimal state-action value. Symbols as above.

For perception pipelines, remember: measurement units must match real-world SI units (e.g., acceleration: m·s^-2).

Worked examples

  1. Bayes' update for a noisy context sensor Problem: A context sensor signals event E (e.g., user is running). Prior belief that user is running: P(Run) = 0.01. Sensor has true positive rate P(E|Run) = 0.95 and false positive rate P(E|¬Run) = 0.05. Compute posterior P(Run|E). Steps:

    • Formula: P(Run|E) = P(E|Run)·P(Run) / P(E).
    • Compute P(E) = P(E|Run)·P(Run) + P(E|¬Run)·P(¬Run) = 0.95·0.01 + 0.05·0.99 = 0.0095 + 0.0495 = 0.059.
    • Posterior = 0.0095 / 0.059 = 0.1610169... → 0.161 (≈16.1%). Interpretation: despite good sensor, low prior makes posterior moderate.
  2. Small MDP value iteration (exam-style numeric) Problem: Two states S = {s0, s1}, actions A = {stay, go}. Dynamics deterministic:

    • From s0: stay → s0 with reward 1; go → s1 with reward 5.
    • From s1: any action → s1 with reward 0. Discount γ = 0.9. Compute optimal V*(s0) and policy. Steps:
    • For s1: V*(s1) = 0 because no reward ever after arriving.
    • For s0 two action-values: V_stay(s0) solves V = 1 + 0.9 V ⇒ V(1-0.9) = 1 ⇒ V = 1/0.1 = 10. V_go(s0) = 5 + 0.9·V*(s1) = 5 + 0.9·0 = 5.
    • Choose max: V*(s0) = 10, optimal action at s0 is stay. Answer: V(s0)=10, V(s1)=0, policy(s0)=stay, policy(s1)=any.**
  3. Short model-answer: choose architecture for a wearable fall-detection assistant Problem (theory): Which intelligent system architecture would you choose and why? Model answer (stepwise):

    • Requirements: low-latency alerts (fast reactions), noisy sensor data (uncertainty), occasional pattern recognition for activity trends (learning).
    • Choose a hybrid architecture: reactive module for immediate threshold-based fall detection; deliberative/learning module offline for refining models of user gait and personal thresholds.
    • Explain modules: sensors → preprocessing (filtering, feature extraction) → reactive rules (if acceleration magnitude > threshold and orientation changed then alert) → arbitration with deliberative planner (for reducing false alarms using learned models) → actuators (notification).
    • Justify: reactive meets latency, deliberative reduces false positives and adapts to user. Mention energy trade-offs and privacy concerns.

Common mistakes

  • Violating Markov assumption when modelling an MDP (including past-dependent state without expanding state to include memory).
  • Using deliberative architecture when strict real-time response is needed — ignore computational latency constraints.
  • Forgetting units in sensor data and mixing SI and non-SI units (e.g., using g for acceleration without converting to m·s^-2).
  • In value iteration, stopping too early without checking convergence tolerance or maximum iterations.

For your exam

Typical question types:

  • Definitions and short notes: define agent, MDP, Bellman equation, architectures. Full-marks: crisp definition, assumptions, and a short example.
  • Derivations: derive Bellman equation from definition of expected discounted return, or derive Bayes' theorem application in a sensor model. Full-marks: show step-by-step expectation expansion and assumptions (e.g., Markov property).
  • Numericals: Bayes updates, small MDP value iteration, entropy computations. Full-marks: show formulas, plug numbers, compute intermediate terms, final value with units.
  • Design / discussion: choose an architecture for a use case. Full-marks: list requirements, trade-offs, draw correct diagram (as described above), and justify module choices.
  • Diagrams: draw hybrid architecture with labelled data flows and feedback loop. Full-marks: include sensors, preprocessing, reactive/deliberative modules, arbitration, actuators, and feedback.

Quick check

  1. Define an agent in one sentence.
  2. Write Bayes' theorem formula and say what P(B) is in the denominator.
  3. In an MDP, what does the discount factor γ do? Answers: 1) An agent perceives via sensors and acts via actuators to achieve goals by mapping percepts to actions. 2) P(A|B)=P(B|A)·P(A)/P(B); P(B) is the total probability of B (normalizing constant). 3) γ ∈ [0,1]; with 0 ≤ γ < 1 for infinite-horizon discounted problems it ensures convergence; it scales future rewards, making distant rewards worth less.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?