1 / 56

Artificial Intelligence and Computing Science

Artificial Intelligence and Computing Science. OCTOBER 10, 2014. Two Kinds of Reasoning:. Algorithmic and Heuristic. Muhammad ibn Musa al-Khwarizmi Persian mathematician, 780-850 Scholar at the House of Wisdom, Baghdad. Invented (and gave his name to) algebra and the algorithm.

astra
Download Presentation

Artificial Intelligence and Computing Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Artificial Intelligenceand Computing Science OCTOBER 10, 2014

  2. Two Kinds of Reasoning: Algorithmic and Heuristic

  3. Muhammad ibn Musa al-Khwarizmi Persian mathematician, 780-850 Scholar at the House of Wisdom, Baghdad Invented (and gave his name to) algebra and the algorithm

  4. ``What must be the square, which, when increased by ten of its own roots, amounts to thirty nine?’’ x2 + 10x = 39 ``You halve the number of the roots, which in the present instance yields five. This you multiply by itself; the product is twenty-five. Add this to thirty-nine; the sum is sixty four. Now take the root of this, which is eight and subtract from it half the number of the roots, which is five; the remainder is three. This is the root of the square which you sought for; the square itself is nine.’’ x=√(10/2)2+39-10/2 = √64-5 = 3

  5. Characteristics of Algorithmic Reasoning: If you don’t make a mistake, you’re guaranteed to get an answer… But there’s no guarantee of how quickly…

  6. Consider, for example, the Travelling Salesman problem: Visit n cities, once each Finish where you started

  7. One algorithm you might use: • Generate all possible routes (n!) • MaxCost = $bignum • For i = 1 to n! • Is cost(i) < MaxCost? • If yes: • MaxCost = cost(i); • BestRoute = i; • Next i

  8. This works OK for small n, but not so well for n = 49, say… because the number of steps is then greater than the number of atoms in the universe

  9. n! grows faster than Anmwhatever values you choose for A and m So the class of problems that can be solved in Anm is a relatively nice class, called `P’.

  10. Suppose we learn the answer to a problem by consulting an oracle… It may be possible to verify the solution in polynomial time, even if we can’t find it in polynomial time. For example, Does any subset of the numbers {a1, a2, a3, …, an} add up to 0? Given a candidate set {a2=1, a5=2, a27 = 4, a1952 = -5}, we can easily verify that this is a solution. Problems like this are in the set `NP’

  11. Is P = NP? No-one knows. But if any NP problem is P, then all NP problems are P

  12. Heuristic Reasoning No `recipe’ for solving the problem:

  13. Cannibals and Missionaries C C C M M M

  14. A.I.’s Goal: To make machines that think like us. 1: Formalise the way we think 2: Whatever can be formalised can be mechanised.

  15. To formalise a method is to reduce it to a chain of steps that even a stupid person could follow. Therefore, to know that we’ve formalised an argument correctly, we need an ideally stupid person.

  16. Aristotle, 384-322 BC Developed a set of formal procedures -- the syllogism -- to capture the essence of rational thought: All cats are mammals Some cats have no tails Some mammals have no tails

  17. However, the syllogism fails to capture some common modes of reasoning. For example: ``A horse is an animal, Therefore, the head of a horse is the head of an animal’’ is a valid argument which can’t readily be represented as a syllogism.

  18. The Characteristica Universalis of Leibniz "It is obvious that if we could find characters or signs suited for expressing all our thoughts as clearly and as exactly as arithmetic expresses numbers or geometry expresses lines, we could do in all matters insofar as they are subject to reasoning all that we can do in arithmetic and geometry. For all investigations which depend on reasoning would be carried out by transposing these characters and by a species of calculus." (Preface to the General Science, 1677.)

  19. Leibniz’s Stepped Reckoner

  20. 1834: Charles Babbage invents the Analytical Engine, programmed with punched cards

  21. 1842: Ada Lovelace writes the first computer program. (To calculate the Bernoulli numbers)

  22. 1854: George Boole publishes ``An Investigation of The Laws of Thought’’ Shannon will later show how Boole’s logic can be implemented using digital circuitry.

  23. Boole’s idea Any proposition attributing a predicate to a subject can be re-phrased as a statement about membership in a class. For example, ``Kant is boring’’ can be expressed as: ``Kant is a member of the class of boring things”

  24. Denote the property of membership in a particular class by a symbol, x, for example. Membership in two classes can then be expressed as the product of their respective symbols: Let x denote membership in the class of boring things And y, membership in the class of long-winded things. Then ``Kant is boring and long-winded’’ can be written as `xy’

  25. Repeating a symbol doesn’t accomplish anything: if we select the boring members of the class of boring things, we just get back the same class. This gives us the equation: x2=x (``Kant is boring and boring’’ just tells us Kant is boring) But the only values of x satisfying this are 0 and 1 So these are the only numbers used in Boolean logic

  26. So logical statements can be translated to arithmetic operations: A x B y A and B x × y The operation `×’ behaves like the word `and’ 1 0 0 0 T T F F 1 1 0 0 T F T F 1 0 1 0 T F F F

  27. Samuel Butler, Erewhon, 1871 ``…there is no a priori improbability in the descent of conscious (and more than conscious) machines from those which now exist,…’’ Erewhon’s `The Book of the Machines’

  28. ``The present machines are to the future as the early Saurians to man. The largest of them will probably greatly diminish in size. Some of the lowest vertebrates attained a much greater bulk than has descended to their more highly organised living representatives, and in like manner a diminution in the size of machines has often attended their development and progress.’’ Erewhon’s `The Book of the Machines’

  29. ``I fear… the extraordinary rapidity with which they are becoming something very different to what they are at present. No class of beings have in any time past made so rapid a movement forward. Should not that movement be jealously watched, and checked while we can still check it? And is it not necessary for this end to destroy the more advanced of the machines which are in use at present..?’’ Erewhon’s `The Book of the Machines’

  30. Gottlob Frege, 1879 Introduced the predicate calculus, also known as `second-order logic’ Showed that this more powerful logic could be used as a basis for mathematics. A formal language, or `concept script’ based on this logic could also be used to reason about the sciences and philosophy.

  31. Predicate calculus deals with parts of sentences E.g., ``…. is intelligent.’’ These can be combined with the symbols E `There exists’ A `For all’

  32. Thus we can define, for example, F(x) = ``x is intelligent.’’ And go on to write: (x):F(x) E `There exists an intelligent person’ (x):F(x) `Everyone is intelligent’ A

  33. Let F(x) = ``x is a moon of Mars’’ Then the formula: says: `Something (x) is a moon of Mars, and something else (y) is also a moon of Mars, and if anything else (z) is a moon of Mars, then either z is x or z is y’

  34. This allows us to say ``Mars has two moons’ without using any numerals explicitly. In the same way, Frege proposes to reduce all of mathematics to logic. Then we are guaranteed that mathematics is consistent as long as logic is consistent.

  35. Can a Computer Think?

  36. Can a Submarine Swim?

  37. The Turing Machine A complete abstract description of the perfectly stupid slave

  38. The ELIZA Effect Joseph Weizenbaum, MIT, 1966 Patient: ``I went for a long boat ride’’ Therapist: ``Tell me about boats.’’

  39. AI in the 40’s, 50’s and 60’s: Arthur Samuel, Checker-playing program, 1947-1967 Games and Puzzles 2. C.E. Shannon, `Programming a Computer For Playing Chess’, Philosophy Magazine, Vol. 41, pp. 256-275 (1960)

  40. How does a computer play chess (or checkers?) Create a tree: Current position My next move P-K4 P-Q4 P-K3 Position before Kasparov’s next move Kasparov’s next move

  41. Position before my next move My next move Position before Kasparov’s next move . . . . . . . . . Kasparov’s next move Position after Kasparov’s final move I WIN I LOSE I WIN (This can all be done by deduction)

  42. Now move back up the tree, using the minimax strategy: ``Assuming that Kasparov will choose the move to his maximum advantage, I should choose the move that minimizes my disadvantage:’’ Position after my penultimate move I WIN I LOSE I WIN I WIN I WIN I LOSE I WIN Position after Kasparov’s final move

  43. Position after Kasparov’s penultimate move (assume he will chose red node) I WIN I LOSE My penultimate move Position after my penultimate move I WIN I LOSE Kasparov’s final move I WIN I WIN I WIN I LOSE I WIN Position after Kasparov’s final move

More Related