Docsity

AI-Exam-Practice 100Questions, Examens de intelligence Artificielle

Toggle sidebar
bg1
AI EXAM QUESTION SHEET — 120 QUESTIONS
Search • Games • CSP • Genetic Algorithms • Genetic Programming
Mixed levels: Easy → Medium → Hard | MCQ + True/False + Short Answer + Exam Problems
Answers are provided in the Answer Key at the end.
Scope note: This sheet is based on the two PDFs available in this chat: Games & CSP Search and Genetic
Algorithms & Genetic Programming. The available PDFs do not contain the LLM/Expert Systems/Classical Agent
vs Agentic AI material, so those topics are not invented here.
SECTION A — MCQ (1–60)
1. Which search algorithm uses a FIFO queue?
A) DFS B) BFS C) UCS D) Hill Climbing
2. Which search algorithm uses a LIFO stack?
A) BFS B) DFS C) UCS D) Greedy
3. In SAGP, what does the G represent?
A) Graph B) Goal Test C) Genetic operator D) Greedy function
4. Which component describes the cumulative cost of actions?
A) Initial State B) Actions C) Goal Test D) Path Cost
5. BFS expands nodes in which order?
A) Deepest first B) Lowest h first C) Shallowest first D) Lowest cost first
6. BFS is optimal when:
A) Costs vary B) All step costs are equal C) h is admissible D) Tree is finite only
7. DFS may fail to be complete because it can:
A) Use too much memory B) Get stuck in infinite paths/cycles C) Ignore depth D) Use a priority queue
8. UCS expands the node with the smallest:
A) h(n) B) f(n) C) g(n) D) depth only
9. UCS is essentially equivalent to which classical algorithm?
A) Dijkstra B) Prim C) A* D) Floyd-Warshall
10. If every step cost is 1, UCS behaves like:
A) DFS B) BFS C) Greedy D) Hill Climbing
11. IDS repeatedly runs DFS with:
A) Increasing mutation rate B) Increasing depth limit C) Increasing heuristic D) Increasing path cost
12. Which search has O(bd) space in the guide?
A) BFS B) DFS C) IDS D) Greedy
13. Greedy Best-First Search uses:
A) g(n) B) h(n) C) g(n)+h(n) D) depth
14. A* uses:
A) h(n) only B) g(n) only C) g(n)+h(n) D) g(n)-h(n)
15. An admissible heuristic must:
A) Always overestimate B) Never overestimate C) Equal true cost D) Be zero everywhere
16. Consistency implies:
A) Greediness B) Admissibility C) DFS D) Completeness for DFS
17. A* with h(n)=0 reduces to:
A) BFS B) DFS C) UCS D) Hill Climbing
18. A* with g(n)=0 reduces to:
A) Greedy Best-First B) UCS C) IDS D) Minimax
pf3
pf4
pf5
pf8

Aperçu partiel du texte

Télécharge AI-Exam-Practice 100Questions et plus Examens au format PDF de intelligence Artificielle sur Docsity uniquement!

AI EXAM QUESTION SHEET — 120 QUESTIONS

Search • Games • CSP • Genetic Algorithms • Genetic Programming Mixed levels: Easy → Medium → Hard | MCQ + True/False + Short Answer + Exam Problems Answers are provided in the Answer Key at the end. Scope note: This sheet is based on the two PDFs available in this chat: Games & CSP Search and Genetic Algorithms & Genetic Programming. The available PDFs do not contain the LLM/Expert Systems/Classical Agent vs Agentic AI material, so those topics are not invented here.

SECTION A — MCQ (1–60)

1. Which search algorithm uses a FIFO queue? A) DFS B) BFS C) UCS D) Hill Climbing 2. Which search algorithm uses a LIFO stack? A) BFS B) DFS C) UCS D) Greedy 3. In SAGP, what does the G represent? A) Graph B) Goal Test C) Genetic operator D) Greedy function 4. Which component describes the cumulative cost of actions? A) Initial State B) Actions C) Goal Test D) Path Cost 5. BFS expands nodes in which order? A) Deepest first B) Lowest h first C) Shallowest first D) Lowest cost first 6. BFS is optimal when: A) Costs vary B) All step costs are equal C) h is admissible D) Tree is finite only 7. DFS may fail to be complete because it can: A) Use too much memory B) Get stuck in infinite paths/cycles C) Ignore depth D) Use a priority queue 8. UCS expands the node with the smallest: A) h(n) B) f(n) C) g(n) D) depth only 9. UCS is essentially equivalent to which classical algorithm? A) Dijkstra B) Prim C) A* D) Floyd-Warshall 10. If every step cost is 1, UCS behaves like: A) DFS B) BFS C) Greedy D) Hill Climbing 11. IDS repeatedly runs DFS with: A) Increasing mutation rate B) Increasing depth limit C) Increasing heuristic D) Increasing path cost 12. Which search has O(bd) space in the guide? A) BFS B) DFS C) IDS D) Greedy 13. Greedy Best-First Search uses: A) g(n) B) h(n) C) g(n)+h(n) D) depth 14. A uses:* A) h(n) only B) g(n) only C) g(n)+h(n) D) g(n)-h(n) 15. An admissible heuristic must: A) Always overestimate B) Never overestimate C) Equal true cost D) Be zero everywhere 16. Consistency implies: A) Greediness B) Admissibility C) DFS D) Completeness for DFS 17. A with h(n)=0 reduces to:* A) BFS B) DFS C) UCS D) Hill Climbing 18. A with g(n)=0 reduces to:* A) Greedy Best-First B) UCS C) IDS D) Minimax

19. Hill Climbing can get stuck at a: A) Global minimum only B) Local maximum C) Queue overflow D) Goal test 20. A common way to escape a local maximum in Hill Climbing is: A) Random restarts B) Elitism C) Crossover D) Alpha cutoff 21. In a zero-sum game, if MAX gets +5, MIN gets: A) +5 B) 0 C) -5 D) + 22. At a MAX node, Minimax chooses the: A) Minimum child B) Maximum child C) Average child D) First child 23. At a MIN node, Minimax chooses the: A) Maximum child B) Minimum child C) Median child D) Random child 24. Alpha represents: A) MIN's guaranteed value B) MAX's best guaranteed value C) heuristic value D) path cost 25. Beta represents: A) MAX's best guaranteed value B) MIN's best guaranteed value C) depth D) fitness 26. Alpha is updated at: A) MIN only B) MAX only C) Every leaf only D) CSP nodes 27. Beta is updated at: A) MAX only B) MIN only C) Leaves only D) GA selection 28. Alpha-Beta pruning changes: A) The optimal result B) The utility values C) Only the amount of search D) The game rules 29. The beta cutoff condition at MAX is: A) alpha <= beta B) alpha >= beta C) beta >= alpha+1 only D) alpha= 30. The alpha cutoff condition at MIN is: A) beta <= alpha B) beta >= alpha C) alpha < 0 D) beta= 31. Best-case Alpha-Beta time is approximately: A) O(b^m) B) O(b^(m/2)) C) O(bm) D) O(log b) 32. A CSP consists of: A) States, actions, goals B) Variables, domains, constraints C) Genes, fitness, mutation D) MAX, MIN, leaves 33. In a CSP, a domain contains: A) Variables B) Possible values for a variable C) Constraints only D) Search algorithms 34. A constraint involving one variable is: A) Unary B) Binary C) Higher-order D) Zero-order 35. A constraint involving two variables is: A) Unary B) Binary C) Ternary only D) Global only 36. In backtracking, when a partial assignment violates a constraint, we should: A) Continue deeper B) Stop that branch and backtrack C) Increase domain D) Ignore it 37. A constraint graph's nodes represent: A) Values B) Variables C) Goals D) Paths 38. A constraint graph's edges represent: A) Binary constraints/interactions B) Fitness values C) Search depth D) Operators 39. Which encoding is natural for TSP? A) Binary B) Real-valued C) Permutation D) Tree only 40. In GA, the chromosome is: A) The fitness score B) Complete encoded candidate solution C) Population size D) Termination condition 41. Genotype means: A) Decoded real-world meaning B) Encoded representation C) Fitness value D) Mutation rate

**66. An admissible heuristic can overestimate by a small amount.

  1. Consistency implies admissibility.
  2. Alpha-Beta can change the final Minimax value.
  3. At a MIN node, Minimax takes the minimum child value.
  4. A CSP solution must satisfy all constraints.
  5. Backtracking waits until the complete assignment before checking constraints.
  6. A permutation representation is appropriate for TSP.
  7. Crossover alone can create a gene value absent from the whole population.
  8. Mutation can introduce genetic material not currently present.
  9. Roulette selection is based on raw fitness values.
  10. Rank selection is based directly on raw fitness magnitudes.
  11. High tournament k increases selection pressure.
  12. Elitism guarantees the best-so-far fitness is not lost.
  13. Standard single-point crossover is always safe for TSP permutations.
  14. GP uses tree structures and subtree operations.**

SECTION C — SHORT ANSWER (81–100)

**81. What are the four components of a search problem (SAGP)?

  1. Why can the same state appear more than once in a search tree?
  2. Why does DFS use less memory than BFS?
  3. When does UCS behave exactly like BFS?
  4. Define admissible heuristic.
  5. Define consistent heuristic.
  6. What is the main difference between Greedy Best-First and A*?
  7. Why is Alpha-Beta faster than Minimax?
  8. Does Alpha-Beta change the optimal Minimax result? Why?
  9. Name the three CSP components.
  10. What is early failure in CSP backtracking?
  11. What is a chromosome in GA?
  12. What is the difference between genotype and phenotype?
  13. Why is diversity important in the initial GA population?
  14. What is selection pressure?
  15. Why can roulette wheel suffer premature convergence?
  16. Why is mutation necessary?
  17. What is elitism's main purpose?
  18. State the main difference between GA and GP.
  19. Why does standard crossover fail for TSP permutations?**

SECTION D — HARD / EXAM STYLE (101–120)

*101. A has g=7 and h=4 at node X. What is f(X)?

  1. If A* has h=0 for every node, which algorithm does it become and why?
  2. A population has fitness [2,6,4,8]. Give roulette probabilities.
  3. Tournament selection uses k=4 on fitness [60,84,68,76]. Which individual wins?**

**105. For rank selection with N=5, what is the probability of the fittest individual using P=(N-i+1)/(N(N+1)/2)?

  1. Decode 10110 as a 5-bit binary chromosome.
  2. For f(x)=x², what is the fitness of chromosome 11000?
  3. Perform single-point crossover after position 3: P1=11101, P2=01100.
  4. Mutate bit 3 of 11100100 using 1-based indexing.
  5. Why can crossover fail to reach an optimum even after many generations?
  6. Design a GA encoding for TSP with 5 cities.
  7. Give two valid TSP mutation operators.
  8. Give two valid TSP crossover operators.
  9. For TSP total distance 250, give a common maximization-style fitness.
  10. Explain why too much elitism can be harmful.
  11. A GA's best fitness was 100 in generation 3 and 90 in generation 8. Which best solution should be reported?
  12. In Minimax, a MAX node has child values 6 and 2. What does it return?
  13. In Minimax, a MIN node has child values 6 and 2. What does it return?
  14. If Alpha=6 at a MAX ancestor and a MIN node gets beta=2, can the MIN node's remaining branches be pruned?
  15. Why is subtree-swap crossover preferred over flattening GP trees to 1D strings?**

99. GA generally evolves parameters/numbers; GP evolves executable programs/expressions represented as trees. 100. It can create duplicate cities and omit other cities; OX/PMX preserve permutation validity.

Hard / Exam Answer Key (101–120)

102. UCS, because f=g+0=g. 103. 10%, 30%, 20%, 40%. 104. The individual with fitness 84. 105. 5/15 = 33.3%. 106. 22. 107. x=24, so fitness=576. 108. Children: 11100 and 01101. 109. 11000100. 110. Crossover only rearranges existing genetic material; required allele values may be absent, so mutation is needed. 111. Use a permutation such as [3,1,4,2,5], with each city appearing exactly once. 112. Swap mutation and inversion mutation. 113. Order Crossover (OX) and Partially Mapped Crossover (PMX). 114. 1/250 = 0.004 (or negative distance, depending on formulation). 115. It can make the population dominated by a few individuals and reduce diversity. 116. The generation-3 solution with fitness 100. 117. 6. 118. 2. 119. Yes, because beta ≤ alpha (2 ≤ 6): alpha cutoff. 120. Swapping complete subtrees preserves valid parent-child structure; flattening can create invalid trees/arity problems.

Last-Minute Memory List

  • Search: SAGP = Start/Initial State → Actions → Goal Test → Path Cost.
  • BFS = FIFO + layer by layer; optimal only with uniform step costs.
  • DFS = LIFO + deep dive; low memory but not complete/optimal in general.
  • UCS = lowest g(n); Dijkstra; optimal with positive step costs.
  • Greedy = h(n) only; fast-looking but not guaranteed complete/optimal.
  • A* = g(n)+h(n); optimal when h is admissible.
  • Admissible = never overestimate. Consistent ⇒ admissible.
  • Minimax = MAX takes max, MIN takes min.
  • Alpha = MAX guarantee, never decreases. Beta = MIN guarantee, never increases.
  • Alpha-Beta = same answer as Minimax, fewer branches. Cutoffs: MAX when α≥β; MIN when β≤α.
  • CSP = Variables + Domains + Constraints; backtrack immediately on violation.
  • GA cycle = Initialize → Evaluate → Select → Crossover → Mutate → Replace → Terminate.
  • Roulette = fitness / total fitness.
  • Tournament = best of k random individuals.
  • Rank = probability from rank, not raw fitness.
  • Crossover = mix existing material. Mutation = introduces new material.
  • Elitism = keep the king/best unchanged.
  • GA = numbers/parameters. GP = programs/trees.
  • TSP = permutation; OX/PMX crossover; swap/inversion mutation; fitness often 1/distance.