Presentation on theme: "Aside on AI Will computers ever be intelligent? Really intelligent?"— Presentation transcript:
1Aside on AI Will computers ever be intelligent? Really intelligent? Tasks that previously were thought to require intelligence:adding and subtractingplaying chessdriving a carrecognizing speech or handwritingtranslating to a foreign languageproving mathematical theoremsWhat does it mean to say that a computer is intelligent?Is that the same as being a person? What is a person?Is a computer program a person?Is a person a computer program?
2Achieving “Intelligence” How do AI program achieve “intelligent” behavior?Currently, four main paradigms:Neural NetsGenetic AlgorithmsSymbolic knowledge representation and searchStatistical machine learning
3Neural Nets Model behavior of neurons Each neuron has many Inputs Output is weighted sum of inputsTraining: adjusting the weights to improve behaviorLearning: networks improve performance with timeFeedback: large networks with feedback have very complicated behavior (pondering? dreams?)Success: many (small) problems are handled well; bigger problems are problematic
4Genetic AlgorithmsMany similar simulated organisms, each with its own program governing behaviorThe organisms are run for a time, and their behavior is measured for fitnessThe more successful organisms are more likely to cross (reproduce)Random mutations can also be introduced in the programsEach generation tends to have more successful behavior than the last, on averageResults: good for some optimization problems
5Statistical machine learning Gather much dataFind patterns
6Symbolic AIRepresent a problem as a collection of logic (symbolic) statementsCharacterize the initial condition symbolicallyCharacterize goal state symbolicallyCharacterize actions that are possible in the world as productions or changes to the initial conditionSearch through possible actions to find a path to the goalGoogle’s knowledge graph
7Search in Artificial Intelligence Represent your problem as a graph where nodes are states and edges are operators that go between statesDefine problem states (nodes)Identify start and goal statesDefine operators (edges)Use DFS or BFS to find goalExample: Missionaries and cannibals problemstates: (3,3,1) 3 missionaries, 3 cannibals, and 1 boat on left side of river.Operators: one or two people cross the river in the boat, so that there isn’t a cannibal majority on either side.Goal: get to the other side?Moves?(331)–(220)–(321)–(210)–(221)–(020)–(031)–(010)–(021)–(000)
8Computer Chess How would you program a computer to play chess? Brute force or intelligence? The slow rise of computer chess
9Game Playing We could use DFS but…can’t search whole tree! limit depth of search and use an evaluation functionWe could use DFS but…how do we know which move the opponent will choose?minimax algorithm: assume the opponent does what looks best.i.e. at nodes where it is the human’s turn, pick the move that looks best for human. Where computer’s turn, pick the move that looks best for the computer
10DFS/BFS Resource Requirements Runtime?O(n), n=number of nodes expandedSpace required?O(d), d = depth of searchCan I cut off a search after 3 seconds?BFS:Runtime? O(n)O(breadth of tree) = O(bd), b=branching factorStaged DFS: do a DFS of depth 1, 2, 3, … until out of timeO(n)Space required? O(d)
11MankalahAn ancient gamed called Kalah or Mankalah uses stones and pits: 6 to a side and one on each end.4 stones are initially placed in each side pit. None are in the end pits (called Kalahs – a player’s kalah is on her right).A move consists of picking up the stones in a pit and distributing them, one at a time, in successive pits.If the last stone is placed in your Kalah, you go againIf the last stone is placed in an empty pit on your side, you capture the stones in that pit and the opposite one, on the opponent’s side of the board. These are put into your Kalah.The game ends when one player has no stones left; the other player puts all the remaining stones on her side into her Kalah.Whoever ends with more stones in her Kalah wins. Can you make your Kalah program smarter than Bonzo?
12Mankalah minimax Result minimaxVal(Board b, int d) // d is depth if (b.GameOver() or d==0)return new Result(0, evaluate(b))if (b.whoseMove()==Board.TOP) //TOP is MAXbestVal = -infinityfor (move=first; move<=last; move++)if (b.legalMove(move) [and time not expired])Board b1 = new Board(b) //duplicate boardb1.makeMove(move) //make the moveval=minimaxVal(b1,d-1) //find its valueif (val>bestVal) //remember if bestbestVal=val; bestMove=moveelse // similarly for BOTTOM’s movereturn new Result(bestMove,bestVal);
13Parallelizing minimax? Algorithm- or data-parallelism?
14C# Task Parallel Library (TPL) How many cores should you be able to support?4? 16? Hundreds?You could probably get much, much better performance using your graphics card – 100x?
15Other ideas for improving play? Better evaluation functionOptimize program speedLearning for feature-weight tuningOpening or closing bookAlpha-beta pruning with move reordering (potentially 33% deeper search)
16Heuristic Search Techniques What do you do when the search space is very large or infinite?We’ll study three more AI search algorithms:Backtracking searchGreedy search (Best-first)A*
17Example: the 8-puzzleHow would you use AI techniques to solve the 8-puzzle problem?
18Symbolic AI solution Start state: 5 4 0 6 1 8 7 3 2 (e.g.) Goal state:Edges: sliding a tile. From start state:What search algorithm should I use?Start with “building railroad links between cities” exampleTry to solve it, using various data structures
19Backtracking search Start at the start state Search in any direction Backtrack when stuckThis is really the same asUsed very frequentlyE.g. Perl regular expression matchingE.g. finding a traveling salesman’s circuitE.g. graph coloringDepth-first searchIs there any way I can be smarter than a blind search?
20How to get from Arad to Bucharest? How to get from Isai to Fagaras? How to get from Arad to Bucharest?How to get from Isai to Fagaras?
21Greedy Search (Best-first) Best-first search: like DFS, but pick the path that gets you closest to the goal firstNeed a measure of distance from the goalh(n) = estimated cost of cheapest path from n to goalh(n) is a heuristicAnalysisGreed tends to work quite well (despite being one of the seven deadly sins)But, it doesn’t always find the shortest pathSusceptible to false startsMay go down an infinite path with no way to reach goalHow to ensure you’ll find the best solution?
22A* Can we apply the ideas of Dijkstra’s algorithm? Pay attention to total path length, not just distance to the goalf(n) = g(n) + h(n)g(n) = distance traveled so farh(n) = estimated remaining distance (heuristic)A*: do a DFS-like search with lowest f(n) firstDoes this guarantee an optimal solution?
23Optimality of A*Suppose h(n) never overestimates (such heuristics are called admissible)Note that f(n) always increases as search progressesA* is complete and optimal (though often slower than best-first search)The first limitation you are likely to run into with A* search: not enough RAM in your computer…
24Heuristics for the 8-puzzle What would a good, admissible heuristic be for the 8-puzzle?h1: number of tiles out of placeh2: total distance of squares from destinations
25Results of A*Consider solving the 8-puzzle by search, using the following algorithmsDFSBFSIDS (iterative deepening search): like staged DFS.A* with heuristic h1A* with heuristic h2Will each be able to find the shortest solution?Which one will find it most quickly?Which ones will use lots of memory?
27AI and Personhood AI proponents: Hidden assumptions: a machine as complex as a brain would be as intelligent as a personmaybe it would be a person.Hidden assumptions:intelligence: I/O, storage, and processing capabilitiesthe brain: a machine whose function can be duplicated by other machines (and function is what matters)a person: an intelligent hunk of meat
28What makes a person?Is there anything to being a person besides “intelligence”?Consciousness: is it an ‘epiphenomenon’ – or can it affect the body?Will: do we make real choices, or are they determined by the laws of physics?Affections: is there a ‘love’ algorithm?Spirit: is there a human capability to know God beyond the five sense?Moral responsibility: what are you doing when you kick your computer – punishment?
29What are these views called? “all the world (including the brain and mind) operate according to physical laws”Materialism [or metaphysical materialism]“There is a part of the mind (or soul or spirit) that is outside of nature, exempt from physical laws”Dualism [or Cartesian dualism]“The mind is the program running on the ‘wet-ware’ of the brain”Functionalism [or non-reductive materialism]
30Non-Reductive Materialism Characteristicsthere is no non-physical part of a personmental processes can be localized in the brainconsciousness, will, etc. are real, but they are an ‘emergent property’ of brain functionQuestionsHow could there be a real will or moral responsibility?Where is the intensionality or meaning?What then can a verse like Matt. 10:28 mean? [Do not be afraid of those who kill the body but cannot kill the soul.]What about the existence of angels, God if there is no second substance?What of church history and doctrine?
31Cartesian Dualism Characteristics Questions The soul is a second substance, created by God, like the AngelsThe mind is a faculty of the soul, and it can affect the bodyWhatever the brain does, it is not the mindQuestionsA second substance is messy…Where does this soul come from? How does it affect the body without breaking the laws of nature?It seems that current research is localizing more and more mental processes in the brain…What does this do to the science of AI?