REVIEW SHEET. CIS 140. Winter 2007. Robert Levinson OBJECTIVES ----------------- Course Objectives: 1. Learn Fundamentals of Classical AI. 2. Prepare for doing Research. a. Hot topics/Perspectives. Critical Analysis. b. Instructor's Research reinforcement learning ii.a. c. Critical/analytical approach as opposed to "Show-and-Tell". 3. Relationship of Mathematics, Information Theory to AI issues. 4. Hands-on experience through Programming Project: 5. "Stock Market". Prisoner's Dilemma. TOPICS ----------------- AI vs. Cognitive Science. Agents: Search and Planning: SINGLE-AGENT SEARCH ALGORITHMS: 3 types: a. UNINFORMED Breadth first search No commit Depth first search High Commit BFS vs. DFS vs. DFID Iterative deepening [bi-directional] b. (mildly) INFORMED an heuristic function h that estimates distance to the goal is defined. Best-first search f = h A* f=g^ + h A*-Admissible h<=h*i: guarantees find optimal A*-Monotone Restriction. h=0 at goal, |h(i)-h(j)| <=1 allows algorithm to be streamlined. Theorems and proofs [IDA* - much more efficient] c. [ PLANNING] /* not covered *? (agent is given rules of problem domain) [ Means-Ends-Analysis Macros Subgoals Abstract States MacroTables vs. PWs ] Machine Learning: Decision Tree finding smallest is NP-hard.] Emas Reinforcement Learning [Temporal Difference Learning] Dynamic Learning rate NNC, K-NNC NNC Version Spaces Perceptrons Perceptron Learning Theorem (one simple layer can't do XOR). (add non-linear terms for more power!) Gradient Descent [ Linear Regression ---> Logistic Regression ----> Kernel Regression ---> Support Vector Machines] Decision Trees How to generate, compress, measure cost Statistics [ briefly mentioned: Panel of Experts Genetic Algorithms Genetic Programming ] Representation: [ Hypergraphs ] Propositional Logic Predicate Logic Existential Graphs SAT matrices Truth Tables Game Tree Searching ------------------- Minimax Minimax Alpha-Beta major problem with minimax: (is just worst case guarantee) strategic How computers play chess. 4 stage search, quiescence [[ singular extension ] Strengths and weaknesses. [Aspiration window] [ Killer Heuristic ] [History Heuristic] [Null-Move Transposition Table, Piece Square Table. ]] [ GO vs. chess.] [ Hypergraph TTT ] Simultaneous Play Payoff Matrices dominant strategies or else stochastic (nash) equilbrium Inference: Resolution (prove by contradiction) Unification Skolemization Clausification EGs: Deiteration (deletion), Double Neg Removal, [Bob's Rule.] Existential Graphs Retrieval: [K-D-Tries for Nearest Neighbor] Lisp sort function DEFINITIONS ----------------- Knowledge is Information Processed for further use. Informal Defintion of Intelligence #1: Optimal problem-solving in pursuit of goals under resource constraints. (making cost-effective descisions) Informal Defintion of Intelligence #2: Exploitation, creation of order (redundancy=mutual information). summary: Wise Autonomous Decision Making! Subsumes: A subsumes B iff B is true whenever A is true. synonymous with implies State Space Search Problem: (Initial State, Operators, and Goals). Operator = preconditions, adds and deletes. Meta = One system or degree of freedom above or beyond Meta-Reasoning = Reasoning about Reasoning Abstraction = Hide irrelevant details. Generalization = Hide hopefully irrelevant details. NP-hard (completeness). Input must be unbounded in size. "Commit": Prune a potential solution path - burn a bridge. Mathematical Objects: Set Intensional Def. Extensional Def. [ Recursively Enumerable [ Recursive [ Tuple Relation Binary Reflexive Anti-reflexive Areflexive... Symmetric etc. Transitive etc. Equivalence Relation: R,S,T Partial Order: R,AntiS,T Ex: Subsumption Easier-Than Total Order ] ] [ Hypergraphs = set + subsets of the set ]. [Nested Directed Hypergraphs] ] Isomorphic = same after mathematical abstratcion. [ 5 measures of information: ,amt. of raw materials,cost, utility, surprise reduction, gain ratio. ] Quantity of Information in Event E of Prob. P: H(E)=I(E)=-log2(P) Knowing value of a variable of N values is: -summation(Pilog2(Pi)) i=1,..n [ Mutual Information = Symmetry between U and X: I(U:X) = H(U) - H(U|X). ] Complexity = Amount of Information required to compute the value of a variable or predicate. [ Gain Ratio = Utility Aft - Utility Bef ------------------------- Complexity(Cost) ] [ Variable P fully determines variable Q iff I(Q:P)=I(Q). ] Note: "Fully determines" subsumes "subsumes". Credibilty of an agent = inverse of its error. Universal Greedy Algorithm (minimize entropy on each step). CONCEPTUAL TOOLS/FRAMEWORKS [ World as Predicates + Actions with grounding in sense predicates. ] Agent-Environment relationship [ Partial Order of Predicates by Subsumption(POPS) ] [* Partial Order of State Spaces by Easier-Than] NNC tables vs. Decision Trees. rote vs. compress and generalize 4 main approaches to computer chess/ AI: Brute force vs. Human Oriented (schematic approach) vs. Mathematical Abstraction vs. Statistics (Morph) ------------------ APPLICATIONS ----------------- Nim: There is an optimal rule Chess: [ Rules 3 stages 2 main strategies tactics vs. positional Values of Pieces Simple Mates King opposition Hypermodern School gambit main principles. ] Computer Chess Deep Blue versus Kasparov Shannon A (full depth search)_, Shannon B(selective search) [Quiescence: wait until positions are quiet before evaluating MORPH - experience-based learner. 8 puzzle (CSP) nxn puzzles are NP hard Determining solvability [ Using macro table ] Manhattan Distance [Wheel Problem PathMax] SAT NP hard [ Towers of Hanoi] Missionaries and Cannibals Tic-Tac-Toe Eight Puzzle only half the states solvable (cycle algorithm) nxn is NP-complete Manhattan Distance is admissible and monotone heuristic No simple optimal rule even known for 3x3. Stock Market, PD , - exploit other agents patterns/success. Stock Market Rule 1. If doesn't work , do opposite! Rule 2. Don't follow Rule 1 Technical Analysis = black box analysis of price behavior Fundamental Analysis = model of economy and stock prices. LISP ------- Recursion Core functions: first, rest, cons, if, null, setf, quote,eval. some functions to practice on: parencount mymapcar reverse append snoc mid flatten length sortedp merge myor. Functions as parameters. reading and writing files: PRINCIPLES ----------------- Everything is relative: Information, Complexity, Similarity, and Utility are all domain-dependent. symmetry=mutual information=structure=relationships=relatedness =correlation=goodstufftofind. Maximize agent uncertainty - Minimize environment uncertainty: Tension: Uncertainty/Combinatorial Explosion vs. Commitment Tension: Knowledge vs. Search (each can replace the other). Search is used as a last resort. Maximize Entropy (don't make an unnecessary commitment): Occam'z Razor. Prefer simplest (least complex) explanation. [*Distance Heuristic for Chess: minimize short safe path distance to opponents pieces etc.] *** Efficiency is gained by exploiting mutual information = symmetry =structure. Fundamental Problem of Learning: Extensional Def. ---> Intensional Def. Fundamental Problem of Search: Binary Relation ---> Path Distance Function Parity is often useful predicate (e.g. Nim, 8puzzle, mutilated checkerboard ) Total Information = Diversity + Symmetry. Law 1: Amount of information constant in a closed system. Law 2: Symmetry never decreases in a closed system. [Law 3: Trade off between risk and reward.] [Information/Energy Chart.]