Knowledge and reasoning
Introducido
6:33
Inteligencia Artificial y Aprendizaje Automático
This course covers the classical core of artificial intelligence, honestly measured. The first three units are the spine: search, logical reasoning and…
Narración en inglés · subtítulos en inglés y 中文 que puedes cambiar
En esta lección
| English | Significado |
|---|---|
| Inference/ˈɪnfərəns/ | deriving new facts from known facts and rules |
| knowledge base/ˈnɒlɪdʒ beɪs/ | a store of facts and rules that a program can reason with |
| Propositional logic/ˌprɒpəˈzɪʃənl ˈlɒdʒɪk/ | logic with true-or-false statements joined by and, or, not and if-then |
| modus ponens/ˈməʊdəs ˈpəʊnənz/ | the rule: from P and "if P then Q", conclude Q |
| Forward chaining/ˈfɔːwəd ˈtʃeɪnɪŋ/ | reasoning from the known facts, applying rules until nothing new can be derived |
| backward chaining/ˈbækwəd ˈtʃeɪnɪŋ/ | reasoning back from a goal to the facts that would prove it |
| sound/saʊnd/ | (of an inference method) never derives a false conclusion from true facts |
| complete/kəmˈpliːt/ | (of an inference method) can derive every conclusion that really follows |
| resolution/ˌrezəˈluːʃn/ | an inference step that combines two clauses containing a literal and its negation |
| clauses/ˈklɔːzɪz/ | disjunctions of literals, such as not-Storm or Delayed, the form resolution works on |
| refutation/rɪfjuːˈteɪʃn/ | proving a statement by showing that its negation leads to a contradiction |
| First-order logic/fɜːst ˈɔːdə ˈlɒdʒɪk/ | logic with variables and quantifiers such as "for all x" |
| unification/ˌjuːnɪfɪˈkeɪʃn/ | finding values for variables that make two logical expressions identical |
| Horn clauses/hɔːn ˈklɔːzɪz/ | rules of the form "these facts together imply one fact" |
Reglas y consecuencias
- Lógica proposicional: hechos y reglas ($P \to Q$); la inferencia aplica modus ponens. La cadenas hacia adelante inunda desde los hechos; la cadenas hacia atrás apunta desde la consulta — el razonamiento simbólico saca conclusiones que los datos nunca vieron.


Forward chaining starts from —
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
Forward chaining starts from what is known; backward chaining starts from the goal.
Base de conocimiento del curso, ejecutada
- F1 Tormenta; F2 Fin de semana; R1 Tormenta → Retraso; R2 Fin de semana → TráficoDenso; R3 TráficoDenso → Retraso; R4 Retraso → RiesgoDeReembolso. Cadenafwd: la primera onda deriva Retraso y TráficoDenso, la segunda onda deriva RiesgoDeReembolso.
- Cadena hacia atrás para RiesgoDeReembolso: objetivo ← Retraso (R4) ← Tormenta (R1) ← dato: demostrado en tres pasos, R2/R3 nunca se activan — búsqueda dirigida por objetivos.
The course KB derives RefundRisk in — waves
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
Wave one: Delayed, HeavyTraffic; wave two: RefundRisk.
Sonoridad por construcción
- Cada paso es modus ponens sobre reglas asumidas, por lo que las derivaciones no pueden inventar falsedades; la completitud (cada consecuencia alcanzable) es la propiedad más difícil.
- Para demostrar $Q$ por refutación: asumir $\neg Q$, derivar la cláusula vacía mediante resolución — la maquinaria detrás de los solucionadores SAT. El error inverso (leer $P \to Q$ como $Q \to P$) es la trampa clásica.
From the rule Storm → Delayed and the fact Delayed, we may conclude Storm.
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
That is the converse error. Delayed also follows from HeavyTraffic, so Delayed does not prove Storm; modus ponens runs only from $P$ hasta $Q$.
From Storm → Delayed and Delayed, Storm follows.
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
That is affirming the consequent; the delay may have another cause.
Esta tarjeta es nueva, por eso aparece en inglés hasta que su traducción esté lista.
Sound and complete
- A method is sound 可靠的 if it never derives something false from true facts. Modus ponens is sound: each step follows directly from a rule.
- A method is complete 完备性 if it can derive every true consequence. Modus ponens alone is not complete for all logic (it cannot handle "A or B" facts, for example); resolution, next, is the standard complete method for proving that a set of clauses is contradictory.
Modus ponens makes inference —
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
Each step is a valid implication on assumed rules - no falsehood invented.
Esta tarjeta es nueva, por eso aparece en inglés hasta que su traducción esté lista.
Rules as clauses, and resolution
- Resolution 归结 works on clauses 子句: lists of literals joined by OR. Rewrite each rule using $P \to Q \equiv \neg P \lor Q$. So R1 becomes the clause $\{\neg\text{Storm}, \text{Delayed}\}$ ("not Storm, or Delayed").
- One resolution step takes two clauses that contain a literal and its negation, and joins the rest: $\{\neg\text{Storm}, \text{Delayed}\}$ and $\{\text{Storm}\}$ give $\{\text{Delayed}\}$. This is modus ponens written as clauses.
$P \to Q$ is equivalent to:
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
It is false only when $P$ is true and $Q$ false.
Esta tarjeta es nueva, por eso aparece en inglés hasta que su traducción esté lista.
Worked example: proof by refutation
- To prove Delayed, assume the opposite and show it leads to a contradiction (refutation 反驳). Add $\{\neg\text{Delayed}\}$ to the clauses $\{\text{Storm}\}$ and $\{\neg\text{Storm}, \text{Delayed}\}$.
- Step 1: $\{\neg\text{Storm}, \text{Delayed}\}$ with $\{\neg\text{Delayed}\}$ gives $\{\neg\text{Storm}\}$.
- Step 2: $\{\neg\text{Storm}\}$ with $\{\text{Storm}\}$ gives the empty clause: a contradiction. So "not Delayed" is impossible, and Delayed follows. SAT solvers are built on this idea.
Clauses {Storm}, {¬Storm, Delayed}, {¬Delayed}: resolution steps to reach the empty clause?
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
Cancel Delayed, then Storm.
Esta tarjeta es nueva, por eso aparece en inglés hasta que su traducción esté lista.
First-order logic: rules with variables
- Propositional rules need one copy for every flight. First-order logic 一阶逻辑 adds variables: $\forall x\; \text{Storm}(x) \to \text{Delayed}(x)$, "for every leg $x$, a storm on $x$ delays $x$".
- To use the rule on the fact $\text{Storm}(\text{Leg7})$, unification 合一 finds the substitution that makes them match, $x = \text{Leg7}$. Modus ponens then gives $\text{Delayed}(\text{Leg7})$. One rule now covers every leg.
Unify $\text{Delayed}(x)$ with $\text{Delayed}(\text{Leg7})$. The substitution is —
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
Replacing x by Leg7 makes the two terms identical.
Esta tarjeta se corrigió, por eso aparece en inglés hasta que se actualice su traducción.
What reasoning costs
- Checking a conclusion with a truth table lists every combination of true and false: $2^n$ rows for $n$ symbols. 20 symbols already need about a million rows, 30 over a billion.
- Propositional rules of the form "these facts imply one fact" can be written as Horn clauses 霍恩子句. Propositional Horn-clause entailment can be decided in time linear in the size of the knowledge base with a suitable chaining algorithm.
How many rows does a truth table over 6 propositional symbols have?
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
Each symbol doubles the rows: 2^6 = 64.
Esta tarjeta es nueva, por eso aparece en inglés hasta que su traducción esté lista.
Marks that slip away
- Reading $P \to Q$ backwards. Delayed does not prove Storm.
- Forward chaining for one question. It derives everything; backward chaining 后向链接 follows only the goal.
- Sound as complete. Never deriving something false is not the same as deriving everything true.
Esta tarjeta se corrigió, por eso aparece en inglés hasta que se actualice su traducción.
Recap
- Modus ponens: from $P$ and $P \to Q$, conclude $Q$. Forward chaining starts from facts, backward chaining 后向链接 from the goal.
- Clauses use $P \to Q \equiv \neg P \lor Q$; refutation adds the negated goal and resolves to the empty clause.
- Truth tables cost $2^n$ rows; propositional Horn-clause entailment can be decided in linear time.
¿Qué salió mal? Solo el equipo del sitio ve esta información.