SCI 1000C – Scientific Inquiry: Artificial Intelligence
Problem Set
Instructions: Be sure to answer every part of each question to receive maximum credit on this assignment. Every question is worth 10 points (if there are multiple parts to a question, their total sums to 10 points) for a maximum of 100 points. If any part of your answer to any question is copied from a solutions manual or other online source, this is considered cheating and you will receive 0 points for that question and be at risk for failing the assignment. Please submit your typed answers as a PDF file through the Blackboard portal.
1. Science intro
a. Is AI a branch of science, or is it engineering? Neither science nor engineering? Both science and engineering? Explain your reasoning.
b. Are reflex actions (such as flinching from a hot stove) rational? Are they intelligent?
c. Why would evolution tend to result in systems that act rationally? What goals are those systems designed to achieve?
2. Task feasibility
Discover whether the following tasks can currently be solved by computers and elaborate on how the task is solved. For the currently infeasible (or semi-feasible) tasks, try to examine what the difficulties are and predict when, if ever, they will be overcome.
a. Playing a decent game of ping pong
b. Driving in the center of Cairo, Egypt
c. Driving in Victorville, California
d. Buying a week’s worth of groceries at the market
e. Buying a week’s worth of groceries on the web
f. Discovering and proving new mathematical theorems
g. Writing an intentionally funny story
h. Giving competent legal advice in a specialized area of law
i. Translating spoken English into spoken Swedish in real time
j. Performing a complex surgical operation
3. Search engines
We’re going to explore the results of a few different search engines by designing an experiment. Four common search engines that people use are Google, Bing, Yahoo, and AOL, and we’re going test each of them.
Choose 5 search terms that you will run a search for in each of the four mentioned search engines. These searches can be anything you want, but you should try to vary how general or specific they are to get a feel for the nuances in various search engines.
First, hypothesize which search engine you believe will perform “the best” on each search you run. What does “the best” even mean? Well, that can depend on the context:
• You might want to broaden your scope and look at the first 20 answers returned, with the objective of getting as much relevant information as possible. (e.g. your boss wants to ensure that you have a general enough understanding of a topic)
• Or you might be crunched for time, need only one relevant document, and will go down the list until you find the first one. (e.g. a manager needs something urgently regardless of quality, breadth, or depth of information)
• And maybe you have a narrow query and can examine all the answers retrieved, because you want to be sure that you have seen everything in the search results that is relevant to your query. (e.g. a lawyer wants to be sure that she has found all relevant precedents, and is willing to spend considerable resources on that)
You’ll browse the user interface and click through a few pages of results for each search engine.
a. List your hypothesis about which search engine you think will perform “best” for each search you run. Be sure to provide what searches you are running so I can replicate results if needed.
b. Do all the search engines generally look or behave the same? Why might this be?
c. Is there anything unique about the user experience of each search engine?
d. Comment on the quality of the results for each term on each search engine.
e. Was your hypothesis supported by your observations? Explain.
4. The Almanac Game
This problem is themed around the Almanac Game, which is used by decision analysts to calibrate numeric estimation. For each of the questions that follow, give your best guess of the answer, that is, a number that you think is as likely to be too high as it is to be too low. Also give your guess at a 25th percentile estimate, that is, a number that you think has a 25% chance of being too high, and a 75% chance of being too low. Do the same for the 75th percentile. You should give three estimates in all for each question – low, median, and high.
The idea here is to improve your guessing accuracy as you progress from (a) to (t). After you finish estimating (j), check your answers so far by searching on the Internet. Use this to gauge your estimation abilities and then answer (k) through (t) with that knowledge in mind.
From the point of view of decision analysts, the interesting thing is not how close your median guesses came to the real answers, but rather how often the real answer came within your 25% and 75% bounds. If it was about half the time, then your bounds are accurate. If you are like most people, you will be more sure of yourself than you should be, and fewer than half the answers will fall within the bounds. With practice, you can calibrate yourself to give realistic bounds, and thus be more useful in supplying information for decision making.
a. Number of passengers who flew between New York and Los Angeles in 1989
b. Population of Warsaw in 1992
c. Year in which Coronado discovered the Mississippi River
d. Number of votes received by Jimmy Carter in the 1976 presidential election
e. Age of the oldest living tree, as of 2002
f. Height of the Hoover Dam in feet
g. Number of eggs produced in Oregon in 1985
h. Number of Buddhists in the world in 1992
i. Number of deaths due to AIDS in the United States in 1981
j. Number of U.S. patents granted in 1901
[STOP – as we mentioned in the instructions, go back and check your estimates for questions a-j. You’ll then answer questions k-t with more calibrated estimation and quantitative reasoning skills.]
k. Year of birth of Zsa Zsa Gabor
l. Maximum distance from Mars to the sun in miles
m. Value in dollars of exports of wheat from the United States in 1992
n. Tons handled by the port of Honolulu in 1991
o. Annual salary in dollars of the governor of California in 1993
p. Population of San Diego in 1990
q. Year in which Roger Williams founded Providence, Rhode Island
r. Height of Mt. Kilimanjaro in feet
s. Length of the Brooklyn Bridge in feet
t. Number of deaths due to automobile accidents in the United States in 1992
5. Everyday algorithms
Formulate a model and develop an algorithm to solve each of the following problems. In each case, start with a simple algorithm, then think about situations that can realistically go wrong, and then make any appropriate adjustments to your algorithm.
Decide on the level of abstraction you want in your pseudocode and create any necessary sub-algorithms (also known as functions) along the way. Be sure to simplify your pseudocode with control flow techniques such as choice (if-then-else statements) or loops (count-controlled, condition-controlled).
Keep in mind that there is no “correct” answer to these problems, so everyone will have a unique solution. The thought process is what counts!
a. Making 2 peanut butter and jelly sandwiches
b. Playing a game of musical chairs
c. Getting home from school or work
6. Rational agents
Suppose that the performance measure of an intelligent agent is concerned with just the first 𝑇 time steps of the environment and ignores everything afterward. In this problem, we’ll demonstrate that a rational agent’s action may depend not just on the state of the environment but also on the time step it has reached.
Let’s assume that the agent exists in a sequential environment in which rewards take time to arrive – then we can say that the rewards are “over the horizon” and gained at some point after time 𝑇. Suppose that there are 2 states (𝑠 and 𝑠’), and 1 of 2 actions (𝑎 or 𝑏) can be performed in each state. At time 𝑇–1, an action moves it to time 𝑇. At time 𝑇, an action “ends the game”. The rules of the game are as follows…
If the agent is in state 𝑠:
• Action 𝑎 brings the agent to state 𝑠’ with reward 0
• Action 𝑏 keeps the agent in state 𝑠 with reward 1
If the agent is in state 𝑠’:
• Either action grants the agent a reward of 10
Based on the information above, answer the following questions:
a. Consider the case where the agent starts in state 𝑠 at time 𝑇–1. What is the rational sequence of actions for the agent to take, based on the expected total reward before time is up? Explain your reasoning.
b. Consider the case where the agent starts in state 𝑠 at time 𝑇. What is the rational sequence of actions for the agent to take, based on the expected total reward before time is up? Explain your reasoning.
[Note: Your answers to part (a) and part (b) should be different; therefore, we have demonstrated that a rational agent’s action may depend on the time step it has reached.]
c. Provide 3 examples from real life where your actions may depend on the “time step” you have reached – this is referring to the amount of time you have left before gaining a reward or avoiding a loss.
7. Binary search trees
Consider a state space where the start state is number 1 and each state 𝑘 has two successors: numbers 2𝑘 and 2𝑘+1.
a. Draw the portion of the state space for states 1 to 15.
b. Suppose the goal state is 11. List the order in which nodes will be visited for:
i. Breadth-first search
ii. Depth-first search
c. Call the action going from 𝑘 to 2𝑘 “Left”, and the action going from 𝑘 to 2𝑘+1 “Right”. Find a simple “algorithm” that outputs the solution to this problem without any search at all. (Hint – write the goal state number in binary…)
8. Constraint satisfaction
In 5 houses, each painted a different color, live 5 people of different nationalities, each of whom prefers a different brand of candy, a different drink, and a different pet.
Houses: Red, white, yellow, blue, green
Nationalities: English, Spanish, Norwegian, French, Japanese
Candies: Hershey bars, Kit Kats, Skittles, Twizzlers, Starbursts
Drinks: Orange juice, tea, coffee, milk, water
Pets: Fish, cat, bird, rabbit, dog
The Englishman lives in the red house.
The Spaniard owns the fish.
The Norwegian lives in the first house on the left.
The green house is immediately to the right of the white house.
The man who eats Hershey bars lives in the house next to the man with the cat.
Kit Kats are eaten in the yellow house.
The Norwegian lives next to the blue house.
The Skittles eater owns the bird.
The Twizzlers eater drinks orange juice.
The Frenchman drinks tea.
The Japanese eats Starbursts.
Kit Kats are eaten in a house next to the house where the rabbit is kept.
Coffee is drunk in the green house.
Milk is drunk in the middle house.
a. Draw the complete solution to this puzzle.
b. What is the color of the house where the dog lives?
c. What is the nationality of the person who drinks water?
9. Robotics
Consider a mobile robot moving on a horizontal surface. Suppose that the robot can execute two kinds of motions:
• Rolling forward a specified distance
• Rotating in place through a specified angle
The state of such a robot can be characterized in terms of three parameters (𝑥,𝑦,𝜙), where 𝑥 and 𝑦 are the 𝑥-coordinate and 𝑦-coordinate of the robot (more precisely, of its center of rotation) and 𝜙 is the robot’s orientation expressed as the angle from the +𝑥 direction.
• The action “𝑅𝑜𝑙𝑙(𝐷)” changes state (𝑥,𝑦,𝜙) to (𝑥+𝐷cos𝜙,𝑦+𝐷sin𝜙,𝜙)
• The action “𝑅𝑜𝑡𝑎𝑡𝑒(𝜃)” changes state (𝑥,𝑦,𝜙) to (𝑥,𝑦,𝜙+𝜃)
Suppose that the robot is initially at (0,0,0) and then executes the sequence of actions 𝑅𝑜𝑡𝑎𝑡𝑒(60°), 𝑅𝑜𝑙𝑙(1), 𝑅𝑜𝑡𝑎𝑡𝑒(25°), and 𝑅𝑜𝑙𝑙(2). What is the final state of the robot? Show your work for each step.
10. Translation tools
We’re going to run an experiment to explore the accuracy of one of our favorite translation tools, as an application of natural language processing. Choose a highly descriptive and vividly detailed paragraph from your favorite book or other publication. (Be sure to type it out in your assignment so I can replicate results if needed.)
You will use Google Translate to translate this paragraph into 5 foreign languages, and then copy those results and translate them back into English. You might be wondering which foreign languages you’ll try – and you get to decide those too! I recommend choosing languages that are all very different from one another (i.e. mix things up to get more unique results from your experiment).
a. Formulate a hypothesis about which of the 5 language translations will be most accurate (going from English to a certain language, and then from that language back to English) for the paragraph you chose.
b. Rate the resulting English paragraph for grammatical correctness and preservation of meaning.
c. Does the choice of intermediate language make a difference to the quality of the results?
d. Was your hypothesis supported by your observations?