প্রITProstutiAI & Machine Learning Log in

Chapter 1

Foundations of AI: Agents and Search

14 sections · 20 MCQs

Subject: AI and machine learning

Almost every IT job exam with an AI question starts here: definitions of AI, the Turing test, AI vs ML vs DL, agent types, PEAS, and above all search — BFS/DFS complexity tables and A* with f = g + h. BSCS AP 17.01.2026 asked a full 10-mark question on A* vs BFS (§1.8). MCQs on McCarthy, admissible heuristics, forward/backward chaining and fuzzy operators are quick marks. Learn the tables in this chapter by heart.

1.1What is AI? — Definitions and the Turing Test

Artificial Intelligence (AI) is the branch of computer science that builds machines and programs able to do tasks that normally need human intelligence — perceiving, reasoning, learning, understanding language, planning and acting. John McCarthy, who coined the term "Artificial Intelligence" (Dartmouth proposal, 1955–56), defined it as "the science and engineering of making intelligent machines".

The standard textbook (Russell & Norvig, Artificial Intelligence: A Modern Approach) groups definitions along two axes: thinking vs acting, and measuring success against humans vs rationality (an ideal standard of "doing the right thing").

Human-likeRational
ThinkingThinking humanly — cognitive modelling: build programs that think the way humans do (cognitive science, psychology experiments, brain imaging)Thinking rationally — "laws of thought": correct reasoning with formal logic (Aristotle's syllogisms → logic programming)
ActingActing humanly — the Turing test approach: behave so that a human cannot tell it from a personActing rationally — the rational agent approach: act to achieve the best (expected) outcome. Used by the textbook and by modern AI

The Turing Test

Proposed by Alan Turing in his 1950 paper "Computing Machinery and Intelligence" as the Imitation Game. A human interrogator chats by text with a hidden human and a hidden machine. If the interrogator cannot reliably tell which is the machine, the machine passes. To pass, a computer needs: natural language processing, knowledge representation, automated reasoning and machine learning. The Total Turing Test adds a video signal and physical objects, so it also needs computer vision and robotics.

Related ideas CAPTCHA = Completely Automated Public Turing test to tell Computers and Humans Apart — a "reverse" Turing test, where a computer judges whether the user is human.
Chinese Room (John Searle, 1980) — argues that passing the test by symbol manipulation is not real understanding. Basis of the weak AI (simulates intelligence) vs strong AI (really has a mind) debate.
Common traps • Turing test = acting humanly, not thinking humanly.
• "Rational" means maximising the expected performance measure, not being perfect or all-knowing (omniscient).
• Father of AI (term) = McCarthy; Turing = father of theoretical computer science and of the test.

1.2Types of AI: Narrow, General, Super

Type (by capability)MeaningStatus / example
Narrow AI (ANI, weak AI)Good at one specific task or a limited set of tasks; cannot transfer to unrelated tasksAll AI in use today: face unlock, spam filter, fraud detection, chess engine, LLM chat assistants
General AI (AGI, strong AI)Human-level ability to understand, learn and apply knowledge across any intellectual taskNot achieved; research goal (⚠ whether today's large models are "steps toward AGI" is debated)
Super AI (ASI)Surpasses the best humans in every field, including creativity and social skillsHypothetical; discussed in AI safety and ethics

A second popular classification (by functionality): Reactive machines (no memory, e.g. Deep Blue) → Limited memory (uses recent data, e.g. self-driving cars, most ML models) → Theory of mind (understands emotions and beliefs — research stage) → Self-aware (hypothetical).

1.3AI vs ML vs DL vs Generative AI

Artificial Intelligence (AI) search, logic, rules, expert systems, planning Machine Learning (ML) learns from data — trees, SVM, k-means Deep Learning (DL) multi-layer neural networks — CNN, RNN Generative AI LLMs, image models
Figure 1.1: Nested relationship — every DL method is ML, every ML method is AI, but not the reverse
TermDefinitionKey point
AIAny technique that makes machines behave intelligentlyIncludes hand-written rules and search — no learning needed
MLSystems that learn patterns from data instead of being explicitly programmed. Tom Mitchell: a program learns from experience E for task T and performance measure P if its performance on T, measured by P, improves with ESupervised, unsupervised, reinforcement learning; features often hand-engineered
DLML using artificial neural networks with many hidden layersLearns features automatically from raw data; needs large data and GPUs
Generative AIDL models that create new content (text, image, audio, code) similar to their training dataLLMs (GPT, Claude, Gemini, Llama) are built on the Transformer; contrast with discriminative models that classify/predict
Exam tipWrite the nesting as GenAI ⊂ DL ⊂ ML ⊂ AI and draw Figure 1.1. Example chain for a bank: a rule "block card after 3 wrong PINs" = AI without ML; a fraud score model = ML; a cheque-image signature verifier with CNN = DL; a chatbot drafting replies = GenAI.

1.4Short History of AI

YearMilestone
1943McCulloch & Pitts — first mathematical model of an artificial neuron
1950Turing — "Computing Machinery and Intelligence", the Imitation Game (Turing test)
1956Dartmouth workshop (McCarthy, Minsky, Shannon, Rochester) — birth of AI as a field; the term "Artificial Intelligence"
1957–58Rosenblatt's Perceptron; McCarthy creates LISP (1958)
1960sELIZA chatbot (Weizenbaum); DENDRAL expert system (chemistry)
1969Minsky & Papert's book Perceptrons shows limits of single-layer perceptrons (e.g. XOR)
1970sProlog (1972); MYCIN medical expert system; first "AI winter" — funding cuts after over-promising
1980sCommercial expert systems boom (e.g. XCON/R1); 1986 backpropagation popularised (Rumelhart, Hinton, Williams); second AI winter late 1980s–early 1990s
1997IBM Deep Blue defeats world chess champion Garry Kasparov
2011IBM Watson wins the quiz show Jeopardy!
2012AlexNet (deep CNN on GPUs) wins ImageNet by a large margin — start of the deep-learning boom
2016DeepMind's AlphaGo defeats Go champion Lee Sedol
2017"Attention Is All You Need" — the Transformer architecture (basis of LLMs)
2022ChatGPT released publicly — generative AI goes mainstream
2024Nobel Prize in Physics to Hopfield and Hinton (neural networks); Chemistry shared by Hassabis and Jumper (AlphaFold protein-structure prediction) with Baker

1.5Intelligent Agents

An agent is anything that perceives its environment through sensors and acts on it through actuators. The agent function maps every percept sequence to an action; the agent program implements it on a physical architecture (Agent = Architecture + Program).

Rational agent: for each possible percept sequence, selects the action expected to maximise its performance measure, given the evidence from the percept sequence and its built-in knowledge. Rationality depends on (1) the performance measure, (2) prior knowledge of the environment, (3) available actions, (4) the percept sequence to date.

PEAS — specifying the task environment

AgentPerformance measureEnvironmentActuatorsSensors
Automated taxiSafe, fast, legal, comfortable trip; profitRoads, traffic, pedestrians, customersSteering, accelerator, brake, horn, displayCameras, LiDAR/radar, GPS, speedometer
Medical diagnosis systemHealthy patient, lower costPatient, hospital, staffDisplay of questions, tests, diagnoses, treatmentsKeyboard entry of symptoms, test results
Bank fraud-detection agentFrauds caught, few false alarms, low customer frictionCard/mobile/internet-banking transactions, customers, fraudstersApprove, decline, hold, send OTP/alert, raise caseTransaction stream, device/location data, customer history
Bank customer-service chatbotCorrect answers, resolution rate, satisfactionCustomers, core-banking data, FAQ baseText/voice replies, ticket creation, hand-off to humanTyped/spoken messages, account data

Properties of task environments

DimensionMeaning
Fully vs partially observableDo sensors give the complete relevant state at each moment? (Poker: opponents' cards hidden → partial)
Deterministic vs stochasticIs the next state completely fixed by the current state and action? (Dice, traffic → stochastic)
Episodic vs sequentialEpisodic: each decision is independent (classify each image). Sequential: current action affects future ones (chess, driving)
Static vs dynamicDoes the world change while the agent is thinking? Semi-dynamic: world fixed but score changes with time (chess with a clock)
Discrete vs continuousFinite distinct states/actions (chess) vs real-valued ones (steering angle, speed)
Single vs multi-agent; known vs unknownOther agents competing/cooperating? Does the agent know the rules (outcomes of actions)?
EnvironmentObservableAgentsDeterministicEpisodicStaticDiscrete
Crossword puzzleFullySingleDeterministicSequentialStaticDiscrete
Chess with a clockFullyMultiDeterministicSequentialSemiDiscrete
PokerPartiallyMultiStochasticSequentialStaticDiscrete
Taxi drivingPartiallyMultiStochasticSequentialDynamicContinuous
Image classificationFullySingleDeterministicEpisodicSemiContinuous

The hardest case is partially observable, multi-agent, stochastic, sequential, dynamic, continuous and unknown — e.g. real-world driving.

Types of agents (from simplest to most capable)

Agent typeHow it chooses an actionExample
Simple reflexCondition–action (if–then) rules on the current percept only; no memory. Works only if the environment is fully observable; can loop forever otherwiseThermostat; automatic door; vacuum: "if dirty then suck"
Model-based reflexKeeps an internal state updated with a model of how the world changes and how actions affect it; handles partial observabilityCar that remembers a vehicle now in its blind spot
Goal-basedHas a goal; asks "will this action sequence reach the goal?" — uses search and planningGPS route finder; puzzle solver
Utility-basedA utility function scores how good a state is; picks the action with maximum expected utility; handles trade-offs and uncertaintyRoute that balances time, toll and safety; loan-pricing system
LearningImproves with experience. Four parts: performance element (chooses actions), learning element (makes improvements), critic (feedback against a performance standard), problem generator (suggests exploratory actions)Spam filter that learns from "mark as spam"; fraud model retrained on new cases
Memory aidReflex → Model → Goal → Utility → Learning: "Really Many Good University Learners". Reflex agents react; goal/utility agents think ahead; any of them can be made a learning agent.

1.6Problem Solving as Search

A goal-based agent solves a problem by searching for a sequence of actions that leads from the start to a goal. A well-defined problem has five parts:

  1. Initial state — where the agent starts (e.g. in Dhaka).
  2. Actions — what can be done in a state (drive to a neighbouring city).
  3. Transition model — the state that results from an action.
  4. Goal test — is this a goal state? (in Chattogram?)
  5. Path cost — sum of step costs (km, time, money).

The initial state, actions and transition model together define the state space — a graph whose nodes are states and edges are actions. A solution is a path from the initial state to a goal; an optimal solution has the lowest path cost. Search algorithms build a search tree: the frontier (open list) holds generated but unexpanded nodes; the explored set (closed list) avoids revisiting states (graph search).

Example: 8-puzzleState = position of 8 tiles and the blank on a 3×3 board. Actions = move blank Up/Down/Left/Right. Goal = tiles in order. Step cost = 1. Reachable states = 9!/2 = 181,440 — far too many to check by hand, which is why good search strategies matter.

Measures of a search strategy: Completeness (always finds a solution if one exists?), Optimality (finds the lowest-cost solution?), Time complexity (nodes generated), Space complexity (nodes stored in memory). Expressed with b = branching factor, d = depth of the shallowest goal, m = maximum depth of the state space.

1.7Uninformed (Blind) Search

Uninformed strategies use only the problem definition — no knowledge of how close a state is to the goal.

StrategyIdeaFrontier data structure
Breadth-First (BFS)Expand the shallowest node first, level by levelFIFO queue
Uniform-Cost (UCS)Expand the node with the lowest path cost g(n) (Dijkstra-like)Priority queue on g(n)
Depth-First (DFS)Expand the deepest node first; backtrack at dead endsLIFO stack (or recursion)
Depth-Limited (DLS)DFS with a depth limit l; nodes at depth l are treated as leavesLIFO stack
Iterative Deepening (IDS)Run DLS with l = 0, 1, 2, … until a goal is foundLIFO stack
BidirectionalSearch forward from start and backward from goal; stop when they meetTwo frontiers
CriterionBFSUCSDFSDLSIDSBidirectional
Complete?Yes¹Yes¹,²NoNo (if l < d)Yes¹Yes¹,⁴
Optimal?Yes³YesNoNoYes³Yes³,⁴
TimeO(bd)O(b1+⌊C*/ε⌋)O(bm)O(bl)O(bd)O(bd/2)
SpaceO(bd)O(b1+⌊C*/ε⌋)O(bm)O(bl)O(bd)O(bd/2)

¹ if b is finite; ² if every step cost ≥ some ε > 0; ³ if all step costs are equal; ⁴ if both directions use BFS. C* = cost of the optimal solution. DFS is complete in finite state spaces when it avoids repeated states (graph search), but never optimal.

Worked numbers: why BFS memory explodes and IDS does not b = 10, d = 5. BFS generates b + b² + … + bd = 10 + 100 + 1,000 + 10,000 + 100,000 = 111,110 nodes and keeps about 105 of them in memory.
IDS regenerates upper levels in each iteration: d·b + (d−1)·b² + … + 1·bd = 50 + 400 + 3,000 + 20,000 + 100,000 = 123,450 nodes — only about 11% more time, but memory is just O(bd) ≈ 50 nodes.
Conclusion: IDS is the preferred uninformed method when the state space is large and the solution depth is unknown.
Common traps • BFS is optimal only when all step costs are equal; with different costs use UCS.
• DFS has small memory (O(bm)) but may run forever in an infinite or cyclic space.
• UCS with all step costs equal behaves like BFS.

1.8Informed (Heuristic) Search and A*

Informed search uses a heuristic function h(n) = estimated cost of the cheapest path from node n to a goal (h(goal) = 0). It picks nodes using an evaluation function f(n).

Algorithmf(n)Complete?Optimal?Note
Uniform-cost (for comparison)g(n)YesYesIgnores the goal direction
Greedy best-firsth(n)No (yes in finite spaces with graph search)NoFast, heads straight for the goal; can be misled
A*g(n) + h(n)Yes¹Yes if h is admissible (tree search) / consistent (graph search)Expands fewest nodes among optimal algorithms with the same h; main drawback is memory (exponential)

¹ with finite branching factor and step costs ≥ ε > 0. Memory-saving variants: IDA* (iterative-deepening A*), SMA* (simplified memory-bounded A*).

A* formulas f(n) = g(n) + h(n) — g(n) = actual cost from start to n; h(n) = estimated cost from n to the goal; f(n) = estimated cost of the cheapest solution through n.
Admissible: h(n) ≤ h*(n) for every n (never overestimates the true cost h*). Example: straight-line distance on a map.
Consistent (monotone): h(n) ≤ c(n, n′) + h(n′) for every successor n′ (triangle inequality). Consistent ⇒ admissible (not the reverse).
Special cases: h = 0 ⇒ A* = UCS; f = h only ⇒ greedy; f = g + w·h with w > 1 ⇒ weighted A* (faster, may lose optimality).
Heuristics for the 8-puzzle Goal: 1 2 3 / 4 5 6 / 7 8 _ . State: 5 1 3 / 4 2 6 / 7 8 _ .
h₁ = misplaced tiles: 5, 1, 2 are out of place → h₁ = 3.
h₂ = Manhattan distance (sum of row + column moves of each tile): 5 → 2, 1 → 1, 2 → 1 → h₂ = 4.
Both are admissible (each misplaced tile needs at least one move, and at least its Manhattan distance). h₂ ≥ h₁ for every state, so h₂ dominates h₁ — A* with h₂ never expands more nodes. Rule: prefer the largest admissible heuristic.

Worked A* trace

▶ Step-by-step animation: A* vs greedy best-first on this graph

14252312 SABCG h=7h=6h=4h=2h=0 red = edge cost h = heuristic to G
Figure 1.2: Directed graph for the trace — start S, goal G (h is admissible and consistent)

True cheapest costs to G: C = 3, B = 5, A = 7, S = 8, so every h ≤ true cost (admissible); every edge also satisfies h(n) ≤ c + h(n′) (consistent).

StepExpand (lowest f)New / updated nodes: g + h = fFrontier after the step
0—S: 0 + 7 = 7S(7)
1SA: 1 + 6 = 7; B: 4 + 4 = 8A(7), B(8)
2AB via A: 3 + 4 = 7 (better than 8, update); C: 6 + 2 = 8; G: 13 + 0 = 13B(7), C(8), G(13)
3BC via B: 5 + 2 = 7 (better than 8, update)C(7), G(13)
4CG via C: 8 + 0 = 8 (better than 13, update)G(8)
5G — goal selected, stopPath S → A → B → C → G, cost 1 + 2 + 2 + 3 = 8 (optimal)
Same graph, other algorithms Greedy (f = h): S → B (h 4 < 6) → C (h 2) → G: path S → B → C → G, cost 4 + 2 + 3 = 9 — fast but not optimal.
BFS (fewest edges): finds G at depth 2 through A: S → A → G, cost 1 + 12 = 13 — fewest steps, highest cost.
UCS (f = g): also returns cost 8. On this tiny graph it expands the same nodes as A*; on large maps a good h lets A* skip most of the nodes UCS would expand.
Rule: the goal test is applied when a node is selected for expansion, not when it is generated — that is why G(13) is not accepted at step 2.
Previous Question BSCS AP 17.01.2026 Construct a logical argument explaining why a heuristic search (like A*) might be faster than a blind search (like BFS), even if it doesn't guarantee the absolute perfect path in all cases. (10)

Compact answer:
  1. BFS is blind: it ignores where the goal is and spreads level by level in all directions; it examines and stores O(bd) nodes. It is optimal only when all edge costs are equal.
  2. A* is directed: it expands the node with the lowest f(n) = g(n) + h(n). Paths that move away from the goal get a large h, so they are expanded late or never — the search space is pruned and the search follows a narrow "corridor" toward the goal. The more accurate h is, the fewer nodes are expanded.
  3. Why the perfect path may not be guaranteed: A* is optimal only if h is admissible (and consistent for graph search). For speed, practical systems often use an inadmissible or weighted heuristic (f = g + w·h, w > 1) or greedy search (f = h). These rush toward the goal and may return a slightly longer path — a trade-off of time and memory against optimality. (Figure 1.2: greedy finds cost 9 instead of 8.)
  4. Example: Dhaka → Chattogram with straight-line distance as h: BFS also explores Rajshahi, Mymensingh and Khulna; A* goes mainly through the Cumilla–Feni direction and visits far fewer cities.
Full answer: AP notes §2.2.

1.9Adversarial Search: Minimax and Alpha-Beta Pruning

In two-player, zero-sum games with perfect information (chess, tic-tac-toe), one player (MAX) tries to maximise the utility and the opponent (MIN) tries to minimise it. A game tree alternates MAX and MIN levels; leaves are terminal states with utility values.

Minimax: the value of a node = utility (if terminal); max of children (MAX node); min of children (MIN node). Computed by depth-first recursion. Time O(bm), space O(bm). It assumes the opponent plays optimally.

MAXMINLeaf 33≤22 312821452 46 pruned (2 ≤ α = 3) α = 3 after first branch
Figure 1.3: Minimax values (MIN = 3, 2, 2 → MAX = 3) and the two leaves cut off by alpha-beta

Alpha-beta pruning returns the same move as minimax but skips branches that cannot affect the decision. α = best (highest) value MAX can guarantee so far on the path; β = best (lowest) value MIN can guarantee so far. Prune when α ≥ β.

Trace of Figure 1.3 First MIN node: min(3, 12, 8) = 3 → root α = 3.
Second MIN node: first leaf is 2, so this node's value ≤ 2. MAX already has 3, so it will never choose this branch (β = 2 ≤ α = 3) → leaves 4 and 6 are pruned.
Third MIN node: 14, 5, 2 must all be checked (14 and 5 are above 3; only the last leaf 2 shows it is worse) → value 2.
Root = max(3, ≤2, 2) = 3 — same as plain minimax.

With perfect move ordering alpha-beta examines about O(bm/2) nodes instead of O(bm) — it can search roughly twice as deep in the same time. Real game programs also cut off at a fixed depth and use an evaluation function (e.g. material count in chess) instead of true utilities.

1.10Knowledge Representation and Reasoning; Expert Systems

A knowledge-based agent keeps a knowledge base (KB) of sentences in a formal language and uses an inference procedure to derive new sentences (TELL and ASK).

Propositional logic

Atomic propositions (P, Q) that are either true or false, combined with connectives: ¬ (NOT), ∧ (AND), ∨ (OR), ⇒ (implies), ⇔ (if and only if).

PQP ⇒ QP ⇔ Q
TTTT
TFFF
FTTF
FFTT
Key equivalences and rules P ⇒ Q ≡ ¬P ∨ Q ≡ ¬Q ⇒ ¬P (contrapositive)
De Morgan: ¬(P ∧ Q) ≡ ¬P ∨ ¬Q; ¬(P ∨ Q) ≡ ¬P ∧ ¬Q
Modus Ponens: P ⇒ Q, P ⊢ Q
Modus Tollens: P ⇒ Q, ¬Q ⊢ ¬P
Resolution: P ∨ Q, ¬Q ∨ R ⊢ P ∨ R
Tautology = always true; contradiction = always false; satisfiable = true in at least one model.

First-order (predicate) logic

Adds objects (constants: Rahim, Sonali), predicates (Customer(x), Owns(x, y)), functions (BranchOf(x)), variables and quantifiers: ∀ (for all) and ∃ (there exists). It can say things about all objects that propositional logic cannot express compactly.

EnglishFirst-order logic
Every customer who has a loan pays interest.∀x (Customer(x) ∧ HasLoan(x) ⇒ PaysInterest(x))
Some loans are in default.∃x (Loan(x) ∧ Defaulted(x))
No customer is a fraudster.∀x (Customer(x) ⇒ ¬Fraudster(x)) ≡ ¬∃x (Customer(x) ∧ Fraudster(x))
Common trap∀ goes with ⇒, ∃ goes with ∧. "∀x (Customer(x) ∧ PaysInterest(x))" wrongly says everything in the universe is a customer; "∃x (Loan(x) ⇒ Defaulted(x))" is true even if nothing is a loan.

Other representations: production rules (IF condition THEN action), semantic networks (nodes and labelled links such as is-a, with inheritance), frames (objects with slots and fillers, like classes), ontologies (shared vocabularies of concepts and relations).

Expert systems

An expert system is a program that captures the knowledge of human experts in a narrow domain and gives advice or decisions at expert level. Classic examples: DENDRAL (chemistry), MYCIN (diagnosing bacterial infections), XCON/R1 (configuring computer orders).

ComponentRole
Knowledge baseDomain facts and IF–THEN rules from experts
Inference engineApplies rules to facts to derive conclusions (forward or backward chaining); resolves rule conflicts
Working memoryFacts of the current case
User interfaceTakes questions/facts from the user, shows advice
Explanation facilityAnswers "why?" and "how?" — shows the rules used
Knowledge acquisitionHelps the knowledge engineer add and update rules
BasisForward chainingBackward chaining
DirectionFacts → conclusions (data-driven)Goal/hypothesis → supporting facts (goal-driven)
Starts withKnown facts; fires every rule whose IF part is satisfiedA goal; finds rules whose THEN part matches it and tries to prove their IF parts
Suited forMonitoring, control, planning, alert generationDiagnosis, answering a specific question
ExamplesProduction systems (e.g. CLIPS, Rete-based engines)Prolog; MYCIN
Example: loan-approval rules R1: IF Salary ≥ 50,000 AND NoDefaultHistory THEN GoodCredit
R2: IF GoodCredit AND HasCollateral THEN ApproveLoan
Facts: Salary = 60,000; NoDefaultHistory; HasCollateral.
Forward: R1's IF part is true → add GoodCredit → R2's IF part is true → add ApproveLoan.
Backward: Goal ApproveLoan? → R2 needs GoodCredit and HasCollateral. HasCollateral is a fact; GoodCredit? → R1 needs Salary ≥ 50,000 (fact) and NoDefaultHistory (fact) → proved → ApproveLoan.

1.11Fuzzy Logic in Brief

Introduced by Lotfi Zadeh (1965). Classical (crisp) logic says a statement is 0 or 1; fuzzy logic allows a degree of truth / membership μ ∈ [0, 1]. Useful for vague concepts such as "high income", "warm", "risky".

Standard (Zadeh) fuzzy operators AND: μA∧B = min(μA, μB)
OR: μA∨B = max(μA, μB)
NOT: μ¬A = 1 − μA
Example: credit risk μHighIncome(applicant) = 0.6; μGoodHistory = 0.8.
Rule: IF HighIncome AND GoodHistory THEN LowRisk → strength = min(0.6, 0.8) = 0.6.
HighIncome OR GoodHistory = max = 0.8; NOT HighIncome = 0.4.

Fuzzy inference system: Fuzzification (crisp input → membership degrees using membership functions, e.g. triangular) → rule evaluation (IF–THEN rules with min/max) → aggregation → defuzzification (fuzzy output → one crisp number, commonly the centroid method). Common models: Mamdani and Sugeno. Uses: appliance and industrial controllers (washing machines, air conditioners), decision support, risk scoring.

Fuzzy ≠ probabilityμ = 0.7 "tall" means the person is tall to degree 0.7 (vagueness). Probability 0.7 means a 70% chance that a crisp event happens (uncertainty).

1.12AI Applications in Bangladesh Banking and Government

AreaAI techniqueTypical use
Fraud detection and AMLSupervised ML, anomaly detection, rules + scoresReal-time scoring of card, MFS and internet-banking transactions; flagging suspicious patterns for compliance review
Credit scoringML classification, sometimes rule-based expert systemsLoan/SME credit decisions, including alternative data for customers without credit history
e-KYC and onboardingComputer vision (face matching, liveness), OCRMatching a selfie with the NID photo; reading NID/forms automatically
Customer serviceNLP chatbots, LLM assistants, speech recognition (Bangla and English)24/7 answers on balance, card blocking, FAQs; hand-off to a human agent
Document processingOCR, NLP classification and extractionCheque processing, trade-finance documents, government file and application handling
Cybersecurity and IT operationsAnomaly detection, log analyticsDetecting unusual logins and network traffic; predicting ATM/server failures
Public servicesChatbots, NLP, analytics, optimisationCitizen helpdesks, service-request routing, planning and forecasting
Risks and governance (write in every application answer) Bias and fairness — models can discriminate if trained on biased data. Explainability — a rejected loan applicant needs a reason. Data privacy and security — customer and citizen data must be protected. Human oversight — keep a human in the loop for high-impact decisions. Model risk management — validation, monitoring for drift, audit trail. New threats — deepfake voice/video used to fool e-KYC or staff. Bangla language support and digital literacy matter for inclusion.

⚠ Specific bank deployments, national AI policy versions and statistics change often; quote them only from an official, dated source.

1.13Written practice

Question 1Define a rational agent. Describe the PEAS of a bank fraud-detection agent and classify its task environment. (10)

Model answer: A rational agent selects, for each percept sequence, the action expected to maximise its performance measure, given its percepts and built-in knowledge (rational ≠ omniscient). PEAS: P — frauds caught, low false-positive rate, low customer friction, fast decision; E — transaction streams (card, MFS, internet banking), customers, fraudsters; A — approve, decline, hold, send OTP/alert, open case; S — transaction details, device ID, location, customer history. Environment: partially observable (fraudster's intent hidden), multi-agent (fraudsters adapt), stochastic, sequential (past patterns affect decisions), dynamic (transactions keep arriving), and practically continuous (amounts, times). Best design: a learning, utility-based agent that balances loss from fraud against the cost of blocking genuine customers.
Question 2Compare BFS, DFS, uniform-cost search and iterative deepening search on completeness, optimality, time and space. When would you choose IDS? (10)

Model answer: Draw the table of §1.7. BFS: complete, optimal for equal step costs, O(bd) time and space — memory is the problem. DFS: O(bm) space but incomplete in infinite/cyclic spaces and not optimal. UCS: complete and optimal for any positive step costs, expands by g(n), O(b1+⌊C*/ε⌋). IDS: repeats DLS with increasing limits — complete and optimal (equal costs) like BFS, with O(bd) memory like DFS; overhead is small (b = 10, d = 5: 123,450 vs 111,110 nodes). Choose IDS when the search space is large, the solution depth is unknown and step costs are equal.
Question 3Explain the minimax algorithm and alpha-beta pruning with an example game tree. Why does pruning not change the result? (10)

Model answer: Definitions of MAX/MIN and minimax values (§1.9), then Figure 1.3: MIN values 3, 2, 2 → root 3. With α-β: after the first branch α = 3; in the second branch the first leaf 2 makes that MIN node ≤ 2 ≤ α, so leaves 4 and 6 are pruned. Pruning is safe because a pruned branch can only give MAX a value that MAX would never choose (or MIN would never allow) — the minimax value of the root is unchanged. With good move ordering the cost falls from O(bm) to about O(bm/2), so the program can search about twice as deep.
Question 4What is an expert system? Describe its components and distinguish forward and backward chaining with an example. (10)

Model answer: Definition and examples (MYCIN, DENDRAL, XCON). Components: knowledge base, inference engine, working memory, user interface, explanation facility, knowledge-acquisition module (knowledge engineer). Forward chaining is data-driven (facts → conclusions; monitoring, alerts); backward chaining is goal-driven (goal → facts; diagnosis, Prolog, MYCIN). Use the loan-approval example of §1.10 and show both traces. Limitations: knowledge-acquisition bottleneck, brittle outside its domain, rules need maintenance, no learning unless combined with ML.

1.14MCQ Practice

1. Who coined the term "Artificial Intelligence"?
Answer: (b) — in the 1955 proposal for the 1956 Dartmouth workshop.
2. The Turing test belongs to which approach to AI?
Answer: (c) — it judges behaviour, not the thinking process.
3. CAPTCHA is an example of —
Answer: (b) — a computer tests whether the user is human.
4. A chess engine that can only play chess is an example of —
Answer: (a) — specialised for one task.
5. Which nesting is correct?
Answer: (b) — deep learning is a subset of machine learning, which is a subset of AI.
6. In PEAS, the letter "A" stands for —
Answer: (c) — Performance, Environment, Actuators, Sensors.
7. The environment of a poker game is —
Answer: (b) — opponents' cards are hidden and the deal is random.
8. An agent that acts only on the current percept using condition–action rules is a —
Answer: (a) — no memory of past percepts.
9. Which component of a learning agent suggests exploratory actions?
Answer: (c) — it proposes new experiences to learn from.
10. Breadth-first search uses which data structure for its frontier?
Answer: (b) — DFS uses a stack (LIFO).
11. The space complexity of depth-first search is —
Answer: (b) — it stores only the current path and its siblings.
12. Which search combines the completeness of BFS with the low memory of DFS?
Answer: (c) — space O(bd), complete and optimal for equal step costs.
13. Uniform-cost search expands the node with the lowest —
Answer: (b) — path cost from the start.
14. In A* search, the evaluation function f(n) is —
Answer: (c) — actual cost so far plus estimated cost to the goal.
15. A heuristic is admissible if it —
Answer: (a) — h(n) ≤ h*(n); this guarantees A* optimality (tree search).
16. If h(n) = 0 for every node, A* behaves like —
Answer: (c) — f(n) = g(n).
17. In an expert system, which component applies rules to facts to reach conclusions?
Answer: (b) — it performs forward or backward chaining.
18. Which statement about alpha-beta pruning is correct?
Answer: (b) — pruned branches cannot affect the decision.
19. Backward chaining is best described as —
Answer: (b) — starts from the goal and works back to the facts.
20. Using Zadeh's standard operators, if μA = 0.6 and μB = 0.8, then μA AND B = —
Answer: (b) — AND = min(0.6, 0.8).

ITProstuti — free preparation notes for Bangladesh bank and government IT job exams.

Past questions belong to their setters (BSCS, BIBM and others); solutions and notes are written for learning. Spotted a mistake? Note the page and section and report it.