Past Exam Questions: Search
1
Search and Heuristics
Imagine a car-like agent wishes to exit a maze like the one shown below:
The agent is directional and at all times faces some direction d (N, S, E, W ). With a single action, the agent
can either move fo
#
#
#
#
#
#
#
#
#
#
#
#
pacman.py
-Licensing Information: You are free to use or extend these projects for
educational purposes provided that (1) you do not distribute or publish
solutions, (2) you retain this notice, and (3) you provide clear
attribution
CS 188
Spring 2010
Final Exam
Solutions
Introduction to
Articial Intelligence
Q1. [14 pts] Search
For the following questions, please choose the best answer (only one answer per question). Assume a nite search
space.
(a) [2 pts] Depth-rst search can be ma
Midterm II
Solutions
Introduction to
Articial Intelligence
CS 188
Spring 2012
Q1. [18 pts] Markov Decision Processes
(a) [4 pts] Write out the equations to be used to compute Q from R, T, Vi1 , and to compute Vi from R, T, Q , .
i
i
T (s, a, s ) R(s, a, s
CS 188
Fall 2011
Introduction to
Articial Intelligence
Midterm Exam
INSTRUCTIONS
You have 3 hours.
The exam is closed book, closed notes except a one-page crib sheet.
Please use non-programmable calculators only.
Mark your answers ON THE EXAM ITSELF.
CS 188
Spring 2011
Introduction to
Articial Intelligence
Practice Midterm
To earn the extra credit, one of the following has to hold true. Please circle and sign.
A I spent 3 or more hours on the practice midterm.
B I spent fewer than 3 hours on the pract
Midterm II
Solutions
Introduction to
Articial Intelligence
CS 188
Spring 2012
Q1. [18 pts] Markov Decision Processes
(a) [4 pts] Write out the equations to be used to compute Q from R, T, Vi 1 , and to compute Vi from R, T, Q , .
i
i
T (s, a, s ) R(s, a,
CS188 Fall 2014 Section 2: A* and Heuristics
1
Knights Path
A knight is a chess piece where each move takes the piece 1 square in one direction and 2 squares in an orthogonal
direction. We want to guide our knight to its goal state in as little moves as p
CS 188
Fall 2011
Introduction to
Articial Intelligence
Midterm Exam
INSTRUCTIONS
You have 3 hours.
The exam is closed book, closed notes except a one-page crib sheet.
Please use non-programmable calculators only.
Mark your answers ON THE EXAM ITSELF.
Last name:_ First name:_ SID:_ Class account login:_
Collaborators: _
CS188 Spring 2011 Written 1: Search and CSPs
Due: Monday 2/14, 5:30pm either at the beginning of lecture or in 283 Soda Drop Box. Zero slip time.
Policy: See course webpage.
1
[7pts] Al
CS 188: Artificial Intelligence
Spring 2011
Lecture 7: Minimax and Alpha-Beta
Search
2/9/2011
Pieter Abbeel UC Berkeley
Many slides adapted from Dan Klein
1
Announcements
W1 out and due Monday 4:59pm
P2 out and due next week Friday 4:59pm
2
1
Overview
Det
CS 188: Artificial Intelligence
Constraint Satisfaction Problems
Instructor: Stuart Russell
University of California, Berkeley
Two main kinds of problem-solving
Planning: solution is a sequence (or strategy)
The path to the goal is the important thing
CS188 Section 4: CSPs and Propositional Logic
1
Course Scheduling
You are in charge of scheduling for computer science classes that meet Mondays, Wednesdays and Fridays. There
are 5 classes that meet on these days and 3 professors who will be teaching the
CS188 Fall 2014 Section 2: A* and Heuristics
1
Knights Path
A knight is a chess piece where each move takes the piece 1 square in one direction and 2 squares in an orthogonal
direction. We want to guide our knight to its goal state in as little moves as p
CS188 Fall 2014 Section 2: A* and Heuristics
1
Knights Path
A knight is a chess piece where each move takes the piece 1 square in one direction and 2 squares in an orthogonal
direction. We want to guide our knight to its goal state in as little moves as p
CS 188: Artificial Intelligence
Adversarial Search
Instructor: Stuart Russell
University of California, Berkeley
Game Playing State-of-the-Art
Checkers:
1950: First computer player.
1959: Samuels self-taught program.
1994: First computer world champion:
Announcements
Project 3 will be posted ASAP:
hun8ng ghosts with sonar
2
3
CS 188: Ar8cial Intelligence
Dynamic Bayes Nets and Par8cle Filters
Instructor: Stuart Russell
University of California, Berkeley
Tod
CS 188
Fall 2014
Introduction to
Articial Intelligence
Section 7 Solutions
HMMs and Particle Filtering
Q1. HMMs: Tracking a Jabberwock
You have been put in charge of a Jabberwock for your friend Lewis. The Jabberwock is kept in a large tulgey
wood which i
Announcements
Oce hours today shortened: 3.30-4.15
CS 188: Ar=cial Intelligence
Markov Models
Instructor: Stuart Russell - University of California, Berkeley
Uncertainty and Time
OLen, we want to reason about a seq
Announcements
Oce hours this week Tuesday 3.30-5
(as usual) and Wednesday 10.30-12
HW6 posted, due Monday 10/20
CS 188: ArKcial Intelligence
Bayes Nets: Exact Inference
Instructor: Stuart Russell- University of
CS188 Fall 2014 Section 5: Bayesian Networks
1
Green Party President
Its election year again! In a parallel universe the Green Party is running for presidency. Pundits believe that
Green Party presidents are more likely to legalize marijuana than candidat
Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS,
UCS
Cut back on A* optimality detail; a bit more on importance of
heuristics, performance data
Pattern DBs?
General Tree Search
function TREE-SEARCH(problem) returns a solution, or fail
Announcements
Project 1: Search
Due Wednesday 9/24
Solo or in group of two. For group of two: both of you need to submit your code into edX!
Note: dont expect IDS with vanilla graph DFS to be optimal
Homework 2: Heuristics and Local Search
Part I AN
CS 188: Artificial Intelligence
Logical Agents
Instructor: Stuart Russell
University of California, Berkeley
A knowledge-based agent
function KB-AGENT(percept) returns an action
persistent: KB, a knowledge base
t, an integer, initially 0
TELL(KB, MAKE-PER
CS188 Fall 2014 Section 6: Inference and Sampling
1
Sampling and Dynamic Bayes Nets
Many people would prefer to eat ice cream on a sunny day than on a rainy day. We can model this situation with
a Bayesian network. Suppose we consider the weather, along w
Past Exam Questions: Search
1
Search and Heuristics
Imagine a car-like agent wishes to exit a maze like the one shown below:
The agent is directional and at all times faces some direction d (N, S, E, W ). With a single action, the agent
can either move fo
CS188 Spring 2014 Section 3: Games
1
Nearly Zero Sum Games
The standard Minimax algorithm calculates worst-case values in a zero-sum two player game, i.e. a game in
which for all terminal states s, the utilities for players A (MAX) and B (MIN) obey UA (s)
CS188 Spring 2014 Section 3: Games
1
Nearly Zero Sum Games
The standard Minimax algorithm calculates worst-case values in a zero-sum two player game, i.e. a game in
which for all terminal states s, the utilities for players A (MAX) and B (MIN) obey UA (s)
CS188 Spring 2014 Section 4: MDPs
1
MDPs: Micro-Blackjack
In micro-blackjack, you repeatedly draw a card (with replacement) that is equally likely to be a 2, 3, or 4. You
can either Draw or Stop if the total score of the cards you have drawn is less than
Introduction to
Artificial Intelligence
CS 188
Spring 2012
Practice Midterm II
Solutions
Q1. [19 pts] Cheating at cs188-Blackjack
Cheating dealers have become a serious problem at the cs188-Blackjack tables. A cs188-Blackjack deck has 3 card
types (5,10,1
CS188: Exam Practice Session 3 Solutions
Q1. AlphaBetaExpinimax
In this question, player A is a minimizer, player B is a maximizer, and C represents a chance node. All children
of a chance node are equally likely. Consider a game tree with players A, B, a
CS188: Artificial Intelligence, Fall 2009
Written 3: Bayes Nets, VPI, and HMMs
Due: Wednesday 11/11 in 283 Soda Drop Box by 11:59pm (no slip days)
Policy: Can be solved in groups (acknowledge collaborators) but must be written up individually.
1
Bayes Net
SEARCH
MDP II
CSP II
Iterative Algorithms
-Algorithm: While not solved:
Choose a value that violates the fewest constraints
Performance:
- R = (# constraints) / (# variables)
- Very inefficient when at critical ratio R
Local Search
- improve a single opti
CS 188
Spring 2014
Introduction to
Artificial Intelligence
Midterm 1
You have approximately 2 hours and 50 minutes.
The exam is closed book, closed notes except your one-page crib sheet.
Mark your answers ON THE EXAM ITSELF. If you are not sure of your