算法

自动图算法
Uninformed Search Strategies

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)

Sometimes better than BFS: Uniform-Cost Search
Safer DFS: Depth-Limited Search
Best of both: Iterative-Deepening Search

Breadth-First search (BFS) 广度优先搜索 02a

python-BFS-graph
python-BFS-tree
GfG的教学

A,B,C,D,E,F,G,H,I(假设每层节点从左到右访问)。
First-in First-out!
(FIFO) Queue

Depth-First search (DFS) 深度优先搜索 02a

python -DFS-graph
python-DFS-tree
GfG的教学
A,B,D,E,I,C,F,G,H.(假设先走子节点的的左侧)

Last-In First-Out
Stack (LIFO Queue)

Depth-Limited Search (DLS) 深度限制搜索 02b

DLS 是一种折衷方案,提供了广度优先搜索的一些好处,同时减少了内存成本
从level 0 开始计数。

Iterative Deepening Search (IDS) 迭代深化搜索 02b

基于深度优先搜索
Iterative Deepening Depth First Search(IDDFS)

Uniform-Cost Search (UCS) 统一成本搜索 02b


思路:始终扩展最浅的路径,即具有最低(总体)路径成本的后继
python-ucs-graph

比较 03a

Difference between Informed and Uninformed Search

How to formalise a problem for search

  1. Determine the relevant problem-solving knowledge
  2. Find a suitable state representation
  3. Define the initial state and the goal state(s)
  4. Define a transition model (also called successor function, or operators)

How to search

  • Starting from the initial state, apply the successor function to reveal successor states
  • Generate a search tree by expanding these states, and discovering their respective
    successors, etc.
  • Perform a goal test for every node expanded
  • Keep track of nodes waiting to get expanded (open list), and nodes already
    expanded along the current path (the prospective solution).
    In graph search, we also keep a separate record of nodes already visited.

heuristic 03b

如何为问题提出启发式方法?

  • Abstract from solution details
  • Find a common property that can be quantified (not necessarily exact)
  • Relax constraints (e.g., time needed, or accuracy of a solution)
  • Keep the goal(s) in mind
  • Not too complex – a heuristic should be cheap to compute and add little overhead

特质:

  • Admissibility

它不会高估沿当前路径通过 n 到达目标状态的实际成本。
it does not overestimate the true path cost from any given node.
An admissible heuristic will ensure optimality when we use tree search.
The heuristic given here is admissible because it does not overestimate the true path cost from any given node.

  • Consistency

从 n 达到目标的估计成本不大于步骤成本 n
图搜索的时候不一致
A consistent heuristic will ensure optimality when we use graph search.
The heuristic given here is admissible because it does not overestimate the true path cost from any given node.
However, it is not consistent, because the heuristic overestimates at node B, because the step cost from B to C plus the estimated cost from C to the goal is less than the estimate from B.


考试时,一张图让我学会一致性和可接受性

启发式算法例子:
Greedy Best-First Search

In greedy best-first search, the evaluation function contains a simple heuristic f(n) = h(n) that estimates the cost of the
cheapest path from the state at the current node to the node that has the goal state (straight-line distance).

Tree vs. Graph Search 03b

A*启发式算法 04a

不断寻找最小点
use an evaluation function f(n) = g(n) + h(n)
简书教程

Lowest Evaluation Result First: g(n) + h(n)
Corresponding ADT: Priority Queue优先队列

 Complete for finite spaces & positive path cost
 Optimal: will always expand the currently best path
 Optimally efficient (There is no other search algorithm that is guaranteed to expand fewer nodes and still find an optimal solution)
 Space and time complexity depend on the heuristic chosen but can still be high in worst case, similar to BFS: bd

minimax 05ab

Adversarial Search
基于博弈论

  • MAX: The player who starts (plays to win, pursues the path of highest utility)
  • MIN: Player who follows (plays to minimise the other player’s result)

类似于DFS
High utility function results serve MAX, low values are good for MIN
添加链接描述
这个比较易懂

alpha beta 06ab

基于minimax加了alpha和beta
解和minimax一样
添加链接描述
添加链接描述

真的很抽象的一些理论知识

Epistemology 知识 07a

知识是什么:

  • Explicit knowledge
    that which is expressed in language
  • Implicit knowledge
    that which can be expressed in language but is often not
  • Tacit knowledge
    that which cannot be expressed in language because it is personal / embodied

知识从何而来:
经验主义:Acquired by learning from sensory stimulation: Empiricism(Connectionist AI)
理论主义: Acquired by reasoning: Rationalism(classic AI)

Deduction 07a

 A premise in relation to a well-defined domain, class, or condition.
 A premise about a concrete instance, hypothesis, or condition.
 A conclusion based on the premises, i.e. the instance belonging to the domain, inheriting the characteristics defined for the class, or satisfying the condition.

向前推理和向后推理 07a

 Forward reasoning:
Search connects initial fact(s) with desired conclusion(s).
States are combinations of facts and each rule is a method for generating a single successor (i.e., it defines a single transition).
 Backward reasoning:
Search connects a final conclusion with one or more initial facts.
States are combinations of required conclusions and the transitions are defined by the rules. Each rule is a method for generating further `required conclusions’ from existing required conclusions.

What are the states?
→Forward reasoning: Facts
→Backward reasoning: Goal facts (Antecedents of conditions)

How does the successor function work?
→Forward reasoning: Application of rules to yield more facts
→Backward reasoning: Application of rules to yield more sub-goals

通常来说,搜索树在向前推理中是OR树,因为each node in a search tree branches according to the alternative transitions for a given state 。但是,in backwards reasoning, each node branches in two different ways because
we are usually compounding sub-goals that all need to be fulfilled for a solution.The branches from any node in a backward reasoning tree divide up into groups of logical AND branches, and each group presents an alternative chain (OR sub-tree).因此,反向推理中的搜索树是一个 AND/OR 树。

  • Forward Reasoning 应用
    Computational scientific discovery(e.g., chemical synthesis, simulating scientific discoveries from the past)
  • Backward Reasoning 应用
    Repair assistance systems, Medical diagnosis support, Disaster recovery systems

Knowledge-based Systems / Expert Systems 07b

The combination of rule base and inference method can be viewed as a representation of knowledge for the domain, called a knowledge base.

A system which employs knowledge represented in this way is called a knowledge-based system or expert system.

An ideal knowledge representation

  • Is expressive and concise
  • Is unambiguous and context-independent
  • Supports the creation of new knowledge from that which already exists

Propositional Logic 命题逻辑 07b

Formal methods of knowledge representation are also known as logics.

A formal logic is a system (often: symbols, grammar) for representing and analyzing statements in a precise, unambiguous way.

A logic usually has

  • Sentences in a language, are expressions constructed according to formal rules.
  • A semantics that identifies the formal meaning of the sentences.
  • An inference method allows new sentences to be generated from existing sentences.

Propositions: P, Q, R, S, etc.
Connectives: AND ( ∧), OR ( ∨), NOT ( ¬ ), IMPLIES ( ⇒)
Constants: True ( T ), False ( F )
Others: parentheses for grouping expressions together

真值表:


Semantics:
This is called a referential semantics. The way one fact follows another should be mirrored by the way one sentence is entailed by another.

Predicate calculus / First-Order Logic (FOL) 谓词逻辑 07b

Move from simple propositions to predicates
Representation of properties, e.g., mortal(person)
Representation of relationships, e.g., likes(fred, sausages)
Existentially quantified variables, e.g., ∃x (There exists an x such that…)存在量化的变量
Universally quantified variables, e.g., ∀x (For all x we can say that…)普通量化的变量

∧ Conjunction (AND)
⇒ IMPLICATION
∀ Universal quantifier (“For all elements X…”)
∃ Existential quantifier (“Some X…”, “There is at least one X…”)



I wear a hat if it’s sunny:
sunny→ hat
I wear a hat only if it’s sunny:
hat → sunny
p only if q: p→ q
关于if和only if

other logics 07b

命题逻辑和谓词逻辑的区别

  • Fuzzy logic: 模糊逻辑
    Evaluation in terms of degree of set membership.
  • Modal logic: 模态逻辑
    Evaluation in terms of a propositional attitude, such as belief.
    Good for representing sentences containing “should”, “must”, etc.
  • Temporal logic: 时间逻辑
    Evaluation in terms of truth at a particular moment in time. (“before”, “after”, etc.).

The Frame Problem 07b

句子表示的一个基本困难是框架问题。
这会影响所有种类的知识表示,但在根据真理进行评估并且使用规则来定义行为结果的情况下尤为明显。
在形式逻辑中,很难跟踪世界上事物的状态
Technical solutions:
指定影响和非影响
For a complete state representation, we would have to specify not only the effects of an action on the environment, but also the non-effects of that action (everything that does not change) in so-called frame axioms
但是这对于较大的框架是不可行的,所以框架问题的实际解决方案通常会尝试添加更通用的变量或谓词,以注意何时发生变化或可能发生变化

Semantic Networks语义网 08a

语义网络利用表示知识的有向图的结构
在语义网络中,节点代表概念,节点之间的联系表示概念之间的关系
非标准化语义网络缺乏统一的构建规则因此存在一致性和偏见问题
语义网络支持有限推理(例如,集合、继承、归纳)
传播激活搜索(如 BFS)效率低下,不受知识指导

非常抽象的一些影响


在线手动绘制语义网络

frame 08a

Elements of a frame

  • Unique identifier
  • Relationships to other frames (e.g., conceptual inheritance)
  • Requirements (Properties that must be true for this frame to apply to some thing)
  • Procedural instructions (How we might use the thing described here, if applicable)
  • Default properties of instances (established upon creation)
  • Special properties of instances (elicited upon creation)

features:

  • Allows easy and straightforward notation of abstraction in typical situations
  • Descriptions can consider context: assumptions, expectations, or exceptions
  • Instances can be distinguished from classes (instance_of, subclass_of)
  • Less ambiguous than network diagrams as the structure is well-defined
  • However, for the same reason, other relationships cannot be represented as easily
  • Representation of time can be difficult

script 08a

Basics

  • Effective representation of procedural knowledge in stereotypical situations
  • Capture contextual knowledge for natural language understanding
  • Enable a system to resolve ambiguity in language
  • Very similar to frames, but time-ordered
  • Transitions between script-frames supposed to resemble mental and physical
    transitions in real life situations

Elements of a Script

  • Entry conditions determine the activation of a script
  • Results are facts that become true when a script has finished running
  • Props are things that are needed to run the script – they illustrate the context to
    which the script applies
  • Roles are the individual behaviours of the actors involved in a situation
  • Scenes are used to decompose a script into different temporal episodes

Ontologies本体论 08b

formal categorisation and description of a body of knowledge

Ontology Components组件

  • Classes (abstract or specific concepts)
  • Individuals are Instances
  • Properties of classes and individuals
  • Relations between concepts
  • Functions (computation of values)
  • Axioms (logical restrictions)

Ontology Mapping映射

  • Different domains or tasks usually have different ontologies (vocabulary, structure)
  • Aligning ontologies allows communication between different systems
  • Matching ontologies may even allow us to reason over one thing considering the vocabulary and structure of another (analogical reasoning)
  • potentially awesome!
  • New challenges: Matching ontologies not just within the same but in between different languages

Ontology Problems

  • There is no single correct way of describing something! Consider different languages/cultures/concepts
  • Languages are not static (new/old words & meanings)
  • Hence, there is always a chance to have inconsistencies or limitations
  • Not all knowledge can be represented as classes and relations; and some knowledge is extremely difficult to communicate:
  • Knowledge Acquisition Bottleneck
  • Finding the balance between clarity and extensibility is a challenge

How to specify Ontologies

  • Conceptual data model: Resource Description Framework (RDF)
    Set of W3C specifications
    Based around resources (identifiable data / knowledge)
  • Any of the available languages, like
    RDF-Schema (simple, extension of RDF vocabulary)
    Web Ontology language (RDF-compatible, suited for reasoning)
    and more…

Ontology Specification 规范

  • Resource Description Framework (RDF)
    A family of specifications, issued by the W3C consortium.
    Triple-notation (Subject-Predicate-Object)主谓宾
    Serialisable data (e.g., XML, JSON, etc.)
    Data can be queried (SPARQL)
  • Web Ontology Language (OWL)
    Family of specification languages for building ontologies (feed into RDF)
    Stronger suited for reasoning
    OWL comes in different flavours:
    OWL Lite: Frame-based, supports related reasoning
    OWL DL: Predicate-Logic-based, also known as Description Logics
    OWL Full: Extension of RDF to support additional abstraction

Perspectives on Uncertainty对不确定性的看法 09a

不确定性对模糊/不精确知识 Related to vague or imprecise knowledge

不确定性和概率之间的联系:事件频率

Fuzzy Sets and Fuzzy Logic 模糊集和模糊逻辑 09a

  • Fuzzy sets are non-probabilistic representations of uncertainty
  • Fuzzy sets present an extension of classical set theory (classical sets are called crisp sets in Fuzzy set theory)
  • Fuzzy logic describes operations over fuzzy sets
  • Fuzzy logic is a superset of Boolean logic. Whereas the latter only knows True and False, in fuzzy logic everything is expressed to “a matter of degree”.

Membership functions specify the degree to which something belongs to a fuzzy set,它们代表可能性的分布而不是概率
建一个模糊关联矩阵

Applications
 Antilock Braking system (ABS)
 Washing machines (weight / intensity)
 Expert Systems

Information Theory ,Bayesian 09b

不确定性可以用熵来衡量
不确定性是熵分布平坦度的函数
In Bayesian reasoning, probabilities can help establish an agent’s state of belief

Knowledge Reasoning 复习相关推荐

  1. 论文小综 | Using External Knowledge on VQA

    本文转载自公众号:浙大KG. 本文作者:陈卓,浙江大学在读博士,主要研究方向为图神经网络和知识图谱表示学习 我们生活在一个多模态的世界中.视觉的捕捉与理解,知识的学习与感知,语言的交流与表达,诸多方面 ...

  2. VQA+Visual Reasoning SOTA探索

    2014-2019年VQA论文:https://heary.cn/posts/VQA-%E8%BF%91%E4%BA%94%E5%B9%B4%E8%A7%86%E8%A7%89%E9%97%AE%E7 ...

  3. 借鉴人类,跨越模态 | NLP和预训练模型未来的发展之路

    [专栏:研究思路]近来,超大规模预训练模型快速发展,在自然语言处理领域引起热议.基于深度学习的自然语言 处理技术正沿着"极大数据.极大模型.极大算力"的轨道,"无所不用其 ...

  4. 吴琦:AI研究一路走到“黑”, 从VQA到VLN

    作者 | 吴琦,阿德莱德大学助理教授 本文作者为阿德莱德大学助理教授吴琦,他详细介绍有关从VQA到VLN的详细内容: VLN之来龙去脉篇 VLN之任务数据篇 VLN之方法创新篇 VLN之未来思考篇 V ...

  5. 贾珈:自然语言处理中9个不可不知的研究热点(附视频)

    2020 年 5 月 23 日上午,在中国中文信息学会青年工作委员会主办.北京智源人工智能研究院和美团点评承办的"ACL-IJCAI-SIGIR 顶级会议论文报告会(AIS 2020)&qu ...

  6. NeurIPS 2019 | 17篇论文,详解图的机器学习趋势

    来源:深度学习自然语言处理 本文约7400字,建议阅读10+分钟 可高深,也可接地气. 本文来自德国Fraunhofer协会IAIS研究所的研究科学家Michael Galkin,他的研究课题主要是把 ...

  7. 第二章 知识图谱——机器大脑中的知识库

    原文: http://book.thunlp.org/knowledge_graph/ 第二章 知识图谱--机器大脑中的知识库 Published by  liuzy on July 6, 2015 ...

  8. 视频问答兴起,多跳问答热度衰退,92篇论文看智能问答的发展趋势

    星标/置顶小屋,带你解锁 最萌最前沿的NLP.搜索与推荐技术 文 | 舒意恒(南京大学硕士生,知识图谱方向) 编 |  北大小才女小轶 2019年的时候,舒意恒Y.Shu整理了一份<2019年, ...

  9. 会议交流 | IJCKG 2021 日程表(北京时间)

    IJCKG 2021 Program (All times Beijing Time) December 6th Opening (19:00–19:15) Chair: Oscar Corcho K ...

  10. 会议交流 | IJCKG 2021:Keynotes released!欢迎注册参会

    IJCKG 2021: The 10th International Joint Conference on Knowledge Graphs December 6-8, 2021 Online 国际 ...

最新文章

  1. CentOS7 下面安装Mysql MMM
  2. mysql 手机号 字段_2021-01-06:mysql中,我存十亿个手机号码,考虑存储空间和查询效率,用什么类型的字段去存?...
  3. 时间序列模型(ARIMA模型)
  4. U-Mail邮件服务器树状通讯录实现智能化应用
  5. mysql size_mysql fetch size 相关问题
  6. How to connect iOS simulator to Chrome for debugging
  7. Flowable学习笔记(一、入门)
  8. ode45 matlab 出错,请问,Matlab用ODE45解微分方程,出错
  9. mysql 主从 均衡_Mysql主从复制
  10. java设计模式面试,深入分析
  11. 怎么卸载php xshell,xftp5如何卸载?xshell5卸载不了怎么办?
  12. 基础树状数组和线段树
  13. 图像风格化——感知损失(perceptual loss)(2016)
  14. 白苹果修复_ReiBoot Pro——iOS系统修复软件
  15. Poco脚本的点击位置与点击偏移
  16. python查看迭代器可迭代次数
  17. TexMaker(Latex编辑器)软件的“文献引用”操作:Xelatex方式运行的操作方法
  18. Docker以及DockerHub的使用
  19. onchange、onpropertychange、oninput和onblur
  20. 美加净与大白兔跨界合作奶糖味润唇膏成社交网络爆款

热门文章

  1. 创新实训(6)——有关博客的摘要抽取的算法实现(TextRank)
  2. 对Volterra级数公式的理解-1
  3. MySQL- 使用PreparedStatement接口,实现数据表的更新,查询操作
  4. oracle定时执行某个任务,oracle 里面定时执行任务,比如存储过程内容等
  5. 关于ARM公司的cortex系列
  6. windows下choco 安装helm
  7. db2 cmd命令操作
  8. 剑芒罗曼史2解图片程序
  9. h3c服务器登录密码修改,H3C交换机配置ssh密码验证登录方式
  10. 缺省值及属性(Python)