Zusammenfassung - KI1, Zusammenfassungen von Künstliche Intelligenz

Toggle sidebar
bg1
Zusammenfassung Künstliche Intelligenz 1
1. PEAS – Task environments
Name
Beschreibung
Performance Criterion
What is good? (e.g.: max amount dirt cleaned)
Environment
Roads, Rooms
Actuators
Jointed arm, Display (! Not actions!!)
Sensors
Light, Smell
2. Umgebungseigenschaften
Name
Beschreibung
Fully observable vs. Partially observable
Schach vs. Poker
Deterministic vs. Stochastic
Episodic vs. Sequential
Episodisch: hängt nicht von früheren ab
Static vs. Dynamic
Statisch: Zwischen Action ändert sich nichts
Discrete vs. Continuous
Schach vs. Lenken
Single agent vs. Multiagent
Staubsager vs. Schach (wobei vereinfachbar)
Known vs. Unknown
Unknown muss erst exploriert werden
Semistatic: Performanzmaß ändert sich: z.B. Leistung auf Zeit
3. Types of Agents
Name
Beschreibung
Simple Agent
What the world is like-> what action I should do
Model-Based agent
Simple Agent + what my actions do
Goal-Based agent
Model-Based agent + kann mehrere A voraussrechnen,
bewertet Ergebnis, nicht Handlung an sich
Utility-Based agent
Goal-Based agent + wiegt Ziele gegeneinander ab
Learning Agent
Agent -> Performance Element
+ Learning element -> changes PE, gets knowledge from PE
+Critic + Problem generator
4. Suchalgorithmen (suche Weg zum Ziel -> Wege-Suche, 8-Damen, Schiebe-Puzzle)
Name
Anmerkung
Laufzeit
Speicher
TreeSearch
Wenig Speicher aber
nicht Complete/optimal
--
--
GraphSearch
Wenig Redundanz/Zeit
--
--
BestFS
Suche bis alle Optionen
schlechter als akt. Lsg.
𝑏𝑑
𝑏𝑑
BreadthFS
Erstes Ziel ist bestes Ziel
𝑏𝑑
𝑏𝑑
DFS
Bricht bei erstem Ziel ab
𝑏𝑑
𝑏∗𝑑
Iterative DFS
Complete +optimal
𝑏𝑑
𝑏∗𝑑
Bidirektional
Speicher!
𝑏𝑑/2
𝑏𝑑/2
pf3
pf4
pf5

Unvollständige Textvorschau

Nur auf Docsity: Lade Zusammenfassung - KI1 und mehr Zusammenfassungen als PDF für Künstliche Intelligenz herunter!

Zusammenfassung Künstliche Intelligenz 1

  1. PEAS – Task environments Name Beschreibung Performance Criterion What is good? (e.g.: max amount dirt cleaned) Environment Roads, Rooms Actuators Jointed arm, Display (! Not actions!!) Sensors Light, Smell
  2. Umgebungseigenschaften Name Beschreibung Fully observable vs. Partially observable Schach vs. Poker Deterministic vs. Stochastic Episodic vs. Sequential Episodisch: hängt nicht von früheren ab Static vs. Dynamic Statisch: Zwischen Action ändert sich nichts Discrete vs. Continuous Schach vs. Lenken Single agent vs. Multiagent Staubsager vs. Schach (wobei vereinfachbar) Known vs. Unknown Unknown muss erst exploriert werden  Semistatic: Performanzmaß ändert sich: z.B. Leistung auf Zeit
  3. Types of Agents Name Beschreibung Simple Agent What the world is like-> what action I should do Model-Based agent Simple Agent + what my actions do Goal-Based agent Model-Based agent + kann mehrere A voraussrechnen, bewertet Ergebnis, nicht Handlung an sich Utility-Based agent Goal-Based agent + wiegt Ziele gegeneinander ab Learning Agent Agent - > Performance Element
  • Learning element - > changes PE, gets knowledge from PE +Critic + Problem generator
  1. Suchalgorithmen (suche Weg zum Ziel - > Wege-Suche, 8-Damen, Schiebe-Puzzle) Name Beschreibung Anmerkung Laufzeit Speicher TreeSearch Get N from Q, expand N, add to Q Wenig Speicher aber nicht Complete/optimal

GraphSearch Tree +add to Q only if not explored Wenig Redundanz/Zeit -- -- BestFS Graph + Priority-Q Suche bis alle Optionen schlechter als akt. Lsg.

𝑏𝑑^ 𝑏𝑑

BreadthFS Graph +FIFO-Q Erstes Ziel ist bestes Ziel 𝑏𝑑^ 𝑏𝑑 DFS Tree + LIFO-Q Bricht bei erstem Ziel ab 𝑏𝑑^ 𝑏 ∗ 𝑑 Iterative DFS DFS + iterative Tiefe (BFS) Complete +optimal 𝑏𝑑^ 𝑏 ∗ 𝑑 Bidirektional BFS + if expand(N1) in reached(N2) combine solution Speicher! 𝑏𝑑/^2 𝑏𝑑/^2

  1. Suchalgorithmen mit Heuristiken Name Beschreibung Anmerkung Greedy BFS BFS + h(n) Suche bis alle Optionen schlechter als akt. Lsg. A-Search BFS + f(n) = g(n) +h(n) Suche bis alle Optionen schlechter als akt. Lsg. Weighted A BFS + f(n) = g(n) + Wh(n) Solution: C - WC Beam Search Keep only k best nodes Not complete/optimal IDA* Increase f(n)-boundary Difficult to increase good RBFS Speichert in jedem expan. Knoten, den 2-besten akt. Knoten - > falls nur schlechtere Opt.: wechsle Effizienter als IDA* aber selbes Problem, kann permanent springen SMA* IDA* + store as many as possible nodes
  • full: forget worst node+store in predcessr Bester A Bidirektion A* f2(n) = max(2g(n) , g(n)+f(n) ) other f(n) possible

  1. Lokale Suche (nur das Ziel ist interessant) Name Varianten Beschreibung Hillclimbing Choose highest succesor First choice Generate succesors and choose 1st^ improvement Random restart Repeat with random initial states Simulated Annealing If successor better - > choose If successor worse - > choose with probability 𝑒−𝑑𝑒𝑙𝑡𝑎/𝑇 Local beam Choose k best succesors Evolution Choose, recombine, (repair), mutate
  2. Lokale Suche in Kontinuierlichen Räumen Name Beschreibung Diskretisieren Dann hillclimbing und Co. Local gradient search F(x) = x + 𝛼 ∗ ∇𝑓(𝑥) Size and direction of steepest slope in ∝ steps Lineare Programmierung Bei linearer Zielfkt/constraints
  3. Nichtdeterministische Suche/ Suche in partial observable/sensorless environments Name Bescheibung And-Or-Search DFS/BFS on And-Or-Graph (OR: ∎)
  • if cycle: repeat until dif outcome Conditional And-Or-Search OR-Search: AND-SEARCH for each action AND-SEARCH: OR-SEARCH for each state

  • Abbruch bei cycle Belief states Assumption: illegal actions have no effect:

  • union of all actions in every belief state

Constraint learning Remember No-Goods! Speicher! Bounds Propagation 2 flights with capacity [0,100] for 150 passengers - > [50,100]

  1. Lokale Constraint-Suche Name Beschreibung Min-Conflicts Hill climbing with Min-Conflicts as heuristic Constraint weighting In each step increment the weight of violated constraints to focus on hard constraints
  2. Tree CSPs (-> lösbar in linearer Zeit) Name Beschreibung Laufzeit Tree-CSP-Solver 1.Topological Sort (parent left, child right)
  3. Apply AC-3 in reverse order - > fail 3.Assign value to every node in normal order (compatible to parent node) - > fail

𝑂(𝑛𝑑^2 ),

da: max n arcs, und nur 1x für jeden Arc Cutset Conditioning Choose „cycle cutset “S, solve problem for each assignment of S

𝑂(𝑑𝑐^ ∗ (𝑛 − 𝑐) ∗ 𝑑^2

Mit c = |cutset| Tree Decomposition Three requirements:

  • Every var must appear in at least one tree node
  • If ex. constraint between 2 var, they must appear in same tree node
  • If var in 2 nodes in tree, it must appear in every node on path between 2 tree nodes  Solve 1stsubproblem, propagate constraints, solve next …

W = max |subproblem| Value Symmetry Symmetry-breaking-constraint (e.g.: ordering)  1/n!

  1. Logische Algorithmen für Entailment (was folgt aus KB)
  • sound: derives ∝ only if WB⊨ 𝛼, complete; derives all entailed sentences Name Beschreibung Anmerkung Model checking Enumerate +check all models 𝑂( 2 𝑛) Truth Table Enumeration return TT (∝, rest, {A = true}) | TT(…) 𝑂( 2 𝑛) Inference Add ¬∝ +apply rules to get □ DeMorgan… Resolution(spez. Inferenz) Add ¬∝ + CNF + apply Modus Ponens to get □ Forward chaining Check if premise is satisfied, if so add conclusion, stop at goal - >remember var, so it only fires 1x Input: Horn-Clauses Backward chaining Start with goal, check all rules with goal in conclusion, if premise is unknown operate with that as subgoal - >AND-OR-SEARCH OR: all rules with goal in conclusion

AND: all premises in rule Input: Horn-Clauses

  1. Logische Algorithmen für SAT-Probleme (was spießt sich nicht mit KB) Name Beschreibung Anmerkung DPLL Backtracking + DFS enumeration of possible models
  • Early termination (A && B - > false if - A) +Pure symbol heuristic (if only negated->false) +Unit clause heuristic (try unit clauses first)

Component analysis If subsets share no unassigned var - > solve separate Trick Variable and Value ordering Similar to MRV-/Degree-/Least-Constraining-Value- Heuristics Trick Random restarts If no progress, restart with different random choices Trick WalkSAT Hillclimbing (choose unsatisfied clause, increase number of satisfied clauses + random choices) Local search

  • best algo  Einschub: Belief State zu groß - > Approximation mit 1-CNF (A & B &…)

  1. Prädikatenlogik 1. Stufe Algorithmen Name Beschreibung Anmerkung First Order Resolution Convert in CNF +Unify Clauses + Resolution  Prefer Single Literals  Use only query + their resolvents  Eliminate all sentences subsumed by KB ResolutionTree Linear Resolution Res (P; Q) if P in orig. KB & Q in proof tree type of Input-R Convert in CNF 1. Move ¬ inwards
  2. Standardize Variables
  3. Move Quantifiers Left
  4. Skolemize (remove ∃)
  5. Drop ∀ + Distribution-Rule UNIFY 1. If X | Y Variable: UNIFY-VAR (x, y)
  6. If X & Y Compound: UNIFY(Args(x), Args(y))
  7. If X & Y Lists: UNIFY-VAR one after another
  8. Else: failure

𝑂(𝑛^2 )

UNIFY-VAR 1. If {y /y´´}: UNIFY (x, y´´)

  1. If OCCUR_CHECK (x, y): failure
  2. Else return add {y/x} ohne OCCUR- CHECK: 𝑂(𝑛) : ↑ Simple Forward Chaining Add ∝ (to be proven) to KB While(true) For each rule in KB:
  3. Standardize Variable
  4. Find Subst(p1…pn) so equals premise of rule
  5. Add Conclusion to KB, test for ∝  Breche ab wenn nichts neues mehr! Baue Baum mit ∝ on top Conjunct ordering Check for unification with predicates with fewer instances first Trick Name Beschreibung Anmerkung Incremental Forward Chaining Create Data structure with:
  • Predicate-Test(circles): all variables x with p(x) =true
  • Filter(squares): information about var - >A=B
  • Actions(rectangles): add/delete A Solve with data flow algorithms
  • efficient Magic Set Approach Add Magic(x) to every premise + add Magic(West)  Avoid irrelevant facts - > right variable Implemented in Datalog