Aside on AI

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

Aside on AI. Will computers ever be intelligent? Really intelligent? Tasks that previously were thought to require intelligence: adding and subtracting playing chess driving a car recognizing speech or handwriting translating to a foreign language proving mathematical theorems - PowerPoint PPT Presentation

Text of Aside on AI

PowerPoint Presentation

Aside on AIWill 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?Search in Artificial IntelligenceRepresent 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 isnt a cannibal majority on either side.Goal: get to the other side?Moves?(331)(220)(321)(210)(221)(020)(031)(010)(021)(000)Neural NetsModel behavior of neuronsEach neuron has many InputsOutput 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 problematicGenetic 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 problemsStatistical machine learningGather much dataFind patternsSymbolic 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 goal

Googles knowledge graphComputer ChessHow would you program a computer to play chess?

Brute force or intelligence? The slow rise of computer chess

Game PlayingWe could use DFS butcant search whole tree!limit depth of search and use an evaluation functionWe could use DFS buthow 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 humans turn, pick the move that looks best for human. Where computers turn, pick the move that looks best for the computer

DFS/BFS Resource RequirementsDFS: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)Space required?O(breadth of tree) = O(bd), b=branching factorCan I cut off a search after 3 seconds?Staged DFS: do a DFS of depth 1, 2, 3, until out of timeRuntime?O(n)Space required? O(d)MankalahAn 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 players 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 opponents 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?Mankalah minimaxResult 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 MAX bestVal = -infinity for (move=first; movebestVal) //remember if best bestVal=val; bestMove=move else // similarly for BOTTOMs move

return new Result(bestMove,bestVal);Parallelizing minimax?Algorithm- or data-parallelism?C# 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?14Other 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)Heuristic Search TechniquesWhat do you do when the search space is very large or infinite?

Well study three more AI search algorithms:Backtracking searchGreedy search (Best-first)A*16Example: the 8-puzzleHow would you use AI techniques to solve the 8-puzzle problem?

Symbolic AI solutionStart state: 5 4 0 6 1 8 7 3 2 (e.g.)Goal state: 1 2 3 8 0 4 7 6 5Edges: sliding a tile. From start state:5 4 8 6 1 0 7 3 25 0 4 6 1 8 7 3 2

What search algorithm should I use?18Start with building railroad links between cities exampleTry to solve it, using various data structuresBacktracking searchStart at the start stateSearch in any directionBacktrack when stuckThis is really the same asUsed very frequentlyE.g. Perl regular expression matchingE.g. finding a traveling salesmans circuitE.g. graph coloringDepth-first searchIs there any way I can be smarter than a blind search?1909-08-04How to get from Arad to Bucharest?How to get from Isai to Fagaras?

Greedy 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 doesnt always find the shortest pathSusceptible to false startsMay go down an infinite path with no way to reach goalHow to ensure youll find the best solution?

A*Can we apply the ideas of Dijkstras 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?Optimality 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 computerHeuristics for the 8-puzzleWhat would a good, admissible heuristic be for the 8-puzzle?h1: number of tiles out of placeh2: total distance of squares from destinations

Results 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?Search CostEffective Branching FactorIDSA*(h1)A*(h2)IDSA*(h1)A*(h2)210662.451.791.79411213122.871.481.45668020182.731.341.308638439252.801.331.24104712793392.791.381.2212364404227732.781.421.241434739415391132.831.441.231613012111.451.251830563631.461.262072766761.471.27221809412191.481.28243913516411.481.26AI and PersonhoodAI proponents: 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

What 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? What are these views called?all the world (including the brain and mind) operate according to physical lawsMaterialism [or metaphysical materialism]There is a part of the mind (or soul or spirit) that is outside of nature, exempt from physical lawsDualism [or Cartesian dualism]The mind is the program running on the wet-ware of the brainFunctionalism [or non-reductive materialism]Non-Reductive MaterialismCharacteristicsthere is no non-physical part of a person mental 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?Cartesian DualismCharacteristicsThe 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 messyWhere 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 brainWhat does this do to the science of AI?