1 / 66

CS347 – Introduction to Artificial Intelligence

CS347 – Introduction to Artificial Intelligence. CS347 course website: http://web.mst.edu/~tauritzd/courses/cs347/. Dr. Daniel Tauritz (Dr. T) Department of Computer Science tauritzd@mst.edu http://web.mst.edu/~tauritzd/. What is AI?. Systems that… act like humans (Turing Test)

colby-james
Download Presentation

CS347 – Introduction to Artificial Intelligence

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. CS347 – Introduction toArtificial Intelligence CS347 course website: http://web.mst.edu/~tauritzd/courses/cs347/ Dr. Daniel Tauritz (Dr. T) Department of Computer Science tauritzd@mst.edu http://web.mst.edu/~tauritzd/

  2. What is AI? Systems that… • act like humans (Turing Test) • think like humans • think rationally • act rationally Play Ultimatum Game

  3. Key historical events for AI • 4th century BC Aristotle propositional logic • 1600’s Descartes mind-body connection • 1805 First programmable machine • Mid 1800’s Charles Babbage’s “difference engine” & “analytical engine” • Lady Lovelace’s Objection • 1847 George Boole propositional logic • 1879 Gottlob Frege predicate logic

  4. Key historical events for AI • 1931 Kurt Godel: Incompleteness Theorem In any language expressive enough to describe natural number properties, there are undecidable (incomputable) true statements • 1943 McCulloch & Pitts: Neural Computation • 1956 Term “AI” coined • 1976 Newell & Simon’s “Physical Symbol System Hypothesis” A physical symbol system has the necessary and sufficient means for general intelligent action.

  5. How difficult is it to achieve AI? • Three Sisters Puzzle

  6. Rational Agents • Environment • Sensors (percepts) • Actuators (actions) • Agent Function • Agent Program • Performance Measures

  7. Rational Behavior Depends on: • Agent’s performance measure • Agent’s prior knowledge • Possible percepts and actions • Agent’s percept sequence

  8. Rational Agent Definition “For each possible percept sequence, a rational agent selects an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and any prior knowledge the agent has.”

  9. Task Environments PEAS description & properties: • Fully/Partially Observable • Deterministic, Stochastic, Strategic • Episodic, Sequential • Static, Dynamic, Semi-dynamic • Discrete, Continuous • Single agent, Multiagent • Competitive, Cooperative

  10. Problem-solving agents A definition: Problem-solving agents are goal based agents that decide what to do based on an action sequence leading to a goal state.

  11. Problem-solving steps • Problem-formulation • Goal-formulation • Search • Execute solution

  12. Well-defined problems • Initial state • Successor function • Goal test • Path cost • Solution • Optimal solution

  13. Example problems • Vacuum world • Tic-tac-toe • 8-puzzle • 8-queens problem

  14. Search trees • Root corresponds with initial state • Vacuum state space vs. search tree • Search algorithms iterate through goal testing and expanding a state until goal found • Order of state expansion is critical! • Water jug example

  15. Search node datastructure • STATE • PARENT-NODE • ACTION • PATH-COST • DEPTH States are NOT search nodes!

  16. Fringe • Fringe = Set of leaf nodes • Implemented as a queue with ops: • MAKE-QUEUE(element,…) • EMPTY?(queue) • FIRST(queue) • REMOVE-FIRST(queue) • INSERT(element,queue) • INSERT-ALL(elements,queue)

  17. Problem-solving performance • Completeness • Optimality • Time complexity • Space complexity

  18. Complexity in AI • b – branching factor • d – depth of shallowest goal node • m – max path length in state space • Time complexity: # generated nodes • Space complexity: max # nodes stored • Search cost: time + space complexity • Total cost: search + path cost

  19. Tree Search • Breadth First Tree Search (BFTS) • Uniform Cost Tree Search (UCTS) • Depth-First Tree Search (DFTS) • Depth-Limited Tree Search (DLTS) • Iterative-Deepening Depth-First Tree Search (ID-DFTS)

  20. Graph Search • Breadth First Graph Search (BFGS) • Uniform Cost Graph Search (UCGS) • Depth-First Graph Search (DFGS) • Depth-Limited Graph Search (DLGS) • Iterative-Deepening Depth-First Graph Search (ID-DFGS)

  21. Example state space

  22. Diameter example 1

  23. Diameter example 2

  24. Best First Search (BeFS) • Select node to expand based on evaluation function f(n) • Typically node with lowest f(n) selected because f(n) correlated with path-cost • Represent fringe with priority queue sorted in ascending order of f-values

  25. Path-cost functions • g(n) = lowest path-cost from start node to node n • h(n) = estimated path-cost of cheapest path from node n to a goal node [with h(goal)=0]

  26. Important BeFS algorithms • UCS: f(n) = g(n) • GBeFS: f(n) = h(n) • A*S: f(n) = g(n)+h(n)

  27. Heuristics • h(n) is a heuristic function • Heuristics incorporate problem-specific knowledge • Heuristics need to be relatively efficient to compute

  28. GBeFS • Incomplete (so also not optimal) • Worst-case time and space complexity: O(bm) • Actual complexity depends on accuracy of h(n)

  29. A*S • f(n) = g(n) + h(n) • f(n): estimated cost of optimal solution through node n • if h(n) satisfies certain conditions, A*S is complete & optimal

  30. Admissible heuristics • h(n) admissible if: Example: straight line distance A*TS optimal if h(n) admissible

  31. Consistent heuristics • h(n) consistent if: Consistency implies admissibility A*GS optimal if h(n) consistent

  32. Example graph

  33. Local Search • Steepest-ascent hill-climbing • Stochastic hill-climbing • First-choice hill-climbing • Random-restart hill-climbing • Simulated Annealing • Deterministic local beam search • Stochastic local beam search • Evolutionary Algorithms

  34. Adversarial Search Environments characterized by: • Competitive multi-agent • Turn-taking Simplest type: Discrete, deterministic, two-player, zero-sum games of perfect information

  35. Search problem formulation • Initial state: board position & starting player • Successor function: returns list of (legal move, state) pairs • Terminal test: game over! • Utility function: associates player-dependent values with terminal states

  36. Minimax

  37. Depth-Limited Minimax • State Evaluation Heuristic estimates Minimax value of a node • Note that the Minimax value of a node is always calculated for the Max player, even when the Min player is at move in that node!

  38. Iterative-Deepening Minimax • IDM(n,d) calls DLM(n,1), DLM(n,2), …, DLM(n,d) • Advantages: • Solution availability when time is critical • Guiding information for deeper searches

  39. Redundant info example

  40. Alpha-Beta Pruning • α: worst value that Max will accept at this point of the search tree • β: worst value that Min will accept at this point of the search tree • Fail-low: encountered value <= α • Fail-high: encountered value >= β • Prune if fail-low for Min-player • Prune if fail-high for Max-player

  41. DLM w/ Alpha-Beta Pruning Time Complexity • Worst-case: O(bd) • Best-case: O(bd/2) [Knuth & Moore, 1975] • Average-case: O(b3d/4)

  42. Move Ordering Heuristics • Knowledge based • Killer Move: the last move at a given depth that caused an AB-pruning or had best minimax value • History Table

  43. Example game tree

  44. Example game tree

  45. Example game tree

  46. Search Depth Heuristics • Time based / State based • Horizon Effect: the phenomenon of deciding on a non-optimal principal variant because an ultimately unavoidable damaging move seems to be avoided by blocking it till passed the search depth • Singular Extensions / Quiescence Search

  47. Quiescence Search • When search depth reached, compute quiescence state evaluation heuristic • If state quiescent, then proceed as usual; otherwise increase search depth if quiescence search depth not yet reached • Call format: QSDLM(root,depth,QSdepth), QSABDLM(root,depth,QSdepth,α,β), etc.

  48. Time Per Move • Constant • Percentage of remaining time • State dependent • Hybrid

  49. Transposition Tables (1) • Hash table of previously calculated state evaluation heuristic values • Speedup is particularly huge for iterative deepening search algorithms! • Good for chess because often repeated states in same search

More Related