PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

AI · Theory

Simple Reflex Agent

← All stacks

Theory

190/215

Simple Reflex Agent

Simple reflex: if percept then action. No memory of the past. Thermostat: if temp < 20 then heat. Vacuum: if dirt then suck else move. Fails when the right action depends on history (a maze).

Upgrade path — add internal state (model-based). Don’t call a huge LLM a simple reflex.

Simple Reflex Agent — output — heat off. No memory of yesterday.

Diagram
sensors  →  agent  →  actuators
                │
                ▼
            environment
Exam tip

Thermostat example + when it fails.

Example

# Thermostat reflex
def reflex(temp):
    return "heat" if temp < 20 else "off"

print(reflex(18), reflex(22))

Simple Reflex Agent — output: heat off. No memory of yesterday.

Short notes

  • DefCondition–action rules. No memory.
  • RuleFails when history matters.

Questions

1

Explain Simple Reflex Agent as if you are teaching a junior — definition, then one example.

2

What does the example print, and what does that prove?

3

What mistake do freshers make with Simple Reflex Agent?

Previous← Artificial Super Intelligence (ASI)NextAI Hallucination →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.