wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AI and Logic Quiz

Total questions: 50

Worksheet time: 2hrs 55mins

Name
Class
Date
1.

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?

a)

(2,2)

b)

(1,3)

c)

(3,1)

d)

(1,1)

2.

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)$?

a)

4

b)

6

c)

8

d)

0

3.

In the N-Queens problem (8x8), the AI reaches column 5 and finds no safe spot. What is the next logical step?

a)

Restart from column 1

b)

Move the queen in column 5 to row 1

c)

Backtrack to column 4 and move that queen to the next safe spot

d)

Skip column 5 and try column 6

4.

Which AI type would a self-driving car that remembers the speed of the car in front for the last 5 seconds fall under?

a)

Reactive Machines

b)

Limited Memory

c)

Theory of Mind

d)

Self-Awareness

5.

In an n8n workflow, a Webhook trigger receives 50 separate JSON payloads simultaneously. How many 'Executions' will occur?

a)

1

b)

50

c)

25

d)

Depends on the manual trigger

6.

A heuristic $h(n)$ is considered 'admissible' for A if:

a)

It never underestimates the cost to the goal

b)

it always overestimates the cost

c)

It is always equal to $g(n)$

d)

It never overestimates the cost to the goal

7.

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)?

a)

Empty the 3L jug

b)

Fill the 5L jug

c)

Pour 3L into 5L

d)

Measure 4L directly into the 3L jug

8.

Which prompt technique is used here: 'Review: 'Great movie' = Positive. Review: 'Waste of time' = Negative. Review: 'It was okay' = ?

a)

Zero-shot

b)

One-shot

c)

Few-shot

d)

Meta-prompt

9.

If $P \rightarrow Q$ is True and $\neg Q$ is True, what is the value of $P$?

a)

True

b)

False

c)

Contingent

d)

Tautology

10.

In AO search, an AND node is solved only if:

a)

Any one child is solved

b)

All children are solved

c)

The OR node above it is solved

d)

The cost is 0

11.

Which distance formula would you use for a search agent that can move diagonally?

a)

Manhattan Distance

b)

Euclidean Distance

c)

Chebyshev Distance

d)

Hamming Distance

12.

What does the n8n expression {{ $json.body.prompt }} specifically do?

a)

Deletes the prompt key

b)

Fetches the value of the prompt key from the incoming webhook JSON body

c)

Translates the prompt to JSON

d)

Encrypts the body

13.

'Artificial General Intelligence (AGI)' is best described as:

a)

AI that is really good at one specific job

b)

AI that mimics basic human thinking and can solve any problem a person could

c)

AI that has surpassed human capacity in all fields

d)

AI that only exists in spam filters

14.

In Propositional Logic, the statement $P \vee \neg P$ is a:

a)

Contradiction

b)

Contingency

c)

Tautology

d)

Fallacy

15.

A 'State Space Tree' for Tic-Tac-Toe starts with:

a)

An 'X' in the center

b)

A 3x3 grid with one 'O'

c)

An empty 3x3 grid (Initial State)

d)

A win for 'X'

16.

In n8n, what is 'Digital Glue'?

a)

A physical adhesive for hardware

b)

Low-code automation connecting different apps/services

c)

A programming language like Python

d)

A type of secure credential

17.

Which search strategy is 'Complete' and 'Optimal' for equal cost edges?

a)

DFS

b)

BFS

c)

Greedy Search

d)

AO

18.

A prompt saying 'Act like an expert car mechanic' is an example of:

a)

Instruction-based prompt

b)

Goal-oriented prompt

c)

Role-based prompt

d)

Meta-prompt

19.

If $P$ is 'It is raining' and $Q$ is 'The match is cancelled,' how is 'The match is cancelled only if it rains' represented?

a)

$Q \rightarrow P$

b)

$P \rightarrow Q$

c)

$P \wedge Q$

d)

$\neg P \vee Q$

20.

Which n8n node allows you to make a decision in a workflow?

a)

App Node

b)

Logic Node (e.g., IF node)

c)

Webhook Node

d)

Start Node

21.

Explain the difference between Strong AI and Super AI as defined in current theory

4 lines
22.

Describe the Backtracking method using the N-Queens problem as an example

4 lines
23.

What are the four types of AI based on functionality? Provide one example for each

4 lines
24.

Define State Space Search and list its four basic components (State, Initial State, Goal State, Actions)

4 lines
25.

Explain Chain-of-Thought (CoT) prompting and why it improves LLM performance in logic tasks

4 lines
26.

Compare Uninformed vs. Informed search strategies

4 lines
27.

Detail the logic behind the Missionary & Cannibal Problem and the specific 'Rule Check' the AI must perform

4 lines
28.

What is JSON, and why is it considered the 'language of data' in n8n?

4 lines
29.

Describe the Wumpus World environment and how an agent uses 'knowledge bases' to navigate safely

4 lines
30.

Define a Heuristic Function $h(n)$ and explain why Manhattan distance is used for grid-based movement

4 lines
31.

Explain Modus Ponens and Modus Tollens with a real-world example for each

4 lines
32.

What are Credentials in n8n, and why are they crucial for workflow security?

4 lines
33.

Describe A Search* using the formula $f(n) = g(n) + h(n)$

4 lines
34.

Explain the 'Unless' statement in Propositional Logic and its equivalent forms

4 lines
35.

What are the goals of Prompt Engineering, and how does it act as a 'user interface' for AI?

4 lines
36.

Describe the Water Jug Problem's state-space representation (e.g., $(x, y)$ coordinates)

4 lines
37.

Explain the role of a Trigger Node (like Schedule or Webhook) in an automation workflow

4 lines
38.

Define Representational Adequacy and Inferential Adequacy in Knowledge Representation

4 lines
39.

Discuss the Theory of Mind AI type and why it remains a 'future' technology

4 lines
40.

Explain De Morgan’s Laws in the context of simplifying logical expressions

4 lines
41.

Manhattan Distance: Calculate the distance from node $A(1,2)$ to goal $G(5,5)$

4 lines
42.

A Calculation: At node $N$, $g(n) = 10$ and $h(n) = 15$. What is $f(n)$?

4 lines
43.

Truth Table: How many rows are in a truth table with 4 variables ($P, Q, R, S$)?

4 lines
44.

Water Jug Logic: Starting at $(0,0)$, what is the state after 'Fill 5L' followed by 'Pour 5L into 3L'?

4 lines
45.

Logic Equivalence: Convert $\neg(P \wedge Q)$ into an equivalent OR statement using De Morgan’s Law

4 lines
46.

BFS Traversal: Given a tree with Root A, children B and C, and B’s children D and E—list the BFS order

4 lines
47.

DFS Traversal: Using the tree from Q6, list the DFS (Preorder) traversal

4 lines
48.

Implication Rule: Convert $P \rightarrow Q$ into an equivalent statement using $\neg$ and $\vee$

4 lines
49.

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)$?

4 lines
50.

n8n Expression: If $json.temp is 25, what is the output of the string: 'It is {{ $json.temp }} degrees'?

4 lines