Inference in First Order Logic课件
First-Order Logic
• Relations can be unary as well.
tall(amy)
Let’s blur the distinction…
• Constants refer to objects, functions and relationships.
joe, mary, loves, happy, hat
E.g. How about saying that Jimmy Durante has a big nose? durante is an object and nose_of (durante) is a function that constructs an object from the argument object. Then, we can write: big(nose_of (durante)) Note: We are allowed to relate sentences only. So, we can say: loves(quincy, dog_of (quincy)) ∧ loves(quincy, cat_of (quincy)) But not, loves(quincy, dog_of (quincy) ∧ cat_of (quincy)) because dog_of (quincy), cat_of (quincy) aren’t sentences, they are objects. E.g. Quincy loves his dog. loves(quincy, dog_of (quincy))
More about Conceptualization I
• A function is a kind of interrelationship among the objects in a universe of discourse. • Although we can define many functions for a given set of objects, in conceptualizing a portion of the world we usually emphasize some functions and ignore others. • The set of functions emphasized in a conceptualization is called the functional basis set. • E.g. in our blocks world, it would make sense to define a (partial) function Hat that maps a block into the block on top of it, if such exists. The tuples corresponding to this function are: • {<B,A>, <C,B>, <E,D>}
逻辑智能体分析_OK
• Preview: we will define a logic (first-order logic) which is expressive enough to say almost anything of interest, and for which there exists a sound and complete inference procedure.
i.e., what they know, regardless of how implemented
• Or at the implementation level
– i.e., data structures in KB and algorithms that manipulate them
–
3
–
17
Entailment in the wumpus world
Situation after detecting nothing in [1,1], moving right, breeze in [2,1]
Consider possible models for KB
assuming only pits
• The proposition symbols P1, P2 etc are sentences
– If S is a sentence, S is a sentence (negation)
–
– If S1 and S2 are sentences, S1 S2 is a sentence (conjunction) –
• α1 = "[1,2] is safe", KB ╞ α1, proved by model checking
北京理工大学 人工智能导论 刘峡壁 7.Knowledge and Reasoning
3. Execute the lowest numbered production (or quit)
4. Repeat
15
AI:knowledge and reasoning
4/18/2021
Structure of Expert Systems
2021/4/18
From:
2
AI:knowledge and reasoning
An important rule based ES
MYCIN: HAS THE PATIENT RECENTLY HAD SYMPTOMS OF PERSISTENT HEADACHE OR OTHER ABNORMAL NEUROLOGIC SYMPTOMS (DIZZINESS, LETHARGY, ETC.)? HUMAN: YES. MYCIN: HAS THE PATIENT RECENTLY HAD OBJECTIVE EVIDENCE ABNORMAL NEUROLOGIC SIGNS (MUSCLE RIGIDITY, COMA, SEIZURES, ETC.) DOCUMENTED BY PHYSICIAN OBSERVATION OR EXAMINATION? MYCIN: THE CSF CULTURES WILL BE CONSIDERED TO BE ASSOCIATED WITH MENINGITIS. PLEASE GIVE THE DATE ON WHICH CLINICAL EVIDENCE (SYMPTOMS, SIGNS OR LABORATORY TESTS) OF MENINGITIS FIRST APPEARED. PLEASE ENTER CSF FINDING. IS MENINGITIS A HOSPITALACQUIRED INFECTION? HUMAN: WHY? MYCIN: THIS WILL AID IN DETERMINING THE ORGANISMS (OTHER THAN THOSE SEEN ON CULTURES OR SMEARS) WHICH MIGHT BE CAUSING THE INFECTION. IT HAS ALREADY BEEN ESTABLISHED THAT
Logic课件.ppt
Soundness of modus ponens
A
True True False False
B
True False True False
A→B
True False True True
OK?
Soundness of the resolution inference rule
Proving Things
• A valid sentence or tautology is a sentence that is True under all interpretations, no matter what the world is actually like or what the semantics is. Example: “It’s raining or it’s not raining.”
• P entails Q, written P |= Q, means that whenever P is True, so is Q. In other words, all models of P are also models of Q.
Truth tables
A bit more about =>
Connectives: and
or
not
implies
equivalent
(X (Y Z)) ((X Y) (X Z)) “X implies Y and Z is the same as X implies Y and X implies Z”
Propositional Logic
• Propositional Logic is declarative, pieces of syntax correspond to facts
2 知识图谱表示与建模
2.2.1 一阶谓词逻辑
● 1.一阶谓词逻辑优点 ● ●结构性。能把事物的属性以及事物间的各种语义联想显式地表示出来。 ● ●严密性。有形式化的语法和语义,以及相关的推理规则。 ● ●可实现性。可以转换为计算机内部形式,以便用算法实现。 ● 2.一阶谓词逻辑缺点 ● ●有限的可用性。一阶逻辑的逻辑归结只是半可判定性的。 ● ●无法表示不确定性知识。
2.2.2 霍恩子句和霍恩逻辑
● 霍恩子句(Horn Clause)得名于逻辑学家Alfred Horn[6]。 ● 一个子句是文字的析取。 ● 霍恩子句是带有最多一个肯定(positive)文字的子句,肯定文字指的是没有否定符号的文字。
例如,Øp1∨…∨Øpn∨ q是一个霍恩子句,它可以被等价地写为(p1∧…∧pn)→ q。Alfred Horn于1951年撰文指出这种子句的重要性。 ● 霍恩逻辑(Horn Logic)是一阶逻辑的子集。 ● 基于霍恩逻辑的知识库是一个霍恩规则的集合。 ● 一个霍恩规则由原子公式构成:B1∧…∧ Bn→ H, ● 其中H是头原子公式, B1,…,Bn是体原子公式。 ● 事实是霍恩规则的特例,它们是没有体原子公式且没有变量的霍恩规则。 ● 例如,→图灵奖得主(Tim Berners-Lee)是一个事实,可以简写为图灵奖得主(Tim BernersLee)。
组。 ● 由于所有的节点均通过联想弧彼此相连,语义网络可以通过图上的操作进行知识推理。
2.2.3 语义网络
● 1.语义网络的优点 ● 1)联想性。它最初是作为人类联想记忆模型提出来的。 ● 2)易用性。直观地把事物的属性及其语义联系表示出来,便于理解, ● 自然语言与语义网络的转换比较容易实现, ● 故语义网络表示法在自然语言理解系统中的应用最为广泛。 ● 3)结构性。语义网络是一种结构化的知识表示方法, ● 对数据子图特别有效。它能把事物的属性以及事物间的各种语义联想显式地表示出来。
235-Ch1-2-Logic离散数学英文版PPT
denotes x > 3. Or, P(x) = x > 3 If x has a specific number, the function becomes a
proposition (T or F). x’s domain U = {x | x is integer}
(for all three variables) be {x | x is integers}
R(2, -1, 5)
(T or F?)
R(3, 4, 7)
(T or F?)
R(x, 3, z)
(T or F?)
Now let “x - y = z” be denoted by Q(x, y, z), with U as all the integers. Find these truth values:
Polynomial, Binomial, Coefficient Induction, Recursion, Recursive
2
Function/Algorithm
Translating English Sentences
Steps to convert an English sentence to a statement in propositional logic
Solution: Define
a: You can access the internet from campus c: You are a computer science major f : You are a freshman.”
(c ∨ ¬ f ) → a
First Order Logic
Natural Deductive Rules
Natural deductive rules are logical rules accepted as being intuitively true. Universal Instantiation: If a variable is assigned a value, it will always have that value.
cons(H, T) constructs the list with H as the head and T as the tail. This is equivalent to [H|T].
[1,2,3]=[1|[2, 3]]=[1|2|3|nil]]]=cons(1, cons(2, cons(3, nil)))
Any query can be represented as a formula. To find all male patients with diagnosis code 111, use the query formula
P (interest(P) patient(P, B, male) ^ visit(P, D, 111)
−
If X = joe, X (zombie(X) eatsbrains(X)) is the same as (zombie(joe) eatsbrains(joe))
Modus Ponens: For some pair of expressions p and q, p ^ (p q q.
−
If zombie(X), (zombie(X) (eatsbrains(X))
Relational Databases
Assume there is a relational database with a patient table, visit table, and a prescription table. The patient table has fields ID, Date of Birth, and Gender. The visit table has fields ID, Visit Date, and Diagnosis Code. The prescription table has fields ID, Date, and Drug.
人工智能英汉
人工智能英汉Aβα-Pruning, βα-剪枝, (2) Acceleration Coefficient, 加速系数, (8) Activation Function, 激活函数, (4) Adaptive Linear Neuron, 自适应线性神经元,(4)Adenine, 腺嘌呤, (11)Agent, 智能体, (6)Agent Communication Language, 智能体通信语言, (11)Agent-Oriented Programming, 面向智能体的程序设计, (6)Agglomerative Hierarchical Clustering, 凝聚层次聚类, (5)Analogism, 类比推理, (5)And/Or Graph, 与或图, (2)Ant Colony Optimization (ACO), 蚁群优化算法, (8)Ant Colony System (ACS), 蚁群系统, (8) Ant-Cycle Model, 蚁周模型, (8)Ant-Density Model, 蚁密模型, (8)Ant-Quantity Model, 蚁量模型, (8)Ant Systems, 蚂蚁系统, (8)Applied Artificial Intelligence, 应用人工智能, (1)Approximate Nondeterministic Tree Search (ANTS), 近似非确定树搜索, (8) Artificial Ant, 人工蚂蚁, (8)Artificial Intelligence (AI), 人工智能, (1) Artificial Neural Network (ANN), 人工神经网络, (1), (3)Artificial Neural System, 人工神经系统,(3) Artificial Neuron, 人工神经元, (3) Associative Memory, 联想记忆, (4) Asynchronous Mode, 异步模式, (4) Attractor, 吸引子, (4)Automatic Theorem Proving, 自动定理证明,(1)Automatic Programming, 自动程序设计, (1) Average Reward, 平均收益, (6) Axon, 轴突, (4)Axon Hillock, 轴突丘, (4)BBackward Chain Reasoning, 逆向推理, (3) Bayesian Belief Network, 贝叶斯信念网, (5) Bayesian Decision, 贝叶斯决策, (3) Bayesian Learning, 贝叶斯学习, (5) Bayesian Network贝叶斯网, (5)Bayesian Rule, 贝叶斯规则, (3)Bayesian Statistics, 贝叶斯统计学, (3) Biconditional, 双条件, (3)Bi-Directional Reasoning, 双向推理, (3) Biological Neuron, 生物神经元, (4) Biological Neural System, 生物神经系统, (4) Blackboard System, 黑板系统, (8)Blind Search, 盲目搜索, (2)Boltzmann Machine, 波尔兹曼机, (3) Boltzmann-Gibbs Distribution, 波尔兹曼-吉布斯分布, (3)Bottom-Up, 自下而上, (4)Building Block Hypotheses, 构造块假说, (7) CCell Body, 细胞体, (3)Cell Membrane, 细胞膜, (3)Cell Nucleus, 细胞核, (3)Certainty Factor, 可信度, (3)Child Machine, 婴儿机器, (1)Chinese Room, 中文屋, (1) Chromosome, 染色体, (6)Class-conditional Probability, 类条件概率,(3), (5)Classifier System, 分类系统, (6)Clause, 子句, (3)Cluster, 簇, (5)Clustering Analysis, 聚类分析, (5) Cognitive Science, 认知科学, (1) Combination Function, 整合函数, (4) Combinatorial Optimization, 组合优化, (2) Competitive Learning, 竞争学习, (4) Complementary Base, 互补碱基, (11) Computer Games, 计算机博弈, (1) Computer Vision, 计算机视觉, (1)Conflict Resolution, 冲突消解, (3) Conjunction, 合取, (3)Conjunctive Normal Form (CNF), 合取范式,(3)Collapse, 坍缩, (11)Connectionism, 连接主义, (3) Connective, 连接词, (3)Content Addressable Memory, 联想记忆, (4) Control Policy, 控制策略, (6)Crossover, 交叉, (7)Cytosine, 胞嘧啶, (11)DData Mining, 数据挖掘, (1)Decision Tree, 决策树, (5) Decoherence, 消相干, (11)Deduction, 演绎, (3)Default Reasoning, 默认推理(缺省推理),(3)Defining Length, 定义长度, (7)Rule (Delta Rule), 德尔塔规则, 18(3) Deliberative Agent, 慎思型智能体, (6) Dempster-Shafer Theory, 证据理论, (3) Dendrites, 树突, (4)Deoxyribonucleic Acid (DNA), 脱氧核糖核酸, (6), (11)Disjunction, 析取, (3)Distributed Artificial Intelligence (DAI), 分布式人工智能, (1)Distributed Expert Systems, 分布式专家系统,(9)Divisive Hierarchical Clustering, 分裂层次聚类, (5)DNA Computer, DNA计算机, (11)DNA Computing, DNA计算, (11) Discounted Cumulative Reward, 累计折扣收益, (6)Domain Expert, 领域专家, (10) Dominance Operation, 显性操作, (7) Double Helix, 双螺旋结构, (11)Dynamical Network, 动态网络, (3)E8-Puzzle Problem, 八数码问题, (2) Eletro-Optical Hybrid Computer, 光电混合机, (11)Elitist strategy for ant systems (EAS), 精化蚂蚁系统, (8)Energy Function, 能量函数, (3) Entailment, 永真蕴含, (3) Entanglement, 纠缠, (11)Entropy, 熵, (5)Equivalence, 等价式, (3)Error Back-Propagation, 误差反向传播, (4) Evaluation Function, 评估函数, (6) Evidence Theory, 证据理论, (3) Evolution, 进化, (7)Evolution Strategies (ES), 进化策略, (7) Evolutionary Algorithms (EA), 进化算法, (7) Evolutionary Computation (EC), 进化计算,(7)Evolutionary Programming (EP), 进化规划,(7)Existential Quantification, 存在量词, (3) Expert System, 专家系统, (1)Expert System Shell, 专家系统外壳, (9) Explanation-Based Learning, 解释学习, (5) Explanation Facility, 解释机构, (9)FFactoring, 因子分解, (11)Feedback Network, 反馈型网络, (4) Feedforward Network, 前馈型网络, (1) Feasible Solution, 可行解, (2)Finite Horizon Reward, 横向有限收益, (6) First-order Logic, 一阶谓词逻辑, (3) Fitness, 适应度, (7)Forward Chain Reasoning, 正向推理, (3) Frame Problem, 框架问题, (1)Framework Theory, 框架理论, (3)Free-Space Optical Interconnect, 自由空间光互连, (11)Fuzziness, 模糊性, (3)Fuzzy Logic, 模糊逻辑, (3)Fuzzy Reasoning, 模糊推理, (3)Fuzzy Relation, 模糊关系, (3)Fuzzy Set, 模糊集, (3)GGame Theory, 博弈论, (8)Gene, 基因, (7)Generation, 代, (6)Genetic Algorithms, 遗传算法, (7)Genetic Programming, 遗传规划(遗传编程),(7)Global Search, 全局搜索, (2)Gradient Descent, 梯度下降, (4)Graph Search, 图搜索, (2)Group Rationality, 群体理性, (8) Guanine, 鸟嘌呤, (11)HHanoi Problem, 梵塔问题, (2)Hebbrian Learning, 赫伯学习, (4)Heuristic Information, 启发式信息, (2) Heuristic Search, 启发式搜索, (2)Hidden Layer, 隐含层, (4)Hierarchical Clustering, 层次聚类, (5) Holographic Memory, 全息存储, (11) Hopfield Network, 霍普菲尔德网络, (4) Hybrid Agent, 混合型智能体, (6)Hype-Cube Framework, 超立方体框架, (8)IImplication, 蕴含, (3)Implicit Parallelism, 隐并行性, (7) Individual, 个体, (6)Individual Rationality, 个体理性, (8) Induction, 归纳, (3)Inductive Learning, 归纳学习, (5) Inference Engine, 推理机, (9)Information Gain, 信息增益, (3)Input Layer, 输入层, (4)Interpolation, 插值, (4)Intelligence, 智能, (1)Intelligent Control, 智能控制, (1) Intelligent Decision Supporting System (IDSS), 智能决策支持系统,(1) Inversion Operation, 倒位操作, (7)JJoint Probability Distribution, 联合概率分布,(5) KK-means, K-均值, (5)K-medoids, K-中心点, (3)Knowledge, 知识, (3)Knowledge Acquisition, 知识获取, (9) Knowledge Base, 知识库, (9)Knowledge Discovery, 知识发现, (1) Knowledge Engineering, 知识工程, (1) Knowledge Engineer, 知识工程师, (9) Knowledge Engineering Language, 知识工程语言, (9)Knowledge Interchange Format (KIF), 知识交换格式, (8)Knowledge Query and ManipulationLanguage (KQML), 知识查询与操纵语言,(8)Knowledge Representation, 知识表示, (3)LLearning, 学习, (3)Learning by Analog, 类比学习, (5) Learning Factor, 学习因子, (8)Learning from Instruction, 指导式学习, (5) Learning Rate, 学习率, (6)Least Mean Squared (LSM), 最小均方误差,(4)Linear Function, 线性函数, (3)List Processing Language (LISP), 表处理语言, (10)Literal, 文字, (3)Local Search, 局部搜索, (2)Logic, 逻辑, (3)Lyapunov Theorem, 李亚普罗夫定理, (4) Lyapunov Function, 李亚普罗夫函数, (4)MMachine Learning, 机器学习, (1), (5) Markov Decision Process (MDP), 马尔科夫决策过程, (6)Markov Chain Model, 马尔科夫链模型, (7) Maximum A Posteriori (MAP), 极大后验概率估计, (5)Maxmin Search, 极大极小搜索, (2)MAX-MIN Ant Systems (MMAS), 最大最小蚂蚁系统, (8)Membership, 隶属度, (3)Membership Function, 隶属函数, (3) Metaheuristic Search, 元启发式搜索, (2) Metagame Theory, 元博弈理论, (8) Mexican Hat Function, 墨西哥草帽函数, (4) Migration Operation, 迁移操作, (7) Minimum Description Length (MDL), 最小描述长度, (5)Minimum Squared Error (MSE), 最小二乘法,(4)Mobile Agent, 移动智能体, (6)Model-based Methods, 基于模型的方法, (6) Model-free Methods, 模型无关方法, (6) Modern Heuristic Search, 现代启发式搜索,(2)Monotonic Reasoning, 单调推理, (3)Most General Unification (MGU), 最一般合一, (3)Multi-Agent Systems, 多智能体系统, (8) Multi-Layer Perceptron, 多层感知器, (4) Mutation, 突变, (6)Myelin Sheath, 髓鞘, (4)(μ+1)-ES, (μ+1) -进化规划, (7)(μ+λ)-ES, (μ+λ) -进化规划, (7) (μ,λ)-ES, (μ,λ) -进化规划, (7)NNaïve Bayesian Classifiers, 朴素贝叶斯分类器, (5)Natural Deduction, 自然演绎推理, (3) Natural Language Processing, 自然语言处理,(1)Negation, 否定, (3)Network Architecture, 网络结构, (6)Neural Cell, 神经细胞, (4)Neural Optimization, 神经优化, (4) Neuron, 神经元, (4)Neuron Computing, 神经计算, (4)Neuron Computation, 神经计算, (4)Neuron Computer, 神经计算机, (4) Niche Operation, 生态操作, (7) Nitrogenous base, 碱基, (11)Non-Linear Dynamical System, 非线性动力系统, (4)Non-Monotonic Reasoning, 非单调推理, (3) Nouvelle Artificial Intelligence, 行为智能,(6)OOccam’s Razor, 奥坎姆剃刀, (5)(1+1)-ES, (1+1) -进化规划, (7)Optical Computation, 光计算, (11)Optical Computing, 光计算, (11)Optical Computer, 光计算机, (11)Optical Fiber, 光纤, (11)Optical Waveguide, 光波导, (11)Optical Interconnect, 光互连, (11) Optimization, 优化, (2)Optimal Solution, 最优解, (2)Orthogonal Sum, 正交和, (3)Output Layer, 输出层, (4)Outer Product, 外积法, 23(4)PPanmictic Recombination, 混杂重组, (7) Particle, 粒子, (8)Particle Swarm, 粒子群, (8)Particle Swarm Optimization (PSO), 粒子群优化算法, (8)Partition Clustering, 划分聚类, (5) Partitioning Around Medoids, K-中心点, (3) Pattern Recognition, 模式识别, (1) Perceptron, 感知器, (4)Pheromone, 信息素, (8)Physical Symbol System Hypothesis, 物理符号系统假设, (1)Plausibility Function, 不可驳斥函数(似然函数), (3)Population, 物种群体, (6)Posterior Probability, 后验概率, (3)Priori Probability, 先验概率, (3), (5) Probability, 随机性, (3)Probabilistic Reasoning, 概率推理, (3) Probability Assignment Function, 概率分配函数, (3)Problem Solving, 问题求解, (2)Problem Reduction, 问题归约, (2)Problem Decomposition, 问题分解, (2) Problem Transformation, 问题变换, (2) Product Rule, 产生式规则, (3)Product System, 产生式系统, (3) Programming in Logic (PROLOG), 逻辑编程, (10)Proposition, 命题, (3)Propositional Logic, 命题逻辑, (3)Pure Optical Computer, 全光计算机, (11)QQ-Function, Q-函数, (6)Q-learning, Q-学习, (6)Quantifier, 量词, (3)Quantum Circuit, 量子电路, (11)Quantum Fourier Transform, 量子傅立叶变换, (11)Quantum Gate, 量子门, (11)Quantum Mechanics, 量子力学, (11) Quantum Parallelism, 量子并行性, (11) Qubit, 量子比特, (11)RRadial Basis Function (RBF), 径向基函数,(4)Rank based ant systems (ASrank), 基于排列的蚂蚁系统, (8)Reactive Agent, 反应型智能体, (6) Recombination, 重组, (6)Recurrent Network, 循环网络, (3) Reinforcement Learning, 强化学习, (3) Resolution, 归结, (3)Resolution Proof, 归结反演, (3) Resolution Strategy, 归结策略, (3) Reasoning, 推理, (3)Reward Function, 奖励函数, (6) Robotics, 机器人学, (1)Rote Learning, 机械式学习, (5)SSchema Theorem, 模板定理, (6) Search, 搜索, (2)Selection, 选择, (7)Self-organizing Maps, 自组织特征映射, (4) Semantic Network, 语义网络, (3)Sexual Differentiation, 性别区分, (7) Shor’s algorithm, 绍尔算法, (11)Sigmoid Function, Sigmoid 函数(S型函数),(4)Signal Function, 信号函数, (3)Situated Artificial Intelligence, 现场式人工智能, (1)Spatial Light Modulator (SLM), 空间光调制器, (11)Speech Act Theory, 言语行为理论, (8) Stable State, 稳定状态, (4)Stability Analysis, 稳定性分析, (4)State Space, 状态空间, (2)State Transfer Function, 状态转移函数,(6)Substitution, 置换, (3)Stochastic Learning, 随机型学习, (4) Strong Artificial Intelligence (AI), 强人工智能, (1)Subsumption Architecture, 包容结构, (6) Superposition, 叠加, (11)Supervised Learning, 监督学习, (4), (5) Swarm Intelligence, 群智能, (8)Symbolic Artificial Intelligence (AI), 符号式人工智能(符号主义), (3) Synapse, 突触, (4)Synaptic Terminals, 突触末梢, (4) Synchronous Mode, 同步模式, (4)TThreshold, 阈值, (4)Threshold Function, 阈值函数, (4) Thymine, 胸腺嘧啶, (11)Topological Structure, 拓扑结构, (4)Top-Down, 自上而下, (4)Transfer Function, 转移函数, (4)Travel Salesman Problem, 旅行商问题, (4) Turing Test, 图灵测试, (1)UUncertain Reasoning, 不确定性推理, (3)Uncertainty, 不确定性, (3)Unification, 合一, (3)Universal Quantification, 全称量词, (4) Unsupervised Learning, 非监督学习, (4), (5)WWeak Artificial Intelligence (Weak AI), 弱人工智能, (1)Weight, 权值, (4)Widrow-Hoff Rule, 维德诺-霍夫规则, (4)。
inference
inferenceInference is the act of drawing a conclusion by deductive reasoning from given facts. The conclusion drawn is also called an inference. The laws of valid inference are studied in the field of logic.Human inference (i.e. how humans draw conclusions) is traditionally studied within the field of cognitive psychology; artificial intelligence researchers develop automated inference systems to emulate human inference. Statistical inference allows for inference from quantitative data.Contents[hide]1 Accuracy of inductive inferences2 Examples of deductive inference3 Incorrect inference4 Automatic logical inferenceo 4.1 Example using Prologo 4.2 Use with the semantic webo 4.3 Bayesian statistics and probability logico 4.4 Nonmonotonic logic[1]5 See also6 References[edit] Accuracy of inductive inferencesThe process by which a conclusion is inferred from multiple observations is called inductive reasoning. The conclusion may be correct or incorrect, or correct to within a certain degree of accuracy, or correct in certain situations. Conclusions inferred from multiple observations may be tested by additional observations.[edit] Examples of deductive inferenceGreek philosophers defined a number of syllogisms, correct three part inferences, that can be used as building blocks for more complex reasoning. We begin with the most famous of them all:1.All men are mortal2.Socrates is a man3.Therefore, Socrates is mortal.The reader can check that the premises and conclusion are true, but Logic is concerned with inference: does the truth of the conclusion follow from that of the premises?The validity of an inference depends on the form of the inference. That is, the word "valid" does not refer to the truth of the premises or the conclusion, but rather to the form of the inference. An inference can be valid even if the parts are false, and can be invalid even if the parts are true. But a valid form with true premises will always have a true conclusion.For example, consider the form of the following symbological track:1.All apples are blue.2. A banana is an apple.3.Therefore, a banana is blue.For the conclusion to be necessarily true, the premises need to be true.Now we turn to an invalid form.1.All A are B.2. C is a B.3.Therefore, C is an A.To show that this form is invalid, we demonstrate how it can lead from true premises to a false conclusion.1.All apples are fruit. (True)2.Bananas are fruit. (True)3.Therefore, bananas are apples. (False)A valid argument with false premises may lead to a false conclusion:1.All fat people are Greek.2.John Lennon was fat.3.Therefore, John Lennon was Greek.When a valid argument is used to derive a false conclusion from false premises, the inference is valid because it follows the form of a correct inference.A valid argument can also be used to derive a true conclusion from false premises:1.All fat people are musicians2.John Lennon was fat3.Therefore, John Lennon was a musicianIn this case we have two false premises that imply a true conclusion.[edit] Incorrect inferenceAn incorrect inference is known as a fallacy. Philosophers who study informal logic have compiled large lists of them, and cognitive psychologists have documented many biases in human reasoning that favor incorrect reasoning.[edit] Automatic logical inferenceAI systems first provided automated logical inference and these were once extremely popular research topics, leading to industrial applications under the form of expert systems and later business rule engines.An inference system's job is to extend a knowledge base automatically. The knowledge base (KB) is a set of propositions that represent what the system knows about the world. Several techniques can be used by that system to extend KB by means of valid inferences. An additional requirement is that the conclusions the system arrives at are relevant to its task.[edit] Example using PrologProlog (for "Programming in Logic") is a programming language based on a subset of predicate calculus. Its main job is to check whether a certain proposition can be inferred from a KB (knowledge base) using an algorithm called backward chaining.Let us return to our Socrates syllogism. We enter into our Knowledge Base the following piece of code:mortal(X) :- man(X).man(socrates).( Here :-can be read as if. Generally, if P Q(if P then Q) then in Prolog we would code Q:-P (Q if P).)This states that all men are mortal and that Socrates is a man. Now we can ask the Prolog system about Socrates:- mortal(socrates).(where ?- signifies a query: Can mortal(socrates). be deduced from the KB using the rules) gives the answer "Yes".On the other hand, asking the Prolog system the following:- mortal(plato).gives the answer "No".This is because Prolog does not know anything about Plato, and hence defaults to any property about Plato being false (the so-called closed world assumption). Finally ?- mortal(X) (Is anything mortal) would result in "Yes" (and in some implementations: "Yes": X=socrates)Prolog can be used for vastly more complicated inference tasks. See the corresponding article for further examples. [edit] Use with the semantic webRecently automatic reasoners found in semantic web a new field of application. Being based upon first-order logic, knowledge expressed using one variant of OWL can be logically processed, i.e., inferences can be made upon it.[edit] Bayesian statistics and probability logicPhilosophers and scientists who follow the Bayesian framework for inference use the mathematical rules of probability to find this best explanation. The Bayesian view has a number of desirable features—one of them is that it embeds deductive (certain) logic as a subset (this prompts some writers to call Bayesian probability "probability logic", following E. T. Jaynes). Bayesians identify probabilities with degrees of beliefs, with certainly true propositions having probability 1, and certainly false propositions having probability 0. To say that "it's going to rain tomorrow" has a 0.9 probability is to say that you consider the possibility of rain tomorrow as extremely likely.Through the rules of probability, the probability of a conclusion and of alternatives can be calculated. The best explanation is most often identified with the most probable (see Bayesian decision theory). Acentral rule of Bayesian inference is Bayes' theorem, which gave its name to the field.See Bayesian inference for examples.[edit] Nonmonotonic logic[1]A relation of inference is monotonic if the addition of premises does not undermine previously reached conclusions; otherwise the relation is nonmonotonic. Deductive inference, is monotonic: if a conclusion is reached on the basis of a certain set of premises, then that conclusion still holds if more premises are added.By contrast, everyday reasoning is mostly nonmonotonic because it involves risk: we jump to conclusions from deductively insufficient premises. We know when it is worth or even necessary (e.g. in medical diagnosis) to take the risk. Yet we are also aware that such inference is defeasible—that new information may undermine old conclusions. Various kinds of defeasible but remarkably successful inference have traditionally captured the attention of philosophers (theories of induction, Peirce’s theory of abduction, inference to the best explanation, etc.). More recently logicians have begun to approach the phenomenon from a formal point of view. The result is a large body of theories at the interface of philosophy, logic and artificial intelligence.[edit] See alsoReasoningo Abductive reasoningo Deductive reasoningo Inductive reasoningo Retroductive reasoning ?EntailmentAnalogyAxiomBayesian inferenceBusiness ruleBusiness rules engine Fuzzy logic Immediate inferenceInference engineInquiryLogicLogic of informationLogical assertionLogical graphNonmonotonic logicRule of inferenceList of rules of inference Theorem Expert systemSherlock Holmes。
人工智能第一章86
Chapter 1: Introduction
n Logical Approach to AI
Chapter 2: Declarative Knowledge Chapter 3: Inference Chapter 4. Resolution Chapter 5. Resolution Strategies
C与A或B之间通过计算机终端会话; n 测试方式:主持人向A和B提出相同的智能性问题,
但不能询问物理特征。A和B在回答问题时,应尽量 让主持人相信自己是 “人”。 n 测试结论:如果不管如何更换被测试者A和主持人C, 主持人能正确分辨出人和机器的概率都小于50%, 则认为该机器具有了智能。
PPT文档演模板
n 人工智能原理。石纯一等,清华大学出版社,1993 n 人工智能:一种现代方法(英文影印,第二版)。
Russell, s. and Norvig, P.,清华大学出版社,2006.5 n 人工智能。史忠值等,国防工业出版社,2007
PPT文档演模板
人工智能第一章86
Evaluation
n Previous Courses:Discrete Mathematics; Artificial Intelligence
1950年英国数学家图灵(Turing)在
“计算机器与智力”一文中提出
图灵1912年生于英国伦敦,1954年死于英国的曼彻斯特,他是计算机 逻辑的奠基者,许多人工智能的重要方法也源自于这位伟大的科学家。 他对计算机的重要贡献在于他提出的有限状态自动机也就是图灵机的 概念,对于人工智能,它提出了重要的衡量标准"图灵测试",如果有 机器能够通过图灵测试,那他就是一个完全意义上的智能机,和人没 有区别了。他杰出的贡献使他成为计算机界的第一人,现在人们为了 纪念这位伟大的科学家将计算机界的最高奖定名为"图灵奖"。
人工智能导论 第02讲-逻辑 Lecture 02 - Logic
• A sentence (Well formed formula) is defined as follows:
• A symbol is a sentence • If S is a sentence, then ¬S is a sentence • If S is a sentence, then (S) is a sentence • If S and T are sentences, then S∧T, S∨T, S →T and S⇔T are sentences • A sentence results from a finite number of the above rules
• ¬, not
[negation]
• ⇒/→, imply
[implication/conditional]
• ⇔, is equivalent [biconditional]
• Literal: atomic sentence or negated atomic sentence (P, ¬P)
• Propositional logic is the simplest foundation and fine for some AI problems
• First-order logic (FOL) is much more expressive as a KR language and more commonly used in AI
• Propositional symbols: P, Q, … (atomic sentences)
• Wrapping parentheses: (…)
m9-inference
• it seems obvious that Evil(John), but propositionalization produces lots of facts such as Greedy(Richard) that are irrelevant •
• With p k-ary predicates and n constants, there are p· k instantiations. n •
• •
The new KB is propositionalized: proposition symbols are
King(John), Greedy(John), Evil(John), King(Richard), etc.
Reduction contd.
• Every FOL KB can be propositionalized so as to preserve entailment •
Unification
• We can get the inference immediately if we can find a substitution θ such that King(x) and Greedy(x) match King(John) and Greedy(y) • θ = {x/John,y/John} works
Reduction contd.
Theorem: Herbrand (1930). If a sentence α is entailed by an FOL KB, it is entailed by a finite subset of the propositionalized KB Idea: For n = 0 to ∞ do
Logic Inference课件
– substitution subst(θ, Pi) = subst(θ, Qi) for i=1,...,N – Derive new sentence: subst(θ, R)
• Substitutions
– subst(θ, α) denotes the result of applying a set of substitutions defined by θ to the sentence α
– If a sentence is true given a set of axioms, there is a procedure that will determine this
– If the sentence is false, then there is no guarantee that a procedure will ever determine this—i.e., it may never halt
Automating FOL inference with Generalized Modus Ponens
Automated inference for FOL
• Automated inference using FOL is harder than PL
– Variables can potentially take on an infinite number of possible values from their domains
– A substitution list θ = {v1/t1, v2/t2, ..., vn/tn} means to replace all occurrences of variable symbol vi by term ti
First-Order-Logic
– (unlike most data structures and databases) –
☺ Propositional logic is compositional: ☺
– meaning of B1,1 P1,2 is derived from meaning of B1,1 and of P1,2 –
First-Order Logic
Chapter 8
2021/4/4
1
Pros and cons of propositional
logic
☺ Propositional logic is declarative
☺ Propositional logic allows partial/disjunctive/negated information
What you should know in Ch. 7
• Pros & Cons of Prop. Logics • Logical connectives rules • Ability to manipulate logic statements into
08.First order logic
5
First-order logic
采用命题逻辑的基础—陈述式、上下文无关和合成语义,并 借用自然语言的思想。 Whereas propositional logic assumes the world contains facts, first-order logic (like natural language) assumes the world contains
• • • • • • • Constants/常量 Predicates/谓词 Functions/函数 Variables/变量 Connectives/连接词 Equality/等词 Quantifiers/量词 KingJohn, 2, USTC,... Brother, >,... Sqrt, LeftLegOf,... x, y, a, b,... , , , , = ,
时序逻辑 Temporal logic
概率逻辑 Probability theory 模糊逻辑 Fuzzy logic
事实、对象、关系、时间
事实 事实、真实度∈[0,1]
真/假/未知
信度∈[0,1] 已知区间值
7
一阶逻辑的模型: Example
8
Syntax of FOL: Basic elements
First-Order Logic
Chapter 8
Last week
Logical agents apply inference to a knowledge base to derive new information and make decisions
Basic concepts of logic: — syntax(语法): formal structure of sentences — semantics(语义): truth of sentences wrt models — entailment(蕴涵): necessary truth of one sentence given another — inference(推理): deriving sentences from other sentences — soundness(可靠性): derivations produce only entailed sentences — completeness(完备性): derivations can produce all entailed sentences Forward, backward chaining are linear-time, complete for Horn clauses Resolution is complete for propositional logic
等价关系与序关系ppt课件
划分(举例,续)
~Ai Ai
18
等价关系与划分是一一对应的
定理28: 设A, 则 (1) R是A上等价关系 A/R是A的划分 (2) A是A的划分 RA是A上等价关系,其中
xRAy z(zA xz yz) RA称为由划分A 所定义的等价关系(同块关系). #
x
8
定理27(证明(2))
(2) xRy [x]R=[y]R ; 证明: (2) 只需证明[x]R[y]R和[x]R[y]R. () z, z[x]RxRy zRxxRy
zRy z[y]R . [x]R[y]R. () 同理可证. z
x
y
9
定理27(证明(3))
k 0
k 0
23
Bell数表
n
Bn
1
1
2
2
3
5
4
15
5
52
6
203
7
877
n
Bn
8
4,140
9
21,147
10
115,975
11
678,570
12
4,213,597
13
27,644,437
14
190,899,322
24
第二类Stirling数表
n\k 0 1 2 3
4
5
6
7
89
01
1 01
2 01 1
subset
number)
: n
k
把n个对象分成k个非空子集的分法个数.
递推公式:
n 0
0,
n 1
1,
n 2
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
• Things become more complicated when there are universal quantifiers (x)(y) eats(x, y) |= (x)eats(x, Stuff) ??? (x)(y) eats(x, y) |= eats(Ziggy, Stuff) ??? – Introduce a new function food_sk(x) to stand for y because that y depends on x (x)(y) eats(x, y) |– (x)eats(x, food_sk(x)) (x)(y) eats(x, y) |– eats(Ziggy, food_sk(Ziggy)) – What exactly the function food_sk(.) does is unknown, except that it takes x as its argument
Inference in First Order Logic
Some material adopted from notes by Tim Finin,
Andreas Geyer-Schulz, and Chuck Dyer
Inference Rules for FOL
• Inference rules for PL apply to FOL as well (Modus Ponens, AndIntroduction, And-Elimination, etc.)
• The process of existential elimination is called “Skolemization”, and the new, unique constants (e.g., Stuff) and functions (e.g., food_sk(.)) are called skolem constants and skolem functions
P(c), Q(c) |– P(c) ^ Q(c)
(by and-introduction)
(x)(P(x) ^ Q(x)) => R(x)
|– (P(c) ^ Q(c)) => R(c) (by universal-elimination)
P(c) ^ Q(c), (P(c) ^ Q(c)) => R(c) |– R(c) (by modus ponens)
Generalized Modus Ponens (GMP)
• Combines And-Introduction, Universal-Elimination, and Modus Ponens
• Ex: P(c), Q(c), (x)(P(x) ^ Q(x)) => R(x) |– R(c)
• All occurrences of a quantified variable must be instantiated to (or substituted by) the same constant.
• From (x) P(x) infer P(c), i.e., (x) P(x) |= P(c), where c is a new
nt symbol,
– All we know is there must be some constant that makes this true, so we can introduce a brand new one to stand in for that constant, even though we don’t know exactly what that constant refer to.
constant or a ground function). • Example: (x) eats(Ziggy, x) |– eats(Ziggy, IceCream)
Existential Introduction P(c) |– (x) P(x)
• If P(c) is true, so is (x) P(x), i.e., P(c) |= (x) P(x)
• Resolution
– Clause form (CNF in FOL) – Unification (consistent variable substitution) – Refutation resolution (proof by contradiction)
Universal Elimination (x) P(x) |– P(c).
• New (sound) inference rules for use with quantifiers:
– Universal Elimination – Existential Introduction – Existential Elimination – Generalized Modus Ponens (GMP)
• Replace all instances of the given constant symbol by the same new variable symbol.
• Example eats(Ziggy, IceCream) |– (x) eats(Ziggy, x)
Existential Elimination
• If (x) P(x) is true, then P(c) is true for any constant c in the domain of x, i.e., (x) P(x) |= P(c).
• Replace all occurrences of x in the scope of x by the same ground term (a