Font size
WorksheetsAI and Logic Quiz
Total questions: 50
Worksheet time: 2hrs 55mins
An agent is exploring a 4 × 4 Wumpus World grid.
The agent follows standard Wumpus World rules:
A breeze is perceived in a square if and only if at least one adjacent square (up, down, left, right) contains a pit.
A stench is perceived in a square if and only if at least one adjacent square contains the Wumpus.
A square may contain only one of the following: a Pit, the Wumpus, Gold, or be Empty.
The agent can only perceive breeze or stench in the square it is currently in; it cannot see hazards directly.
The starting square (1,1) is known to be safe.
Based on the agent’s perceptions and logical inference, the following squares are under consideration:
A square is said to be a “Pit-only threat” if:
A pit is logically inferred to be possible or certain in that square, and
A Wumpus is logically impossible in that square.
Based on logic, which square is definitively a 'Pit-only' threat?
(2,2)
(1,3)
(3,1)
(1,1)
If the agent uses A search to reach the gold at (4,4) starting from (1,1), and the heuristic $h(n)$ is the Manhattan distance, what is the initial $f(n)$?
4
6
8
0
In the N-Queens problem (8x8), the AI reaches column 5 and finds no safe spot. What is the next logical step?
Restart from column 1
Move the queen in column 5 to row 1
Backtrack to column 4 and move that queen to the next safe spot
Skip column 5 and try column 6
Which AI type would a self-driving car that remembers the speed of the car in front for the last 5 seconds fall under?
Reactive Machines
Limited Memory
Theory of Mind
Self-Awareness
In an n8n workflow, a Webhook trigger receives 50 separate JSON payloads simultaneously. How many 'Executions' will occur?
1
50
25
Depends on the manual trigger
A heuristic $h(n)$ is considered 'admissible' for A if:
It never underestimates the cost to the goal
it always overestimates the cost
It is always equal to $g(n)$
It never overestimates the cost to the goal
In the Water Jug Problem (5L and 3L), to reach the state (4,0), which action is impossible as a single step from (0,3)?
Empty the 3L jug
Fill the 5L jug
Pour 3L into 5L
Measure 4L directly into the 3L jug
Which prompt technique is used here: 'Review: 'Great movie' = Positive. Review: 'Waste of time' = Negative. Review: 'It was okay' = ?
Zero-shot
One-shot
Few-shot
Meta-prompt
If $P \rightarrow Q$ is True and $\neg Q$ is True, what is the value of $P$?
True
False
Contingent
Tautology
In AO search, an AND node is solved only if:
Any one child is solved
All children are solved
The OR node above it is solved
The cost is 0
Which distance formula would you use for a search agent that can move diagonally?
Manhattan Distance
Euclidean Distance
Chebyshev Distance
Hamming Distance
What does the n8n expression {{ $json.body.prompt }} specifically do?
Deletes the prompt key
Fetches the value of the prompt key from the incoming webhook JSON body
Translates the prompt to JSON
Encrypts the body
'Artificial General Intelligence (AGI)' is best described as:
AI that is really good at one specific job
AI that mimics basic human thinking and can solve any problem a person could
AI that has surpassed human capacity in all fields
AI that only exists in spam filters
In Propositional Logic, the statement $P \vee \neg P$ is a:
Contradiction
Contingency
Tautology
Fallacy
A 'State Space Tree' for Tic-Tac-Toe starts with:
An 'X' in the center
A 3x3 grid with one 'O'
An empty 3x3 grid (Initial State)
A win for 'X'
In n8n, what is 'Digital Glue'?
A physical adhesive for hardware
Low-code automation connecting different apps/services
A programming language like Python
A type of secure credential
Which search strategy is 'Complete' and 'Optimal' for equal cost edges?
DFS
BFS
Greedy Search
AO
A prompt saying 'Act like an expert car mechanic' is an example of:
Instruction-based prompt
Goal-oriented prompt
Role-based prompt
Meta-prompt
If $P$ is 'It is raining' and $Q$ is 'The match is cancelled,' how is 'The match is cancelled only if it rains' represented?
$Q \rightarrow P$
$P \rightarrow Q$
$P \wedge Q$
$\neg P \vee Q$
Which n8n node allows you to make a decision in a workflow?
App Node
Logic Node (e.g., IF node)
Webhook Node
Start Node
Explain the difference between Strong AI and Super AI as defined in current theory
Describe the Backtracking method using the N-Queens problem as an example
What are the four types of AI based on functionality? Provide one example for each
Define State Space Search and list its four basic components (State, Initial State, Goal State, Actions)
Explain Chain-of-Thought (CoT) prompting and why it improves LLM performance in logic tasks
Compare Uninformed vs. Informed search strategies
Detail the logic behind the Missionary & Cannibal Problem and the specific 'Rule Check' the AI must perform
What is JSON, and why is it considered the 'language of data' in n8n?
Describe the Wumpus World environment and how an agent uses 'knowledge bases' to navigate safely
Define a Heuristic Function $h(n)$ and explain why Manhattan distance is used for grid-based movement
Explain Modus Ponens and Modus Tollens with a real-world example for each
What are Credentials in n8n, and why are they crucial for workflow security?
Describe A Search* using the formula $f(n) = g(n) + h(n)$
Explain the 'Unless' statement in Propositional Logic and its equivalent forms
What are the goals of Prompt Engineering, and how does it act as a 'user interface' for AI?
Describe the Water Jug Problem's state-space representation (e.g., $(x, y)$ coordinates)
Explain the role of a Trigger Node (like Schedule or Webhook) in an automation workflow
Define Representational Adequacy and Inferential Adequacy in Knowledge Representation
Discuss the Theory of Mind AI type and why it remains a 'future' technology
Explain De Morgan’s Laws in the context of simplifying logical expressions
Manhattan Distance: Calculate the distance from node $A(1,2)$ to goal $G(5,5)$
A Calculation: At node $N$, $g(n) = 10$ and $h(n) = 15$. What is $f(n)$?
Truth Table: How many rows are in a truth table with 4 variables ($P, Q, R, S$)?
Water Jug Logic: Starting at $(0,0)$, what is the state after 'Fill 5L' followed by 'Pour 5L into 3L'?
Logic Equivalence: Convert $\neg(P \wedge Q)$ into an equivalent OR statement using De Morgan’s Law
BFS Traversal: Given a tree with Root A, children B and C, and B’s children D and E—list the BFS order
DFS Traversal: Using the tree from Q6, list the DFS (Preorder) traversal
Implication Rule: Convert $P \rightarrow Q$ into an equivalent statement using $\neg$ and $\vee$
Heuristic Estimate: If the goal is 1 2 3 / 4 5 6 / 7 8 0, and the current state is 1 2 3 / 4 5 6 / 7 0 8, what is the Misplaced Tile heuristic value $h(n)$?
n8n Expression: If $json.temp is 25, what is the output of the string: 'It is {{ $json.temp }} degrees'?
