\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{kirawen} \pdfinfo{ /Title (eecs492mid.pdf) /Creator (Cheatography) /Author (kirawen) /Subject (EECS492Mid Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{EECS492Mid Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{kirawen} via \textcolor{DarkBackground}{\uline{cheatography.com/26297/cs/7319/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}kirawen \\ \uline{cheatography.com/kirawen} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 25th February, 2016.\\ Updated 12th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Definition of AI}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Acting humanly}}: The Turing Test approach \newline % Row Count 1 (+ 1) {\bf{Thinking humanly}}: The cognitive modeling approach \newline % Row Count 3 (+ 2) {\bf{Thinking rationally}}: The "laws of thought" approach(Logic) \newline % Row Count 5 (+ 2) {\bf{Acting rationally}}: The rational agent approach% Row Count 6 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Turing test}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{natural language processing}} to enable it to communicate successfully in English; \newline % Row Count 2 (+ 2) {\bf{knowledge representation}} to store what it knows or hears; \newline % Row Count 4 (+ 2) {\bf{automated reasoning}} to use the stored information to answer questions and to draw new conclusions; \newline % Row Count 7 (+ 3) {\bf{machine learning}} to adapt to new circumstances and to detect and extrapolate patterns. \newline % Row Count 9 (+ 2) {\emph{total Turing test}} \newline % Row Count 10 (+ 1) {\bf{computer vision}} to perceive objects; \newline % Row Count 11 (+ 1) {\bf{robotics}} to manipulate objects and move about.% Row Count 12 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Agents and Environments}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{An {\bf{agent}} is anything that can be viewed as perceiving its {\bf{environment}} through {\bf{sensors}} and acting upon that environment through {\bf{actuators}}. We use the term {\bf{percept}} to refer to the agent's perceptual inputs at any given instant. An agent's {\bf{percept sequence}} is the complete history of everything the agent has ever perceive.% Row Count 7 (+ 7) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{PEAS}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Performance measure, Environment, Actuators, Sensors% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Knowledge Base}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Conceptually, a set of sentences; \newline % Row Count 1 (+ 1) .Defined by TELL/ASK interface% Row Count 2 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Declarative Approach}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Program an agent by TELLing it things \newline % Row Count 1 (+ 1) Equivalently, construct and install a KB \newline % Row Count 2 (+ 1) Advantages \newline % Row Count 3 (+ 1) 1.Flexibility: knowledge independent of how it would be used \newline % Row Count 5 (+ 2) 2.Transparency to humans \newline % Row Count 6 (+ 1) 3.Agent behavior malleable via language% Row Count 7 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Knowledge Representation}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Knowledge representation language}}: notation for expressing a KB \newline % Row Count 2 (+ 2) {\bf{Consist of}} \newline % Row Count 3 (+ 1) Syntax: defines the legal sentences \newline % Row Count 4 (+ 1) Semantics: facts in the world to which sentences correspond, an interpretation for symbols in the logic \newline % Row Count 7 (+ 3) {\bf{Logic}}: KR language with well-defined syntax and semantics \newline % Row Count 9 (+ 2) {\bf{Model}}: Specifies truth or falsity of sentences% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Properties of Sentences}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Valid}}: True in all models \newline % Row Count 1 (+ 1) {\bf{Satisfiable}}: True in some model% Row Count 2 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Rational agent}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has.% Row Count 5 (+ 5) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Autonomy}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{A system is autonomous that its behavior is determined by its own percepts, rather than the prior knowledge of its designer.% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Coherence}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Actions must be consistent with beliefs and desires. Necessary for knowledge-level understanding of computer programs.% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Agent Designs}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Table Lookup, Simple Reflex, Model-based, Goal-based, Utility-based, Learning% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Environment Properties}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{fully/partially observable, single/multi, deterministic/stochastic, episodic/sequential, static/dynamic, discrete/continuous, known/unknown% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Admissibility and Consistency}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Admissibility}}: h(n) ≤ c(n), where c(n) is the true cost of a solution along the current path through n. \newline % Row Count 3 (+ 3) {\bf{Consistency}}: h(n) ≤ c(n,a,n')+h(n'). \newline % Row Count 4 (+ 1) {\bf{Optimality}}: If h is admissible and consistent, A* is optimal. \newline % Row Count 6 (+ 2) A* is optimal, complete and optimally efficient among all algorithms that extend search paths from root.% Row Count 9 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Entailment and Inference}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Entailment}}: α |= β if and only if M(α) ⊆ M(β). Truth of β is contained in α. α |= β if and only if the sentence (α ⇒ β) is valid. α ≡ β if and only if α |= β and β |= α. \newline % Row Count 4 (+ 4) {\bf{Inference}}: α |- β means β can be derived from α. \newline % Row Count 6 (+ 2) An inference algorithm that derives only entailed sentences is called {\bf{sound}}. \newline % Row Count 8 (+ 2) An inference algorithm is {\bf{complete}} if it can derive any sentence that is entailed% Row Count 10 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{FOL to CNF}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{1.Translate bidirectionals to implications \newline % Row Count 1 (+ 1) 2.Translate implications to disjunctions \newline % Row Count 2 (+ 1) 3.Move negations inward (Use De Morgan's laws until only atoms are negated) \newline % Row Count 4 (+ 2) 4.Standardize variables \newline % Row Count 5 (+ 1) 5.Eliminate existentials via skolemization \newline % Row Count 6 (+ 1) 6.Drop universal quantifiers \newline % Row Count 7 (+ 1) 7.Distribute and associate into CNF% Row Count 8 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Uninformed search strategies}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Breadth-first, Uniform-cost, Depth-first, Depth-limited, Iterative-deepening, Bidirectional, Graph search% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.09848 cm} x{1.09848 cm} x{2.38004 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Analysis}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Criterion} & BFS & UC \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Complete & Yes & Yes \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Optimal & Yes & Yes \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Time & O(b\textasciicircum{}d+1\textasciicircum{}) & O(b\textasciicircum{}1+floor(C*/e)\textasciicircum{}) \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Space & O(b\textasciicircum{}d+1\textasciicircum{}) & O(b\textasciicircum{}1+floor(C*/e)\textasciicircum{}) \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29487 cm} x{0.96071 cm} x{0.96071 cm} x{0.96071 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Analysis}} \tn % Row 0 \SetRowColor{LightBackground} Criterion & DFS & DLDFS & IDDFS \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Complete & No & No & Yes \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Optimal & No & No & Yes \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Time & O(b\textasciicircum{}m\textasciicircum{}) & O(b\textasciicircum{}L\textasciicircum{}) & O(b\textasciicircum{}d\textasciicircum{}) \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Space & O(bm) & O(bL) & O(bd) \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Informed Search}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Priority-first(PFS), Greedy, A*, Iterative-deepening A*, heuristics and \seqsplit{admissibility/consistency}% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Flavors of PFS}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Number of edges from origin: BFS \newline % Row Count 1 (+ 1) g(n), the path cost from the initial state(node) to node n: UCS(Dijkstra) \newline % Row Count 3 (+ 2) h(n), the estimated path cost from node n to goal: Greedy Search \newline % Row Count 5 (+ 2) f(n)=g(n)+h(n), the estimated cost of a path passing through n: A* search% Row Count 7 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Memory-bounded heuristic search}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{iterative-deepening A*}} (IDA*) \newline % Row Count 1 (+ 1) {\bf{Recursive best-first search}} (RBFS): best first search with linear space% Row Count 3 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Local search strategies}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Hill-climbing/stochastic, beam, simulated annealing, genetic algorithms% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Local search summary}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Key advantages}} \newline % Row Count 1 (+ 1) 1.Very little memory \newline % Row Count 2 (+ 1) 2.Can often find reasonable solutions in large or infinite state spaces where systematic approaches are unsuitable \newline % Row Count 5 (+ 3) 3.Better answers the more time spent \newline % Row Count 6 (+ 1) {\bf{Disadvantages}} \newline % Row Count 7 (+ 1) Usually incomplete and not optimal% Row Count 8 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Constraint propagation}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Definition}}: Propagating the implications of a constraint on one variable onto other variables. \newline % Row Count 2 (+ 2) {\bf{k-consistent}}: for any consistent assignment of k-1 variables, exists consistent value of any kth(Node/Arc/Path) \newline % Row Count 5 (+ 3) {\bf{Strongly k-consistent}}: j-consistent for all j less than or equal to k% Row Count 7 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Constrain Satisfaction Search}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Backtracking}} \newline % Row Count 1 (+ 1) Minimum remaining values heuristic: choose variable with fewest legal values remaining \newline % Row Count 3 (+ 2) Degree heuristic: choose variable with largest number of constraints \newline % Row Count 5 (+ 2) {\bf{Forward checking}}: delete inconsistent values ahead \newline % Row Count 7 (+ 2) {\bf{Backjumping}} \newline % Row Count 8 (+ 1) Basic: backtrack to most recent decision \newline % Row Count 9 (+ 1) Conflict-Directed: backtrack to most recent variable in conflict with% Row Count 11 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}