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

AI · Theory

Knowledge-Based Agent

← All stacks

Theory

28/215

Knowledge-Based Agent

A knowledge-based agent stores sentences in a knowledge base (KB) and infers new ones before acting. Tell the KB facts. Ask it queries. Inference engine applies rules. Contrast with a simple reflex: no KB, just if-then on the current percept.

Wumpus world is the textbook playground: breeze → maybe pit nearby. Don’t dump Prolog unless they ask. Say KB + inference + action.

Output — idea / do / check for Knowledge-Based Agent. Fill those three in the viva.

Diagram
sensors  →  agent  →  actuators
                │
                ▼
            environment
Exam tip

KB vs simple reflex in one contrast.

Example

# Knowledge-Based Agent
print("idea :", "Knowledge-Based Agent")
print("do   : one tiny example on paper")
print("check: one failure case")

Output: idea / do / check for Knowledge-Based Agent. Fill those three in the viva.

Short notes

  • DefKB + inference + action.
  • RuleTell / Ask.

Questions

1

Explain Knowledge-Based 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 Knowledge-Based Agent?

Previous← Alpha-Beta PruningNextKnowledge Representation →
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.