Download presentation
Presentation is loading. Please wait.
1
Week 5 - Friday CS 113
2
Last time What did we talk about last time? Simulation and modeling
Bioinformatics If statements in Python
3
Project 2
4
Questions?
5
Artificial Intelligence
6
Artificial intelligence
Artificial intelligence (AI) is hard to define Trying to make machines think? Goals Problem solving Representing knowledge Creating machines that can learn Natural language processing Interpreting and interacting with the physical world and humans Creativity General intelligence is perhaps the combination of all these things Achieving general intelligence is sometimes called strong AI
7
Approaches There are many approaches for generating various aspects of artificial intelligence Simulating the human brain Like with Blue Gene Symbolic approaches Views all intelligence as manipulating symbols Sub-symbolic approaches Became popular in the 1980s Tries to process data without directly manipulating symbols Statistical approaches Combinations
8
i Neural networks Neural networks are a popular sub-symbolic tool
They are composed of simple nodes that take numerical inputs and add them together with different weights By adjusting the weights, you can train a group of nodes to solve a problem There are handwriting recognizers and speech recognizers that use neural networks i
9
Statistical approaches
In the 1990s, statistical approaches became popular For example, you can analyze language statistically and Find rarely used words, are some of them misspelled? Find buzzwords Link different search terms together Know that this phrase in Farsi is almost always translated into that phrase in English Most of Google's success in AI has been statistical Like neural networks, statistical models of how speech (or other intelligent behavior) is formed tend to give us little insight into how intelligence works But they work!
10
Turing test Alice: Are you a human? Bob: What else would I be?
Alan Turing, a great early computer scientist, argued that acting like a human being was proof of intelligence In the Turing test, person A (call her Alice) texts with entity B (call him Bob) Bob could be a computer or a human If a computer can reliably fool Alice into thinking is a human, it is displaying human intelligence Alice: Are you a human? Bob: What else would I be? Alice: Do you like pie? Bob: The value of pi is approximately
11
Chinese Room John Searle proposed an argument against symbolic AI and the Turing test: Imagine a room filled with rules to manipulate symbols A man in the room receives symbols written on paper slipped through a slot in the door He follows the rules, creates new symbols, writes them on paper, and slips them back out the slot The symbols are actually Chinese characters Because the rules are complex enough, the Chinese speaker on the outside believes that she is interacting with someone who understands Chinese Does the man in the room understand Chinese? Do our brains understand English or are they just manipulating symbols?
12
Evil AI So, what about the evil AI we see in movies?
Will Skynet take over the world? Computers are stupid They follow our instructions blindly (though quickly) Maybe some of the brain simulation research will lead to a machine with human intelligence At the moment, we are very far away Some people like Ray Kurzweil think that change will happen fast If computers become intelligent enough to write programs, who knows what could happen? I'm not worried
13
Siri The most impressive feature of Siri is her voice recognition
Some is done on the device, some is done in the cloud After that, some statistical work is done to decide what your command or question means And how good is it? For a limited set of commands that relate directly to iPhone functions (playing songs, calling contacts), it's great Apple engineers put in some clever answers to a few set questions Otherwise, it gets disappointing fast
14
Review of while loops The while loop runs as long as a condition is true In this case, when countdown becomes 0, the loop stops (since 0 is not less than 0) Note that while loops use the same relational operators as if statements countdown = 10 while countdown > 0: print(countdown) countdown = countdown – 1 print("Blast-off!")
15
Review of for loops If you want to do something, say, 10 times in Python, you can use a for loop But you need to call the range() method to generate a list of numbers for you In this case, the loop will run 10 times, and the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 will print out for i in range(10): print(i)
16
Review of Python if statements
In Python, the primary way to make a choice is with an if statement Whatever code is under the if and tabbed in will only be executed if the condition is true Optionally, an else section can be added if you want to do something if the condition is false Conditions often use the following relational operators to make a comparison: ==, !=, <, <=, >, >= if phrase == "open sesame": print("Welcome, Ali Baba!") else: print("Access denied!")
17
Multiple conditions The if and else constructs allow us to choose between two possibilities What if we wanted more? We can extend these constructs with elif to handle additional conditions
18
elif elif is short for "else if"
It's used when the prior condition wasn't true and we want to check another condition if number == 1: print("First") elif number == 2: print("Second") elif number == 3: print("Third") else: print(number + "th")
19
Use of elif The elif construct if used if you want a bunch of mutually exclusive outcomes Only one of the choices is possible It is very common to end a sequence of if, elif, elif, elif, … statements with an else, whose code will be executed if none of the previous cases was true However, the else is not used if there's nothing to be done when no case matches
20
Lab 5
21
Upcoming
22
Next time… Graph theory
23
Reminders Start working on Project 2 Read Python Chapter 5
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.