Artificial Intelligence 简明教程

Artificial Intelligence - Quick Guide

Artificial Intelligence - Overview

自从电脑或机器被发明以来,它们执行各种任务的能力呈指数增长。人类在不同的工作域、越来越快的速度和不断减小的体积方面发展了计算机系统的功能。

Since the invention of computers or machines, their capability to perform various tasks went on growing exponentially. Humans have developed the power of computer systems in terms of their diverse working domains, their increasing speed, and reducing size with respect to time.

计算机科学的一个分支,名为人工智能,致力于创造出像人类一样聪明的计算机或机器。

A branch of Computer Science named Artificial Intelligence pursues creating the computers or machines as intelligent as human beings.

What is Artificial Intelligence?

根据人工智能之父约翰·麦卡锡的说法,它就是“制造智能机器的科学与工程,特别是智能计算机程序”。

According to the father of Artificial Intelligence, John McCarthy, it is “The science and engineering of making intelligent machines, especially intelligent computer programs”.

人工智能是一种 making a computer, a computer-controlled robot, or a software think intelligently 的方式,它以与人类聪明才智相似的思维方式进行。

Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a software think intelligently, in the similar manner the intelligent humans think.

人工智能是通过研究人脑的思考方式和人类在试图解决问题的过程中学习、决策和工作的来实现的,然后使用这项研究的结果作为开发智能软件和系统基础。

AI is accomplished by studying how human brain thinks, and how humans learn, decide, and work while trying to solve a problem, and then using the outcomes of this study as a basis of developing intelligent software and systems.

Philosophy of AI

在利用计算机系统功能的同时,人类的好奇心让他开始思考,“机器是否能像人类一样思考和行为?”

While exploiting the power of the computer systems, the curiosity of human, lead him to wonder, “Can a machine think and behave like humans do?”

因此,人工智能的开发始于在机器中创造出与我们在人类中发现和重视的类似智能的意图。

Thus, the development of AI started with the intention of creating similar intelligence in machines that we find and regard high in humans.

Goals of AI

  1. To Create Expert Systems − The systems which exhibit intelligent behavior, learn, demonstrate, explain, and advice its users.

  2. To Implement Human Intelligence in Machines − Creating systems that understand, think, learn, and behave like humans.

What Contributes to AI?

人工智能是一门基于计算机科学、生物学、心理学、语言学、数学和工程等学科的科学和技术。人工智能的一个主要推动力在于开发与人类智能相关的计算机功能,例如推理、学习和解决问题。

Artificial intelligence is a science and technology based on disciplines such as Computer Science, Biology, Psychology, Linguistics, Mathematics, and Engineering. A major thrust of AI is in the development of computer functions associated with human intelligence, such as reasoning, learning, and problem solving.

在以下领域中,一个或多个领域有助于构建一个智能系统。

Out of the following areas, one or multiple areas can contribute to build an intelligent system.

components of ai

Programming Without and With AI

有无人工智能的编程在以下方面有所不同−

The programming without and with AI is different in following ways −

Programming Without AI

Programming With AI

A computer program without AI can answer the specific questions it is meant to solve.

A computer program with AI can answer the generic questions it is meant to solve.

Modification in the program leads to change in its structure.

AI programs can absorb new modifications by putting highly independent pieces of information together. Hence you can modify even a minute piece of information of program without affecting its structure.

Modification is not quick and easy. It may lead to affecting the program adversely.

Quick and Easy program modification.

What is AI Technique?

在现实世界中,知识有一些不受欢迎的属性:

In the real world, the knowledge has some unwelcomed properties −

  1. Its volume is huge, next to unimaginable.

  2. It is not well-organized or well-formatted.

  3. It keeps changing constantly.

人工智能技术是一种高效组织和使用知识的方法,方法如下:

AI Technique is a manner to organize and use the knowledge efficiently in such a way that −

  1. It should be perceivable by the people who provide it.

  2. It should be easily modifiable to correct errors.

  3. It should be useful in many situations though it is incomplete or inaccurate.

人工智能技术提高了其所配备的复杂程序的执行速度。

AI techniques elevate the speed of execution of the complex program it is equipped with.

Applications of AI

人工智能在各个领域都占据主导地位,例如:

AI has been dominant in various fields such as −

  1. Gaming − AI plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc., where machine can think of large number of possible positions based on heuristic knowledge.

  2. Natural Language Processing − It is possible to interact with the computer that understands natural language spoken by humans.

  3. Expert Systems − There are some applications which integrate machine, software, and special information to impart reasoning and advising. They provide explanation and advice to the users.

  4. Vision Systems − These systems understand, interpret, and comprehend visual input on the computer. For example, A spying aeroplane takes photographs, which are used to figure out spatial information or map of the areas. Doctors use clinical expert system to diagnose the patient. Police use computer software that can recognize the face of criminal with the stored portrait made by forensic artist.

  5. Speech Recognition − Some intelligent systems are capable of hearing and comprehending the language in terms of sentences and their meanings while a human talks to it. It can handle different accents, slang words, noise in the background, change in human’s noise due to cold, etc.

  6. Handwriting Recognition − The handwriting recognition software reads the text written on paper by a pen or on screen by a stylus. It can recognize the shapes of the letters and convert it into editable text.

  7. Intelligent Robots − Robots are able to perform the tasks given by a human. They have sensors to detect physical data from the real world such as light, heat, temperature, movement, sound, bump, and pressure. They have efficient processors, multiple sensors and huge memory, to exhibit intelligence. In addition, they are capable of learning from their mistakes and they can adapt to the new environment.

History of AI

以下是人工智能在 20 世纪的历史:

Here is the history of AI during 20th century −

Year

Milestone / Innovation

1923

Karel Čapek play named “Rossum’s Universal Robots” (RUR) opens in London, first use of the word "robot" in English.

1943

Foundations for neural networks laid.

1945

Isaac Asimov, a Columbia University alumni, coined the term Robotics.

1950

Alan Turing introduced Turing Test for evaluation of intelligence and published Computing Machinery and Intelligence. Claude Shannon published Detailed Analysis of Chess Playing as a search.

1956

John McCarthy coined the term Artificial Intelligence. Demonstration of the first running AI program at Carnegie Mellon University.

1958

John McCarthy invents LISP programming language for AI.

1964

Danny Bobrow’s dissertation at MIT showed that computers can understand natural language well enough to solve algebra word problems correctly.

1965

Joseph Weizenbaum at MIT built ELIZA, an interactive problem that carries on a dialogue in English.

1969

Scientists at Stanford Research Institute Developed Shakey, a robot, equipped with locomotion, perception, and problem solving.

1973

The Assembly Robotics group at Edinburgh University built Freddy, the Famous Scottish Robot, capable of using vision to locate and assemble models.

1979

The first computer-controlled autonomous vehicle, Stanford Cart, was built.

1985

Harold Cohen created and demonstrated the drawing program, Aaron.

1990

Major advances in all areas of AI − Significant demonstrations in machine learningCase-based reasoningMulti-agent planningSchedulingData mining, Web Crawlernatural language understanding and translationVision, Virtual RealityGames

1997

The Deep Blue Chess Program beats the then world chess champion, Garry Kasparov.

2000

Interactive robot pets become commercially available. MIT displays Kismet, a robot with a face that expresses emotions. The robot Nomad explores remote regions of Antarctica and locates meteorites.

Artificial Intelligence - Intelligent Systems

在研究人工智能时,你需要知道什么是智能。本章涵盖了智能的理念、类型和构成要素。

While studying artificially intelligence, you need to know what intelligence is. This chapter covers Idea of intelligence, types, and components of intelligence.

What is Intelligence?

一个系统计算、推理、感知关系和类比、从经验中学习、存储和从记忆中检索信息、解决问题、理解复杂思想、流利地使用自然语言、分类、概括和适应新情况的能力。

The ability of a system to calculate, reason, perceive relationships and analogies, learn from experience, store and retrieve information from memory, solve problems, comprehend complex ideas, use natural language fluently, classify, generalize, and adapt new situations.

Types of Intelligence

正如美国发展心理学家 Howard Gardner 所描述的,可以分为多种类型−

As described by Howard Gardner, an American developmental psychologist, the Intelligence comes in multifold −

Intelligence

Description

Example

Linguistic intelligence

The ability to speak, recognize, and use mechanisms of phonology (speech sounds), syntax (grammar), and semantics (meaning).

Narrators, Orators

Musical intelligence

The ability to create, communicate with, and understand meanings made of sound, understanding of pitch, rhythm.

Musicians, Singers, Composers

Logical-mathematical intelligence

The ability of use and understand relationships in the absence of action or objects. Understanding complex and abstract ideas.

Mathematicians, Scientists

Spatial intelligence

The ability to perceive visual or spatial information, change it, and re-create visual images without reference to the objects, construct 3D images, and to move and rotate them.

Map readers, Astronauts, Physicists

Bodily-Kinesthetic intelligence

The ability to use complete or part of the body to solve problems or fashion products, control over fine and coarse motor skills, and manipulate the objects.

Players, Dancers

Intra-personal intelligence

The ability to distinguish among one’s own feelings, intentions, and motivations.

Gautam Buddhha

Interpersonal intelligence

The ability to recognize and make distinctions among other people’s feelings, beliefs, and intentions.

Mass Communicators, Interviewers

您可以说,当一台机器或系统至少配备了一种至多全部智能时,它就是 artificially intelligent

You can say a machine or a system is artificially intelligent when it is equipped with at least one and at most all intelligences in it.

What is Intelligence Composed of?

智能是无形的。它由以下部分组成:

The intelligence is intangible. It is composed of −

  1. Reasoning

  2. Learning

  3. Problem Solving

  4. Perception

  5. Linguistic Intelligence

intelligence

让我们简单了解一下所有组成部分:

Let us go through all the components briefly −

  1. Reasoning − It is the set of processes that enables us to provide basis for judgement, making decisions, and prediction. There are broadly two types −

Inductive Reasoning

Deductive Reasoning

It conducts specific observations to makes broad general statements.

It starts with a general statement and examines the possibilities to reach a specific, logical conclusion.

Even if all of the premises are true in a statement, inductive reasoning allows for the conclusion to be false.

If something is true of a class of things in general, it is also true for all members of that class.

Example − "Nita is a teacher. Nita is studious. Therefore, All teachers are studious."

Example − "All women of age above 60 years are grandmothers. Shalini is 65 years. Therefore, Shalini is a grandmother."

  1. Learning − It is the activity of gaining knowledge or skill by studying, practising, being taught, or experiencing something. Learning enhances the awareness of the subjects of the study. The ability of learning is possessed by humans, some animals, and AI-enabled systems. Learning is categorized as − Auditory Learning − It is learning by listening and hearing. For example, students listening to recorded audio lectures. Episodic Learning − To learn by remembering sequences of events that one has witnessed or experienced. This is linear and orderly. Motor Learning − It is learning by precise movement of muscles. For example, picking objects, Writing, etc. Observational Learning − To learn by watching and imitating others. For example, child tries to learn by mimicking her parent. Perceptual Learning − It is learning to recognize stimuli that one has seen before. For example, identifying and classifying objects and situations. Relational Learning − It involves learning to differentiate among various stimuli on the basis of relational properties, rather than absolute properties. For Example, Adding ‘little less’ salt at the time of cooking potatoes that came up salty last time, when cooked with adding say a tablespoon of salt. Spatial Learning − It is learning through visual stimuli such as images, colors, maps, etc. For Example, A person can create roadmap in mind before actually following the road. Stimulus-Response Learning − It is learning to perform a particular behavior when a certain stimulus is present. For example, a dog raises its ear on hearing doorbell.

  2. Problem Solving − It is the process in which one perceives and tries to arrive at a desired solution from a present situation by taking some path, which is blocked by known or unknown hurdles. Problem solving also includes decision making, which is the process of selecting the best suitable alternative out of multiple alternatives to reach the desired goal are available.

  3. Perception − It is the process of acquiring, interpreting, selecting, and organizing sensory information. Perception presumes sensing. In humans, perception is aided by sensory organs. In the domain of AI, perception mechanism puts the data acquired by the sensors together in a meaningful manner.

  4. Linguistic Intelligence − It is one’s ability to use, comprehend, speak, and write the verbal and written language. It is important in interpersonal communication.

Difference between Human and Machine Intelligence

  1. Humans perceive by patterns whereas the machines perceive by set of rules and data.

  2. Humans store and recall information by patterns, machines do it by searching algorithms. For example, the number 40404040 is easy to remember, store, and recall as its pattern is simple.

  3. Humans can figure out the complete object even if some part of it is missing or distorted; whereas the machines cannot do it correctly.

Artificial Intelligence - Research Areas

人工智能领域在深度和广度方面很大。进行当中,我们研究了人工智能领域中普遍的繁荣的研究范围——

The domain of artificial intelligence is huge in breadth and width. While proceeding, we consider the broadly common and prospering research areas in the domain of AI −

research areas of ai

Speech and Voice Recognition

这两个术语在机器人技术、专家系统和自然语言处理中很常见。虽然这些术语可以互换使用,但它们的目的是不同的。

These both terms are common in robotics, expert systems and natural language processing. Though these terms are used interchangeably, their objectives are different.

Speech Recognition

Voice Recognition

The speech recognition aims at understanding and comprehending WHAT was spoken.

The objective of voice recognition is to recognize WHO is speaking.

It is used in hand-free computing, map, or menu navigation.

It is used to identify a person by analysing its tone, voice pitch, and accent, etc.

Machine does not need training for Speech Recognition as it is not speaker dependent.

This recognition system needs training as it is person oriented.

Speaker independent Speech Recognition systems are difficult to develop.

Speaker dependent Speech Recognition systems are comparatively easy to develop.

Working of Speech and Voice Recognition Systems

通过麦克风说出用户输入的内容,转到系统的声卡。转换器将模拟信号转化为语音处理的等效数字信号。数据库用于比较声音模式以识别单词。最后,逆向反馈被提供给数据库。

The user input spoken at a microphone goes to sound card of the system. The converter turns the analog signal into equivalent digital signal for the speech processing. The database is used to compare the sound patterns to recognize the words. Finally, a reverse feedback is given to the database.

此源语言文本成为翻译引擎的输入,翻译引擎将其转换为目标语言文本。它们是由交互式 GUI、大型词汇数据库等提供支持的。

This source-language text becomes input to the Translation Engine, which converts it to the target language text. They are supported with interactive GUI, large database of vocabulary, etc.

Real Life Applications of Research Areas

在人工智能为普通人日常生活提供服务的应用程序中,存在很多领域——

There is a large array of applications where AI is serving common people in their day-to-day lives −

Sr.No.

Research Areas

Real Life Application

1

Expert Systems Examples − Flight-tracking systems, Clinical systems.

2

Natural Language Processing Examples: Google Now feature, speech recognition, Automatic voice output.

3

Neural Networks Examples − Pattern recognition systems such as face recognition, character recognition, handwriting recognition.

4

Robotics Examples − Industrial robots for moving, spraying, painting, precision checking, drilling, cleaning, coating, carving, etc.

5

Fuzzy Logic Systems Examples − Consumer electronics, automobiles, etc.

Task Classification of AI

人工智能领域分为以下内容:

The domain of AI is classified into Formal tasks, Mundane tasks, and Expert tasks.

task domains of ai

Task Domains of Artificial Intelligence

Mundane (Ordinary) Tasks

Formal Tasks

Expert Tasks

Perception Computer VisionSpeech, Voice

MathematicsGeometryLogicIntegration and Differentiation

EngineeringFault FindingManufacturingMonitoring

Natural Language Processing UnderstandingLanguage GenerationLanguage Translation

Games GoChess (Deep Blue)Ckeckers

Scientific Analysis

Common Sense

Verification

Financial Analysis

Reasoning

Theorem Proving

Medical Diagnosis

Planing

Creativity

Robotics Locomotive

人类从出生开始学习 mundane (ordinary) tasks 。他们通过感知、说话、使用语言和运动来学习。他们先学习基础任务,再学习专业任务。

Humans learn mundane (ordinary) tasks since their birth. They learn by perception, speaking, using language, and locomotives. They learn Formal Tasks and Expert Tasks later, in that order.

对于人类来说,最容易学习的是平凡的任务。在尝试让机器执行平凡的任务之前,平凡的任务也被认为容易学习。早期,所有的 AI 工作都集中在平凡的任务域。

For humans, the mundane tasks are easiest to learn. The same was considered true before trying to implement mundane tasks in machines. Earlier, all work of AI was concentrated in the mundane task domain.

后来,事实证明,对于平凡的任务,机器需要更多的知识、更复杂的知识表示和更复杂的算法。这就是为什么 why AI work is more prospering in the Expert Tasks domain 现在需要专家知识,但是专业任务域不需要常识,更容易表示和处理。

Later, it turned out that the machine requires more knowledge, complex knowledge representation, and complicated algorithms for handling mundane tasks. This is the reason why AI work is more prospering in the Expert Tasks domain now, as the expert task domain needs expert knowledge without common sense, which can be easier to represent and handle.

AI - Agents & Environments

人工智能系统由一个代理及其环境组成。代理在自身环境中行为。该环境中可能包含其他代理。

An AI system is composed of an agent and its environment. The agents act in their environment. The environment may contain other agents.

What are Agent and Environment?

agent 是能够通过 sensors 感知自身环境并通过 effectors. 对自身环境执行操作的任何事物。

An agent is anything that can perceive its environment through sensors and acts upon that environment through effectors.

  1. A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to the sensors, and other organs such as hands, legs, mouth, for effectors.

  2. A robotic agent replaces cameras and infrared range finders for the sensors, and various motors and actuators for effectors.

  3. A software agent has encoded bit strings as its programs and actions.

agent environment

Agent Terminology

  1. Performance Measure of Agent − It is the criteria, which determines how successful an agent is.

  2. Behavior of Agent − It is the action that agent performs after any given sequence of percepts.

  3. Percept − It is agent’s perceptual inputs at a given instance.

  4. Percept Sequence − It is the history of all that an agent has perceived till date.

  5. Agent Function − It is a map from the precept sequence to an action.

Rationality

理性的状态便是合理的、明智的,并且具有良好的判断力。

Rationality is nothing but status of being reasonable, sensible, and having good sense of judgment.

理性涉及预期行为和结果,具体取决于代理感知的内容。执行操作以获取有用信息是理性行为的重要组成部分。

Rationality is concerned with expected actions and results depending upon what the agent has perceived. Performing actions with the aim of obtaining useful information is an important part of rationality.

What is Ideal Rational Agent?

理想理性代理能够执行预期行为以根据以下内容最大程度地提升其绩效衡量:

An ideal rational agent is the one, which is capable of doing expected actions to maximize its performance measure, on the basis of −

  1. Its percept sequence

  2. Its built-in knowledge base

代理的理性性取决于以下因素:

Rationality of an agent depends on the following −

  1. The performance measures, which determine the degree of success.

  2. Agent’s Percept Sequence till now.

  3. The agent’s prior knowledge about the environment.

  4. The actions that the agent can carry out.

理性代理始终执行正确操作,其中正确操作意味着代理在给定的感知序列中取得最大成功率的操作。代理解决的问题以绩效衡量、环境、执行器和传感器 (PEAS) 为特征。

A rational agent always performs right action, where the right action means the action that causes the agent to be most successful in the given percept sequence. The problem the agent solves is characterized by Performance Measure, Environment, Actuators, and Sensors (PEAS).

The Structure of Intelligent Agents

代理的结构可视为:

Agent’s structure can be viewed as −

  1. Agent = Architecture + Agent Program

  2. Architecture = the machinery that an agent executes on.

  3. Agent Program = an implementation of an agent function.

Simple Reflex Agents

  1. They choose actions only based on the current percept.

  2. They are rational only if a correct decision is made only on the basis of current precept.

  3. Their environment is completely observable.

Condition-Action Rule - 这是将状态(条件)映射到操作的规则。

Condition-Action Rule − It is a rule that maps a state (condition) to an action.

simple reflex agent

Model Based Reflex Agents

他们运用世界模型来选择自己的行为。他们维持一个内部状态。

They use a model of the world to choose their actions. They maintain an internal state.

Model −关于“世界上事情发生方式”的知识。

Model − knowledge about “how the things happen in the world”.

Internal State −它是当前状态中不可观察方面的表示形式,取决于概念历史。

Internal State − It is a representation of unobserved aspects of current state depending on percept history.

Updating the state requires the information about −

Updating the state requires the information about −

  1. How the world evolves.

  2. How the agent’s actions affect the world.

model based reflex agents

Goal Based Agents

他们选择行为以便实现目标。基于目标的方法比反射代理更灵活,因为支持决策的知识建模明确,因此允许修改。

They choose their actions in order to achieve goals. Goal-based approach is more flexible than reflex agent since the knowledge supporting a decision is explicitly modeled, thereby allowing for modifications.

Goal −它是预期情况的描述。

Goal − It is the description of desirable situations.

goal based agents

Utility Based Agents

他们基于每个状态的偏好(效用)选择行为。

They choose actions based on a preference (utility) for each state.

目标不充分,何时 −

Goals are inadequate when −

  1. There are conflicting goals, out of which only few can be achieved.

  2. Goals have some uncertainty of being achieved and you need to weigh likelihood of success against the importance of a goal.

utility based agents

The Nature of Environments

一些程序完全在 artificial environment 运行,限于键盘输入、数据库、计算机文件系统和屏幕上的字符输出。

Some programs operate in the entirely artificial environment confined to keyboard input, database, computer file systems and character output on a screen.

相反,一些软件代理(软件机器人或软机器人)存在于丰富、无限的软机器人域中。模拟器具有 very detailed, complex environment 。软件代理需要实时从一系列长动作中进行选择。一个软机器人设计用于扫描客户的在线偏好,向客户展示有趣物品,它在 realartificial 环境中工作。

In contrast, some software agents (software robots or softbots) exist in rich, unlimited softbots domains. The simulator has a very detailed, complex environment. The software agent needs to choose from a long array of actions in real time. A softbot designed to scan the online preferences of the customer and show interesting items to the customer works in the real as well as an artificial environment.

最著名的 artificial environmentTuring Test environment ,其中一个真实代理和一个人工智能代理在平等的条件下被测试。这是一个非常具有挑战性的环境,因为软件代理很难像人类一样表现出色。

The most famous artificial environment is the Turing Test environment, in which one real and other artificial agents are tested on equal ground. This is a very challenging environment as it is highly difficult for a software agent to perform as well as a human.

Turing Test

系统智能行为的成功可以用图灵测试来衡量。

The success of an intelligent behavior of a system can be measured with Turing Test.

两名人员和一台待评估的机器参加测试。在这两个人中,一个人扮演测试者。他们每个人都坐在不同的房间里。测试人员不知道谁是机器,谁是人类。他通过输入问题并将其发送给这两个智能体来进行询问,然后他接收输入的响应。

Two persons and a machine to be evaluated participate in the test. Out of the two persons, one plays the role of the tester. Each of them sits in different rooms. The tester is unaware of who is machine and who is a human. He interrogates the questions by typing and sending them to both intelligences, to which he receives typed responses.

此测试旨在愚弄测试人员。如果测试人员无法根据人类响应来确定机器的响应,则认为该机器是智能的。

This test aims at fooling the tester. If the tester fails to determine machine’s response from the human response, then the machine is said to be intelligent.

Properties of Environment

环境具有多重属性−

The environment has multifold properties −

  1. Discrete / Continuous − If there are a limited number of distinct, clearly defined, states of the environment, the environment is discrete (For example, chess); otherwise it is continuous (For example, driving).

  2. Observable / Partially Observable − If it is possible to determine the complete state of the environment at each time point from the percepts it is observable; otherwise it is only partially observable.

  3. Static / Dynamic − If the environment does not change while an agent is acting, then it is static; otherwise it is dynamic.

  4. Single agent / Multiple agents − The environment may contain other agents which may be of the same or different kind as that of the agent.

  5. Accessible / Inaccessible − If the agent’s sensory apparatus can have access to the complete state of the environment, then the environment is accessible to that agent.

  6. Deterministic / Non-deterministic − If the next state of the environment is completely determined by the current state and the actions of the agent, then the environment is deterministic; otherwise it is non-deterministic.

  7. Episodic / Non-episodic − In an episodic environment, each episode consists of the agent perceiving and then acting. The quality of its action depends just on the episode itself. Subsequent episodes do not depend on the actions in the previous episodes. Episodic environments are much simpler because the agent does not need to think ahead.

搜索是人工智能中解决问题的一种通用技术。它包括一些单人游戏,如棋牌类游戏、数独、填字游戏等。搜索算法可以帮助你在这些游戏中搜索特定位置。

Searching is the universal technique of problem solving in AI. There are some single-player games such as tile games, Sudoku, crossword, etc. The search algorithms help you to search for a particular position in such games.

Single Agent Pathfinding Problems

3X3 八方棋、4X4 十五方棋和 5X5 二十四方棋之类的游戏是单代理寻径难题。它们包含一个带空格的瓷砖矩阵。玩家需要通过将瓷砖垂直或水平地滑入空格中来排列瓷砖,以达到实现某个目标的目的。

The games such as 3X3 eight-tile, 4X4 fifteen-tile, and 5X5 twenty four tile puzzles are single-agent-path-finding challenges. They consist of a matrix of tiles with a blank tile. The player is required to arrange the tiles by sliding a tile either vertically or horizontally into a blank space with the aim of accomplishing some objective.

单代理寻径问题的其他示例包括旅行商问题、魔方和定理证明。

The other examples of single agent pathfinding problems are Travelling Salesman Problem, Rubik’s Cube, and Theorem Proving.

Search Terminology

  1. Problem Space − It is the environment in which the search takes place. (A set of states and set of operators to change those states)

  2. Problem Instance − It is Initial state + Goal state.

  3. Problem Space Graph − It represents problem state. States are shown by nodes and operators are shown by edges.

  4. Depth of a problem − Length of a shortest path or shortest sequence of operators from Initial State to goal state.

  5. Space Complexity − The maximum number of nodes that are stored in memory.

  6. Time Complexity − The maximum number of nodes that are created.

  7. Admissibility − A property of an algorithm to always find an optimal solution.

  8. Branching Factor − The average number of child nodes in the problem space graph.

  9. Depth − Length of the shortest path from initial state to goal state.

Brute-Force Search Strategies

它们非常简单,因为它们不需要任何特定领域的知识。它们在可能的状态较少时工作正常。

They are most simple, as they do not need any domain-specific knowledge. They work fine with small number of possible states.

要求 −

Requirements −

  1. State description

  2. A set of valid operators

  3. Initial state

  4. Goal state description

它从根节点开始,首先探索相邻节点,然后转向下一级邻域。它一次生成一棵树,直到找到解决方案。它可以使用 FIFO 队列数据结构实现。该方法提供了解决方案的最短路径。

It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time until the solution is found. It can be implemented using FIFO queue data structure. This method provides shortest path to the solution.

如果 branching factor (给定节点的平均子节点数)= b 且深度 = d,则第 d 级节点数 = bd。

If branching factor (average number of child nodes for a given node) = b and depth = d, then number of nodes at level d = bd.

在最坏情况下创建的节点总数为 b + b2 + b3 + … + bd。

The total no of nodes created in worst case is b + b2 + b3 + … + bd.

Disadvantage − 由于每级节点都将用于创建下一级节点,因此会占用很多内存空间。存储节点所需的空间呈指数级增长。

Disadvantage − Since each level of nodes is saved for creating next one, it consumes a lot of memory space. Space requirement to store nodes is exponential.

其复杂度取决于节点数目。它可以检查重复节点。

Its complexity depends on the number of nodes. It can check duplicate nodes.

breadth first search

它通过 LIFO 栈数据结构在递归中实现。它创建与广度优先方法相同的一组节点,只是顺序不同。

It is implemented in recursion with LIFO stack data structure. It creates the same set of nodes as Breadth-First method, only in the different order.

由于每个迭代中从根节点到叶节点都会存储在单一路径上的节点,因此存储节点所需的空间是线性的。当分支系数为 b、深度为 m 时,存储空间为 bm。

As the nodes on the single path are stored in each iteration from root to leaf node, the space requirement to store nodes is linear. With branching factor b and depth as m, the storage space is bm.

Disadvantage − 该算法可能不会终止,而会在一条路径上无限延续。解决此问题的方法是选择截止深度。如果理想的截止深度为 d,而所选的截止深度小于 d,则此算法可能会失败。如果所选的截止深度大于 d,则执行时间会增加。

Disadvantage − This algorithm may not terminate and go on infinitely on one path. The solution to this issue is to choose a cut-off depth. If the ideal cut-off is d, and if chosen cut-off is lesser than d, then this algorithm may fail. If chosen cut-off is more than d, then execution time increases.

其复杂度取决于路径数目。它不能检查重复节点。

Its complexity depends on the number of paths. It cannot check duplicate nodes.

depth first search

它从初始状态向前搜索,从目标状态向后搜索,直至两者相遇以识别一个共有状态。

It searches forward from initial state and backward from goal state till both meet to identify a common state.

从初始状态的路径与从目标状态的反向路径连接。每项搜索只进行到总路径的一半。

The path from initial state is concatenated with the inverse path from the goal state. Each search is done only up to half of the total path.

按照到达节点的路径成本递增进行排序。它始终展开成本最低的节点。如果每个转换都有相同的成本,则它与广度优先搜索相同。

Sorting is done in increasing cost of the path to a node. It always expands the least cost node. It is identical to Breadth First search if each transition has the same cost.

它按照成本递增的顺序探索路径。

It explores paths in the increasing order of cost.

Disadvantage − 可能会存在多条成本 ≤ C* 的长路径。一致代价搜索必须探索所有这些路径。

Disadvantage − There can be multiple long paths with the cost ≤ C*. Uniform Cost search must explore them all.

它执行到第 1 级的深度优先搜索,然后重新开始,执行到第 2 级的完整深度优先搜索,并一直持续到找到解决方案。

It performs depth-first search to level 1, starts over, executes a complete depth-first search to level 2, and continues in such way till the solution is found.

在生成所有较低级别的节点之前,它永远不会创建节点。它只保存一个节点栈。该算法在深度处找到解决方案 d 时结束。在深度 d 处创建的节点数为 bd,在深度 d-1 处创建的节点数为 bd-1。

It never creates a node until all lower nodes are generated. It only saves a stack of nodes. The algorithm ends when it finds a solution at depth d. The number of nodes created at depth d is bd and at depth d-1 is bd-1.

interactive deepening df search

Comparison of Various Algorithms Complexities

让我们基于各种标准查看算法的性能 −

Let us see the performance of algorithms based on various criteria −

Criterion

Breadth First

Depth First

Bidirectional

Uniform Cost

Interactive Deepening

Time

bd

bm

bd/2

bd

bd

Space

bd

bm

bd/2

bd

bd

Optimality

Yes

No

Yes

Yes

Yes

Completeness

Yes

No

Yes

Yes

Yes

Informed (Heuristic) Search Strategies

要解决具有大量可能状态的大型问题,需要增加特定于问题的信息,以提高搜索算法的效率。

To solve large problems with large number of possible states, problem-specific knowledge needs to be added to increase the efficiency of search algorithms.

Heuristic Evaluation Functions

它们计算两个状态之间最佳路径的成本。通过计算每个图块从其目标状态所进行的移动数量,并为所有图块添加这些移动数量,即可计算出滑动拼图游戏的试探函数。

They calculate the cost of optimal path between two states. A heuristic function for sliding-tiles games is computed by counting number of moves that each tile makes from its goal state and adding these number of moves for all tiles.

它按照试探值来展开节点。它创建两个列表:已展开节点的封闭列表和已创建但未展开节点的开放列表。

It expands nodes in the order of their heuristic values. It creates two lists, a closed list for the already expanded nodes and an open list for the created but unexpanded nodes.

在每个迭代中,展开一个具有最小试探值的节点,创建并置于封闭列表中其所有子节点。然后,将试探函数应用到子节点,并根据它们的试探值将它们置于开放列表中。较短的路径将会保存,而较长的路径则会被丢弃。

In each iteration, a node with a minimum heuristic value is expanded, all its child nodes are created and placed in the closed list. Then, the heuristic function is applied to the child nodes and they are placed in the open list according to their heuristic value. The shorter paths are saved and the longer ones are disposed.

这是 A* 搜索中最著名的形式。它避免展开已经很昂贵的路径,但会首先展开最有希望的路径。

It is best-known form of Best First search. It avoids expanding paths that are already expensive, but expands most promising paths first.

f(n) = g(n) + h(n),其中

f(n) = g(n) + h(n), where

  1. g(n) the cost (so far) to reach the node

  2. h(n) estimated cost to get from the node to the goal

  3. f(n) estimated total cost of path through n to goal. It is implemented using priority queue by increasing f(n).

它展开被估计为最接近目标的节点。它基于 f(n) = h(n) 来展开节点。它使用优先级队列来实现它。

It expands the node that is estimated to be closest to goal. It expands nodes based on f(n) = h(n). It is implemented using priority queue.

Disadvantage − 它可能会陷入循环。它不是最优的。

Disadvantage − It can get stuck in loops. It is not optimal.

Local Search Algorithms

它们从可能的解决方案开始,然后移至相邻的解决方案。即使在它们结束之前在任何时候中断,它们也可以返回一个有效解决方案。

They start from a prospective solution and then move to a neighboring solution. They can return a valid solution even if it is interrupted at any time before they end.

它是一种迭代算法,从问题的任意解决方案开始,并尝试通过逐个增量地更改解决方案的一个元素来找到一个更好的解决方案。如果该更改产生了更好的解决方案,则将增量更改视为一个新的解决方案。此过程将重复进行,直到不再有进一步的改进。

It is an iterative algorithm that starts with an arbitrary solution to a problem and attempts to find a better solution by changing a single element of the solution incrementally. If the change produces a better solution, an incremental change is taken as a new solution. This process is repeated until there are no further improvements.

函数 Hill-Climbing (问题),返回一个局部最大状态。

function Hill-Climbing (problem), returns a state that is a local maximum.

inputs: problem, a problem
local variables: current, a node
                 neighbor, a node
current <-Make_Node(Initial-State[problem])
loop
   do neighbor <- a highest_valued successor of current
      if Value[neighbor] ≤ Value[current] then
      return State[current]
      current <- neighbor

end

Disadvantage − 此算法既不完整,也不是最优的。

Disadvantage − This algorithm is neither complete, nor optimal.

在此算法中,它在任何给定时间都保存 k 个状态。在开始时,这些状态是随机生成的。这些 k 个状态的后继状态是借助于目标函数计算得出的。如果这些后继状态中的任何一个是目标函数的最大值,则算法停止。

In this algorithm, it holds k number of states at any given time. At the start, these states are generated randomly. The successors of these k states are computed with the help of objective function. If any of these successors is the maximum value of the objective function, then the algorithm stops.

否则(最初的 k 个状态和 k 个状态的后继状态 = 2k)个状态被置于一个池中。然后,对池进行按数字排序。最高 k 个状态被选择为新的初始状态。此过程一直持续到达到最大值。

Otherwise the (initial k states and k number of successors of the states = 2k) states are placed in a pool. The pool is then sorted numerically. The highest k states are selected as new initial states. This process continues until a maximum value is reached.

函数 BeamSearch(问题,k),返回一个解决方案状态。

function BeamSearch( problem, k), returns a solution state.

start with k randomly generated states
loop
   generate all successors of all k states
   if any of the states = solution, then return the state
   else select the k best successors
end

Simulated Annealing

退火是加热和冷却金属以更改其内部结构,从而改变其物理特性的过程。当金属冷却时,其新的结构会凝结,该金属会保持其新得到的特性。在模拟退火过程中,温度保持可变。

Annealing is the process of heating and cooling a metal to change its internal structure for modifying its physical properties. When the metal cools, its new structure is seized, and the metal retains its newly obtained properties. In simulated annealing process, the temperature is kept variable.

我们最初将温度设置得很高,然后随着算法的进行,我们允许它慢慢“冷却”。在温度高时,算法通常会接受较差的解决方案。

We initially set the temperature high and then allow it to ‘cool' slowly as the algorithm proceeds. When the temperature is high, the algorithm is allowed to accept worse solutions with high frequency.

开始

Start

  1. Initialize k = 0; L = integer number of variables;

  2. From i → j, search the performance difference Δ.

  3. If Δ ⇐ 0 then accept else if exp(-Δ/T(k)) > random(0,1) then accept;

  4. Repeat steps 1 and 2 for L(k) steps.

  5. k = k + 1;

对步骤 1 至步骤 4 执行重复操作,直至达到标准。

Repeat steps 1 through 4 till the criteria is met.

结束

End

Travelling Salesman Problem

在此算法中,目标是找到一条低成本的路线,从一个城市开始,途中依次访问所有城市,并在同一起始城市结束。

In this algorithm, the objective is to find a low-cost tour that starts from a city, visits all cities en-route exactly once and ends at the same starting city.

Start
   Find out all (n -1)! Possible solutions, where n is the total number of cities.
   Determine the minimum cost by finding out the cost of each of these (n -1)! solutions.
   Finally, keep the one with the minimum cost.
end
travelling salesman

Artificial Intelligence - Fuzzy Logic Systems

模糊逻辑系统(FLS)根据不完整、模棱两可、扭曲或不准确(模糊)的输入生成可接受但明确的输出。

Fuzzy Logic Systems (FLS) produce acceptable but definite output in response to incomplete, ambiguous, distorted, or inaccurate (fuzzy) input.

What is Fuzzy Logic?

模糊逻辑(FL)是一种类似于人类推理的推理方法。FL 的方法模仿了人类的决策方式,其中涉及 YES 和 NO 数字值之间的所有中间可能性。

Fuzzy Logic (FL) is a method of reasoning that resembles human reasoning. The approach of FL imitates the way of decision making in humans that involves all intermediate possibilities between digital values YES and NO.

计算机可以理解的传统逻辑块获取精确的输入,并生成明确的 TRUE 或 FALSE 输出,这相当于人类的 YES 或 NO。

The conventional logic block that a computer can understand takes precise input and produces a definite output as TRUE or FALSE, which is equivalent to human’s YES or NO.

模糊逻辑的发明者 Lotfi Zadeh 观察到,与计算机不同,人类决策包括 YES 和 NO 之间的可能性范围,例如 -

The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike computers, the human decision making includes a range of possibilities between YES and NO, such as −

CERTAINLY YES

POSSIBLY YES

CANNOT SAY

POSSIBLY NO

CERTAINLY NO

模糊逻辑基于输入的可能性水平来实现明确的输出。

The fuzzy logic works on the levels of possibilities of input to achieve the definite output.

Implementation

  1. It can be implemented in systems with various sizes and capabilities ranging from small micro-controllers to large, networked, workstation-based control systems.

  2. It can be implemented in hardware, software, or a combination of both.

Why Fuzzy Logic?

模糊逻辑对于商业和实际用途很有用。

Fuzzy logic is useful for commercial and practical purposes.

  1. It can control machines and consumer products.

  2. It may not give accurate reasoning, but acceptable reasoning.

  3. Fuzzy logic helps to deal with the uncertainty in engineering.

Fuzzy Logic Systems Architecture

它有四个主要部分,如下图所示 -

It has four main parts as shown −

  1. Fuzzification Module − It transforms the system inputs, which are crisp numbers, into fuzzy sets. It splits the input signal into five steps such as −

LP

x is Large Positive

MP

x is Medium Positive

S

x is Small

MN

x is Medium Negative

LN

x is Large Negative

  1. Knowledge Base − It stores IF-THEN rules provided by experts.

  2. Inference Engine − It simulates the human reasoning process by making fuzzy inference on the inputs and IF-THEN rules.

  3. Defuzzification Module − It transforms the fuzzy set obtained by the inference engine into a crisp value.

fuzzylogic system

membership functions work on 模糊变量集。

The membership functions work on fuzzy sets of variables.

Membership Function

隶属度函数可以让您量化语言术语并在图形上表示模糊集合。在论域 X 上模糊集合 A 的一个 membership function 被定义为 μA:X → [0,1]。

Membership functions allow you to quantify linguistic term and represent a fuzzy set graphically. A membership function for a fuzzy set A on the universe of discourse X is defined as μA:X → [0,1].

在这里,X 的每个元素都被映射到 0 和 1 之间的一个值。它称为 membership valuedegree of membership 。它量化元素在 X 中对模糊集合 A 的隶属程度。

Here, each element of X is mapped to a value between 0 and 1. It is called membership value or degree of membership. It quantifies the degree of membership of the element in X to the fuzzy set A.

  1. x axis represents the universe of discourse.

  2. y axis represents the degrees of membership in the [0, 1] interval.

可能有适用于对数值模糊化的多个隶属度函数。使用简单的隶属度函数,因为使用复杂的函数并不会增加输出的精度。

There can be multiple membership functions applicable to fuzzify a numerical value. Simple membership functions are used as use of complex functions does not add more precision in the output.

LP, MP, S, MN,LN 的所有隶属度函数如下所示−

All membership functions for LP, MP, S, MN, and LN are shown as below −

membership functions

三角隶属度函数形状在各种其他隶属度函数形状中是最常见的,例如梯形、单例和高斯形状。

The triangular membership function shapes are most common among various other membership function shapes such as trapezoidal, singleton, and Gaussian.

在此,对 5 级模糊器的输入变化范围从 -10 伏特到 +10 伏特。因此相应的输出也发生变化。

Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the corresponding output also changes.

Example of a Fuzzy Logic System

让我们考虑一个采用 5 级模糊逻辑系统的空调系统。该系统通过比较室内温度和目标温度值来调节空调的温度。

Let us consider an air conditioning system with 5-level fuzzy logic system. This system adjusts the temperature of air conditioner by comparing the room temperature and the target temperature value.

fuzzylogic ac system

Algorithm

  1. Define linguistic Variables and terms (start)

  2. Construct membership functions for them. (start)

  3. Construct knowledge base of rules (start)

  4. Convert crisp data into fuzzy data sets using membership functions. (fuzzification)

  5. Evaluate rules in the rule base. (Inference Engine)

  6. Combine results from each rule. (Inference Engine)

  7. Convert output data into non-fuzzy values. (defuzzification)

Development

Step 1 − Define linguistic variables and terms

Step 1 − Define linguistic variables and terms

语言变量是以简单单词或句子形式输入和输出的变量。对于室温来说,冷、暖、热等是语言术语。

Linguistic variables are input and output variables in the form of simple words or sentences. For room temperature, cold, warm, hot, etc., are linguistic terms.

温度 (t) = {非常冷、冷、暖、非常暖、热}

Temperature (t) = {very-cold, cold, warm, very-warm, hot}

该集合的每个成员都是一个语言术语,并且可以覆盖整体温度值的一部分。

Every member of this set is a linguistic term and it can cover some portion of overall temperature values.

Step 2 − Construct membership functions for them

Step 2 − Construct membership functions for them

温度变量的隶属度函数如下所示 −

The membership functions of temperature variable are as shown −

membership function ac

Step3 − Construct knowledge base rules

Step3 − Construct knowledge base rules

针对空气调节系统期望提供的室温值与目标温度值创建矩阵。

Create a matrix of room temperature values versus target temperature values that an air conditioning system is expected to provide.

RoomTemp. /Target

Very_Cold

Cold

Warm

Hot

Very_Hot

Very_Cold

No_Change

Heat

Heat

Heat

Heat

Cold

Cool

No_Change

Heat

Heat

Heat

Warm

Cool

Cool

No_Change

Heat

Heat

Hot

Cool

Cool

Cool

No_Change

Heat

Very_Hot

Cool

Cool

Cool

Cool

No_Change

以 IF-THEN-ELSE 结构的形式,构建一组规则到知识库中。

Build a set of rules into the knowledge base in the form of IF-THEN-ELSE structures.

Sr. No.

Condition

Action

1

IF temperature=(Cold OR Very_Cold) AND target=Warm THEN

Heat

2

IF temperature=(Hot OR Very_Hot) AND target=Warm THEN

Cool

3

IF (temperature=Warm) AND (target=Warm) THEN

No_Change

Step 4 − Obtain fuzzy value

Step 4 − Obtain fuzzy value

模糊集运算执行规则评估。用于 OR 和 AND 的运算分别是 Max 和 Min。组合所有评估结果以形成最终结果。此结果是一个模糊值。

Fuzzy set operations perform evaluation of rules. The operations used for OR and AND are Max and Min respectively. Combine all results of evaluation to form a final result. This result is a fuzzy value.

Step 5 − Perform defuzzification

Step 5 − Perform defuzzification

然后根据输出变量的隶属度函数执行去模糊化。

Defuzzification is then performed according to membership function for output variable.

defuzzified value

Application Areas of Fuzzy Logic

模糊逻辑的关键应用领域如下 −

The key application areas of fuzzy logic are as given −

Automotive Systems

Automotive Systems

  1. Automatic Gearboxes

  2. Four-Wheel Steering

  3. Vehicle environment control

Consumer Electronic Goods

Consumer Electronic Goods

  1. Hi-Fi Systems

  2. Photocopiers

  3. Still and Video Cameras

  4. Television

Domestic Goods

Domestic Goods

  1. Microwave Ovens

  2. Refrigerators

  3. Toasters

  4. Vacuum Cleaners

  5. Washing Machines

Environment Control

Environment Control

  1. Air Conditioners/Dryers/Heaters

  2. Humidifiers

Advantages of FLSs

  1. Mathematical concepts within fuzzy reasoning are very simple.

  2. You can modify a FLS by just adding or deleting rules due to flexibility of fuzzy logic.

  3. Fuzzy logic Systems can take imprecise, distorted, noisy input information.

  4. FLSs are easy to construct and understand.

  5. Fuzzy logic is a solution to complex problems in all fields of life, including medicine, as it resembles human reasoning and decision making.

Disadvantages of FLSs

  1. There is no systematic approach to fuzzy system designing.

  2. They are understandable only when simple.

  3. They are suitable for the problems which do not need high accuracy.

AI - Natural Language Processing

自然语言处理 (NLP) 指的是使用自然语言(例如英语)与智能系统进行交流的人工智能方法。

Natural Language Processing (NLP) refers to AI method of communicating with an intelligent systems using a natural language such as English.

当您希望像机器人这样的智能系统根据您的说明执行操作时,当您希望从基于对话的临床专家系统中听到决策时,需要进行自然语言处理。

Processing of Natural Language is required when you want an intelligent system like robot to perform as per your instructions, when you want to hear decision from a dialogue based clinical expert system, etc.

NLP 领域涉及让计算机使用人类使用的自然语言执行有用的任务。NLP 系统的输入和输出可以是 −

The field of NLP involves making computers to perform useful tasks with the natural languages humans use. The input and output of an NLP system can be −

  1. Speech

  2. Written Text

Components of NLP

NLP 有两个部分,如下所示 −

There are two components of NLP as given −

Natural Language Understanding (NLU)

理解涉及以下任务 −

Understanding involves the following tasks −

  1. Mapping the given input in natural language into useful representations.

  2. Analyzing different aspects of the language.

Natural Language Generation (NLG)

它是以自然语言的形式生成有意义的短语和句子的过程。

It is the process of producing meaningful phrases and sentences in the form of natural language from some internal representation.

它涉及 −

It involves −

  1. Text planning − It includes retrieving the relevant content from knowledge base.

  2. Sentence planning − It includes choosing required words, forming meaningful phrases, setting tone of the sentence.

  3. Text Realization − It is mapping sentence plan into sentence structure.

NLU 难于 NLG。

The NLU is harder than NLG.

Difficulties in NLU

NL 拥有极丰富的形式和结构。

NL has an extremely rich form and structure.

它非常含糊。含糊可能存在多个层级 −

It is very ambiguous. There can be different levels of ambiguity −

  1. Lexical ambiguity − It is at very primitive level such as word-level.

  2. For example, treating the word “board” as noun or verb?

  3. Syntax Level ambiguity − A sentence can be parsed in different ways.

  4. For example, “He lifted the beetle with red cap.” − Did he use cap to lift the beetle or he lifted a beetle that had red cap?

  5. Referential ambiguity − Referring to something using pronouns. For example, Rima went to Gauri. She said, “I am tired.” − Exactly who is tired?

  6. One input can mean different meanings.

  7. Many inputs can mean the same thing.

NLP Terminology

  1. Phonology − It is study of organizing sound systematically.

  2. Morphology − It is a study of construction of words from primitive meaningful units.

  3. Morpheme − It is primitive unit of meaning in a language.

  4. Syntax − It refers to arranging words to make a sentence. It also involves determining the structural role of words in the sentence and in phrases.

  5. Semantics − It is concerned with the meaning of words and how to combine words into meaningful phrases and sentences.

  6. Pragmatics − It deals with using and understanding sentences in different situations and how the interpretation of the sentence is affected.

  7. Discourse − It deals with how the immediately preceding sentence can affect the interpretation of the next sentence.

  8. World Knowledge − It includes the general knowledge about the world.

Steps in NLP

共有五个常规步骤 −

There are general five steps −

  1. Lexical Analysis − It involves identifying and analyzing the structure of words. Lexicon of a language means the collection of words and phrases in a language. Lexical analysis is dividing the whole chunk of txt into paragraphs, sentences, and words.

  2. Syntactic Analysis (Parsing) − It involves analysis of words in the sentence for grammar and arranging words in a manner that shows the relationship among the words. The sentence such as “The school goes to boy” is rejected by English syntactic analyzer.

steps in nlp
  1. Semantic Analysis − It draws the exact meaning or the dictionary meaning from the text. The text is checked for meaningfulness. It is done by mapping syntactic structures and objects in the task domain. The semantic analyzer disregards sentence such as “hot ice-cream”.

  2. Discourse Integration − The meaning of any sentence depends upon the meaning of the sentence just before it. In addition, it also brings about the meaning of immediately succeeding sentence.

  3. Pragmatic Analysis − During this, what was said is re-interpreted on what it actually meant. It involves deriving those aspects of language which require real world knowledge.

Implementation Aspects of Syntactic Analysis

研究人员为语法分析开发了许多算法,但我们只考虑以下简单的方法 −

There are a number of algorithms researchers have developed for syntactic analysis, but we consider only the following simple methods −

  1. Context-Free Grammar

  2. Top-Down Parser

让我们详细了解它们 −

Let us see them in detail −

Context-Free Grammar

这是语法,它由重写规则一侧的一个符号组成的规则。我们来创建一个用于分析一个句子 − 的语法

It is the grammar that consists rules with a single symbol on the left-hand side of the rewrite rules. Let us create grammar to parse a sentence −

“The bird pecks the grains”

Articles (DET) − a | an | the

Articles (DET) − a | an | the

Nouns − bird | birds | grain | grains

Nouns − bird | birds | grain | grains

Noun Phrase (NP) − Article + Noun | Article + Adjective + Noun

Noun Phrase (NP) − Article + Noun | Article + Adjective + Noun

DET N | DET ADJ N

Verbs − pecks | pecking | pecked

Verbs − pecks | pecking | pecked

Verb Phrase (VP) − NP V | V NP

Verb Phrase (VP) − NP V | V NP

Adjectives (ADJ) − beautiful | small | chirping

Adjectives (ADJ) − beautiful | small | chirping

语法树将句子分解为结构化部分,以便计算机能够轻松地理解和处理它。为了让分析算法构建这个语法树,需要构建一组描述了哪些树结构是合法的重写规则。

The parse tree breaks down the sentence into structured parts so that the computer can easily understand and process it. In order for the parsing algorithm to construct this parse tree, a set of rewrite rules, which describe what tree structures are legal, need to be constructed.

这些规则表明树中的某个符号可以通过一系列其他符号进行扩展。根据一阶逻辑规则,如果存在两个字符串名词短语(NP)和动词短语(VP),那么由 NP 和 VP 组成的组合字符串就是句子。句子的重写规则如下 −

These rules say that a certain symbol may be expanded in the tree by a sequence of other symbols. According to first order logic rule, if there are two strings Noun Phrase (NP) and Verb Phrase (VP), then the string combined by NP followed by VP is a sentence. The rewrite rules for the sentence are as follows −

S → NP VP

S → NP VP

NP → DET N | DET ADJ N

NP → DET N | DET ADJ N

VP → V NP

VP → V NP

Lexocon −

Lexocon −

DET → a | the

ADJ → beautiful | perching

N → bird | birds | grain | grains

V → peck | pecks | pecking

语法树可以如以下所示创建 −

The parse tree can be created as shown −

nlp parsing tree

现在考虑一下以上的重写规则。既然 V 可以被“peck”或“pecks”替换,那么类似于“The bird peck the grains”这样的句子就会被错误地允许。例如,主谓一致错误会被批准为正确。

Now consider the above rewrite rules. Since V can be replaced by both, "peck" or "pecks", sentences such as "The bird peck the grains" can be wrongly permitted. i. e. the subject-verb agreement error is approved as correct.

Merit − 语法的最简单风格,因此被广泛使用。

Merit − The simplest style of grammar, therefore widely used one.

Demerits −

Demerits −

  1. They are not highly precise. For example, “The grains peck the bird”, is a syntactically correct according to parser, but even if it makes no sense, parser takes it as a correct sentence.

  2. To bring out high precision, multiple sets of grammar need to be prepared. It may require a completely different sets of rules for parsing singular and plural variations, passive sentences, etc., which can lead to creation of huge set of rules that are unmanageable.

Top-Down Parser

在此,解析器从 S 符号开始,并尝试将其重写为与输入句子中的单词类匹配的终端符号序列,直到它完全由终端符号组成为止。

Here, the parser starts with the S symbol and attempts to rewrite it into a sequence of terminal symbols that matches the classes of the words in the input sentence until it consists entirely of terminal symbols.

然后使用输入句子检查这些内容,看看是否匹配。如果没有,则使用不同的规则集再次重新开始该过程。重复此操作,直到找到描述句子结构的特定规则为止。

These are then checked with the input sentence to see if it matched. If not, the process is started over again with a different set of rules. This is repeated until a specific rule is found which describes the structure of the sentence.

Merit − 实现简单。

Merit − It is simple to implement.

Demerits −

Demerits −

  1. It is inefficient, as the search process has to be repeated if an error occurs.

  2. Slow speed of working.

Artificial Intelligence - Expert Systems

专家系统 (ES) 是人工智能的一个重要研究领域。它是由斯坦福大学计算机科学系的专家引入的。

Expert systems (ES) are one of the prominent research domains of AI. It is introduced by the researchers at Stanford University, Computer Science Department.

What are Expert Systems?

专家系统是一种计算机应用程序,旨在解决特定领域的复杂问题,达到非凡的人类智力和专业知识水平。

The expert systems are the computer applications developed to solve complex problems in a particular domain, at the level of extra-ordinary human intelligence and expertise.

Characteristics of Expert Systems

  1. High performance

  2. Understandable

  3. Reliable

  4. Highly responsive

Capabilities of Expert Systems

专家系统有能力 −

The expert systems are capable of −

  1. Advising

  2. Instructing and assisting human in decision making

  3. Demonstrating

  4. Deriving a solution

  5. Diagnosing

  6. Explaining

  7. Interpreting input

  8. Predicting results

  9. Justifying the conclusion

  10. Suggesting alternative options to a problem

它们无法 −

They are incapable of −

  1. Substituting human decision makers

  2. Possessing human capabilities

  3. Producing accurate output for inadequate knowledge base

  4. Refining their own knowledge

Components of Expert Systems

专家系统的组成如下:

The components of ES include −

  1. Knowledge Base

  2. Inference Engine

  3. User Interface

让我们逐一简要了解它们:

Let us see them one by one briefly −

expert system

Knowledge Base

包含领域特定且高质量的知识。

It contains domain-specific and high-quality knowledge.

获得智能需要知识。任何专家系统的成功在很大程度上取决于其高度准确和精确的知识集合。

Knowledge is required to exhibit intelligence. The success of any ES majorly depends upon the collection of highly accurate and precise knowledge.

What is Knowledge?

数据是事实的集合。信息被组织为与任务领域相关的数据和事实。 Data, information,past experience 结合在一起称为知识。

The data is collection of facts. The information is organized as data and facts about the task domain. Data, information, and past experience combined together are termed as knowledge.

Components of Knowledge Base

专家系统的知识库是事实和启发式知识的存储库。

The knowledge base of an ES is a store of both, factual and heuristic knowledge.

  1. Factual Knowledge − It is the information widely accepted by the Knowledge Engineers and scholars in the task domain.

  2. Heuristic Knowledge − It is about practice, accurate judgement, one’s ability of evaluation, and guessing.

Knowledge representation

这是用来组织和规范知识库中的知识的方法。它采用 IF-THEN-ELSE 规则的形式。

It is the method used to organize and formalize the knowledge in the knowledge base. It is in the form of IF-THEN-ELSE rules.

Knowledge Acquisition

任何专家系统的成功在很大程度上取决于存储在知识库中的信息的质量、完整性和准确性。

The success of any expert system majorly depends on the quality, completeness, and accuracy of the information stored in the knowledge base.

知识库由来自各个专家、学者和 Knowledge Engineers 的读物组成。知识工程师是一个具有同理心、快速学习和案例分析技能的人。

The knowledge base is formed by readings from various experts, scholars, and the Knowledge Engineers. The knowledge engineer is a person with the qualities of empathy, quick learning, and case analyzing skills.

他通过记录、访谈和观察专家在工作中的表现等方式从主题专家那里获取信息。然后,他以有意义的方式对信息进行分类和组织,采用 IF-THEN-ELSE 规则的形式,供干涉机器使用。知识工程师还监督专家系统的开发。

He acquires information from subject expert by recording, interviewing, and observing him at work, etc. He then categorizes and organizes the information in a meaningful way, in the form of IF-THEN-ELSE rules, to be used by interference machine. The knowledge engineer also monitors the development of the ES.

Inference Engine

推理引擎使用高效的过程和规则对于得到正确、无瑕疵的解决方案至关重要。

Use of efficient procedures and rules by the Inference Engine is essential in deducting a correct, flawless solution.

在基于知识的专家系统中,推理引擎获取知识库中的知识并对其进行操作以得出特定解决方案。

In case of knowledge-based ES, the Inference Engine acquires and manipulates the knowledge from the knowledge base to arrive at a particular solution.

在基于规则的专家系统中,它:

In case of rule based ES, it −

  1. Applies rules repeatedly to the facts, which are obtained from earlier rule application.

  2. Adds new knowledge into the knowledge base if required.

  3. Resolves rules conflict when multiple rules are applicable to a particular case.

为了推荐解决方案,推理引擎使用以下策略:

To recommend a solution, the Inference Engine uses the following strategies −

  1. Forward Chaining

  2. Backward Chaining

Forward Chaining

专家系统的一种策略是回答问题 “What can happen next?”

It is a strategy of an expert system to answer the question, “What can happen next?”

在此,推理引擎遵循条件和推导链,最终推导出结果。它考虑所有事实和规则,并在得出解决方案之前对它们进行排序。

Here, the Inference Engine follows the chain of conditions and derivations and finally deduces the outcome. It considers all the facts and rules, and sorts them before concluding to a solution.

该策略用于得出结论、结果或作用。例如,预测股票市场状态是利率变化的作用。

This strategy is followed for working on conclusion, result, or effect. For example, prediction of share market status as an effect of changes in interest rates.

forward chaining

Backward Chaining

专家系统采用此策略可以发现问题的答案 “Why this happened?”

With this strategy, an expert system finds out the answer to the question, “Why this happened?”

基于已经发生的情况,推理引擎尝试找出过去导致此结果的情况。该策略用于找出原因或理由。例如,人类血癌的诊断。

On the basis of what has already happened, the Inference Engine tries to find out which conditions could have happened in the past for this result. This strategy is followed for finding out cause or reason. For example, diagnosis of blood cancer in humans.

backward chaining

User Interface

用户界面提供了 ES 用户和 ES 本身之间的交互。它通常是自然语言处理,以便任务领域精通的用户使用。ES 的用户不必一定是人工智能专家。

User interface provides interaction between user of the ES and the ES itself. It is generally Natural Language Processing so as to be used by the user who is well-versed in the task domain. The user of the ES need not be necessarily an expert in Artificial Intelligence.

它解释了 ES 如何得出特定建议。说明可能以以下形式出现−

It explains how the ES has arrived at a particular recommendation. The explanation may appear in the following forms −

  1. Natural language displayed on screen.

  2. Verbal narrations in natural language.

  3. Listing of rule numbers displayed on the screen.

用户界面可以轻松追踪推论的可信度。

The user interface makes it easy to trace the credibility of the deductions.

Requirements of Efficient ES User Interface

  1. It should help users to accomplish their goals in shortest possible way.

  2. It should be designed to work for user’s existing or desired work practices.

  3. Its technology should be adaptable to user’s requirements; not the other way round.

  4. It should make efficient use of user input.

Expert Systems Limitations

没有一项技术可以提供简单而完整的解决方案。大型系统成本高昂,需要大量开发时间和计算机资源。ES 有其局限性,包括 −

No technology can offer easy and complete solution. Large systems are costly, require significant development time, and computer resources. ESs have their limitations which include −

  1. Limitations of the technology

  2. Difficult knowledge acquisition

  3. ES are difficult to maintain

  4. High development costs

Applications of Expert System

下表显示了可以应用 ES 的位置。

The following table shows where ES can be applied.

Application

Description

Design Domain

Camera lens design, automobile design.

Medical Domain

Diagnosis Systems to deduce cause of disease from observed data, conduction medical operations on humans.

Monitoring Systems

Comparing data continuously with observed system or with prescribed behavior such as leakage monitoring in long petroleum pipeline.

Process Control Systems

Controlling a physical process based on monitoring.

Knowledge Domain

Finding out faults in vehicles, computers.

Finance/Commerce

Detection of possible fraud, suspicious transactions, stock market trading, Airline scheduling, cargo scheduling.

Expert System Technology

有几项 ES 技术可供使用。专家系统技术包括 −

There are several levels of ES technologies available. Expert systems technologies include −

  1. Expert System Development Environment − The ES development environment includes hardware and tools. They are − Workstations, minicomputers, mainframes. High level Symbolic Programming Languages such as *LIS*t *P*rogramming (LISP) and *PRO*grammation en *LOG*ique (PROLOG). Large databases.

  2. Tools − They reduce the effort and cost involved in developing an expert system to large extent. Powerful editors and debugging tools with multi-windows. They provide rapid prototyping Have Inbuilt definitions of model, knowledge representation, and inference design.

  3. Shells − A shell is nothing but an expert system without knowledge base. A shell provides the developers with knowledge acquisition, inference engine, user interface, and explanation facility. For example, few shells are given below − Java Expert System Shell (JESS) that provides fully developed Java API for creating an expert system. Vidwan, a shell developed at the National Centre for Software Technology, Mumbai in 1993. It enables knowledge encoding in the form of IF-THEN rules.

Development of Expert Systems: General Steps

ES 开发的过程是迭代的。ES 开发的步骤包括 −

The process of ES development is iterative. Steps in developing the ES include −

Identify Problem Domain

  1. The problem must be suitable for an expert system to solve it.

  2. Find the experts in task domain for the ES project.

  3. Establish cost-effectiveness of the system.

Design the System

  1. Identify the ES Technology

  2. Know and establish the degree of integration with the other systems and databases.

  3. Realize how the concepts can represent the domain knowledge best.

Develop the Prototype

从知识库来看:知识工程师的工作是 −

From Knowledge Base: The knowledge engineer works to −

  1. Acquire domain knowledge from the expert.

  2. Represent it in the form of If-THEN-ELSE rules.

Test and Refine the Prototype

  1. The knowledge engineer uses sample cases to test the prototype for any deficiencies in performance.

  2. End users test the prototypes of the ES.

Develop and Complete the ES

  1. Test and ensure the interaction of the ES with all elements of its environment, including end users, databases, and other information systems.

  2. Document the ES project well.

  3. Train the user to use ES.

Maintain the System

  1. Keep the knowledge base up-to-date by regular review and update.

  2. Cater for new interfaces with other information systems, as those systems evolve.

Benefits of Expert Systems

  1. Availability − They are easily available due to mass production of software.

  2. Less Production Cost − Production cost is reasonable. This makes them affordable.

  3. Speed − They offer great speed. They reduce the amount of work an individual puts in.

  4. Less Error Rate − Error rate is low as compared to human errors.

  5. Reducing Risk − They can work in the environment dangerous to humans.

  6. Steady response − They work steadily without getting motional, tensed or fatigued.

Artificial Intelligence - Robotics

机器人技术是人工智能的一个领域,它涉及创建智能和高效机器人。

Robotics is a domain in artificial intelligence that deals with the study of creating intelligent and efficient robots.

What are Robots?

机器人是在真实世界环境中工作的代理。

Robots are the artificial agents acting in real world environment.

Objective

机器人的目的是通过感知、拾取、移动、修改对象的物理属性、销毁对象或产生影响,从而操纵对象,从而使人力自由执行重复功能,而不会感到厌烦、分心或疲惫。

Robots are aimed at manipulating the objects by perceiving, picking, moving, modifying the physical properties of object, destroying it, or to have an effect thereby freeing manpower from doing repetitive functions without getting bored, distracted, or exhausted.

What is Robotics?

机器人技术是人工智能的一个分支,由电气工程学、机械工程学和计算机科学组成,用于设计、构建和应用机器人。

Robotics is a branch of AI, which is composed of Electrical Engineering, Mechanical Engineering, and Computer Science for designing, construction, and application of robots.

Aspects of Robotics

  1. The robots have mechanical construction, form, or shape designed to accomplish a particular task.

  2. They have electrical components which power and control the machinery.

  3. They contain some level of computer program that determines what, when and how a robot does something.

Difference in Robot System and Other AI Program

以下是两者的区别−

Here is the difference between the two −

AI Programs

Robots

They usually operate in computer-stimulated worlds.

They operate in real physical world

The input to an AI program is in symbols and rules.

Inputs to robots is analog signal in the form of speech waveform or images

They need general purpose computers to operate on.

They need special hardware with sensors and effectors.

Robot Locomotion

运动是使机器人能够在其环境中移动的机制。有许多不同类型的运动 −

Locomotion is the mechanism that makes a robot capable of moving in its environment. There are various types of locomotions −

  1. Legged

  2. Wheeled

  3. Combination of Legged and Wheeled Locomotion

  4. Tracked slip/skid

Legged Locomotion

  1. This type of locomotion consumes more power while demonstrating walk, jump, trot, hop, climb up or down, etc.

  2. It requires more number of motors to accomplish a movement. It is suited for rough as well as smooth terrain where irregular or too smooth surface makes it consume more power for a wheeled locomotion. It is little difficult to implement because of stability issues.

  3. It comes with the variety of one, two, four, and six legs. If a robot has multiple legs then leg coordination is necessary for locomotion.

机器人可以行走的总 gaits (每个总腿部抬起和释放事件的周期性序列)的数量取决于其腿部的数量。

The total number of possible gaits (a periodic sequence of lift and release events for each of the total legs) a robot can travel depends upon the number of its legs.

如果一个机器人有 k 条腿,那么可能的事件数为 N = (2k-1)!。

If a robot has k legs, then the number of possible events N = (2k-1)!.

在两足机器人的情况下(k=2),可能的事件数为 N = (2k-1)! = (2*2-1)! = 3! = 6。

In case of a two-legged robot (k=2), the number of possible events is N = (2k-1)! = (2*2-1)! = 3! = 6.

因此,有六个可能的不同事件 −

Hence there are six possible different events −

  1. Lifting the Left leg

  2. Releasing the Left leg

  3. Lifting the Right leg

  4. Releasing the Right leg

  5. Lifting both the legs together

  6. Releasing both the legs together

在 k=6 条腿的情况下,有 39916800 个可能的事件。因此机器人的复杂度与腿数成正比。

In case of k=6 legs, there are 39916800 possible events. Hence the complexity of robots is directly proportional to the number of legs.

bipedal robot

Wheeled Locomotion

它需要较少的电机来完成运动。它很容易实现,因为在轮子较多的情况下,稳定性问题较少。与腿部运动相比,它具有节能性。

It requires fewer number of motors to accomplish a movement. It is little easy to implement as there are less stability issues in case of more number of wheels. It is power efficient as compared to legged locomotion.

  1. Standard wheel − Rotates around the wheel axle and around the contact

  2. Castor wheel − Rotates around the wheel axle and the offset steering joint.

  3. Swedish 45o and Swedish 90o wheels − Omni-wheel, rotates around the contact point, around the wheel axle, and around the rollers.

  4. Ball or spherical wheel − Omnidirectional wheel, technically difficult to implement.

wheeled robot

Slip/Skid Locomotion

在这种类型中,车辆使用履带,就像坦克一样。通过以相同或相反的方向以不同的速度移动履带来操纵机器人。由于履带和地面之间的接触面积大,因此提供了稳定性。

In this type, the vehicles use tracks as in a tank. The robot is steered by moving the tracks with different speeds in the same or opposite direction. It offers stability because of large contact area of track and ground.

tracked robot

Components of a Robot

机器人的构建需要以下方面:

Robots are constructed with the following −

  1. Power Supply − The robots are powered by batteries, solar power, hydraulic, or pneumatic power sources.

  2. Actuators − They convert energy into movement.

  3. Electric motors (AC/DC) − They are required for rotational movement.

  4. Pneumatic Air Muscles − They contract almost 40% when air is sucked in them.

  5. Muscle Wires − They contract by 5% when electric current is passed through them.

  6. Piezo Motors and Ultrasonic Motors − Best for industrial robots.

  7. Sensors − They provide knowledge of real time information on the task environment. Robots are equipped with vision sensors to be to compute the depth in the environment. A tactile sensor imitates the mechanical properties of touch receptors of human fingertips.

Computer Vision

这是一项人工智能技术,机器人可以借此“看见”。计算机视觉在安全、安保、健康、访问和娱乐领域发挥着至关重要的作用。

This is a technology of AI with which the robots can see. The computer vision plays vital role in the domains of safety, security, health, access, and entertainment.

计算机视觉从单幅图像或图像阵列中自动提取、分析和理解有用的信息。此过程涉及开发算法以实现自动视觉理解。

Computer vision automatically extracts, analyzes, and comprehends useful information from a single image or an array of images. This process involves development of algorithms to accomplish automatic visual comprehension.

Hardware of Computer Vision System

这涉及:

This involves −

  1. Power supply

  2. Image acquisition device such as camera

  3. A processor

  4. A software

  5. A display device for monitoring the system

  6. Accessories such as camera stands, cables, and connectors

Tasks of Computer Vision

  1. OCR − In the domain of computers, Optical Character Reader, a software to convert scanned documents into editable text, which accompanies a scanner.

  2. Face Detection − Many state-of-the-art cameras come with this feature, which enables to read the face and take the picture of that perfect expression. It is used to let a user access the software on correct match.

  3. Object Recognition − They are installed in supermarkets, cameras, high-end cars such as BMW, GM, and Volvo.

  4. Estimating Position − It is estimating position of an object with respect to camera as in position of tumor in human’s body.

Application Domains of Computer Vision

  1. Agriculture

  2. Autonomous vehicles

  3. Biometrics

  4. Character recognition

  5. Forensics, security, and surveillance

  6. Industrial quality inspection

  7. Face recognition

  8. Gesture analysis

  9. Geoscience

  10. Medical imagery

  11. Pollution monitoring

  12. Process control

  13. Remote sensing

  14. Robotics

  15. Transport

Applications of Robotics

机器人一直在以下领域发挥关键作用:

The robotics has been instrumental in the various domains such as −

  1. Industries − Robots are used for handling material, cutting, welding, color coating, drilling, polishing, etc.

  2. Military − Autonomous robots can reach inaccessible and hazardous zones during war. A robot named Daksh, developed by Defense Research and Development Organization (DRDO), is in function to destroy life-threatening objects safely.

  3. Medicine − The robots are capable of carrying out hundreds of clinical tests simultaneously, rehabilitating permanently disabled people, and performing complex surgeries such as brain tumors.

  4. Exploration − The robot rock climbers used for space exploration, underwater drones used for ocean exploration are to name a few.

  5. Entertainment − Disney’s engineers have created hundreds of robots for movie making.

Artificial Intelligence - Neural Networks

人工智能中的另一个研究领域神经网络,其灵感源自人体神经系统的自然神经网络。

Yet another research area in AI, neural networks, is inspired from the natural neural network of human nervous system.

What are Artificial Neural Networks (ANNs)?

首台神经计算机的发明者罗伯特·海希特-尼尔森博士将神经网络定义为 −

The inventor of the first neurocomputer, Dr. Robert Hecht-Nielsen, defines a neural network as −

Basic Structure of ANNs

人工神经网络的想法基于这样的信念:通过建立正确的连接,可以用硅和电线来模仿人脑的工作方式,就像活动中的 neuronsdendrites 一样。

The idea of ANNs is based on the belief that working of human brain by making the right connections, can be imitated using silicon and wires as living neurons and dendrites.

人脑由 860 亿个被称为 neurons. 的神经细胞组成。它们通过 Axons. 与其他数千个细胞相连。来自外部环境的刺激或来自感觉器官的输入被树突接受。这些输入会产生电脉冲,这些脉冲会迅速通过神经网络传播。然后神经元可以将消息发送到其他神经元来处理问题,或者不将其转发。

The human brain is composed of 86 billion nerve cells called neurons. They are connected to other thousand cells by Axons. Stimuli from external environment or inputs from sensory organs are accepted by dendrites. These inputs create electric impulses, which quickly travel through the neural network. A neuron can then send the message to other neuron to handle the issue or does not send it forward.

neuron

人工神经网络由多个 nodes 组成,它们模仿人脑的生物 neurons 。神经元通过链接相互连接,并相互交互。节点可以获取输入数据并在数据上执行简单运算。这些运算的结果会传递给其他神经元。每个节点的输出被称为它的 activationnode value.

ANNs are composed of multiple nodes, which imitate biological neurons of human brain. The neurons are connected by links and they interact with each other. The nodes can take input data and perform simple operations on the data. The result of these operations is passed to other neurons. The output at each node is called its activation or node value.

每个链接都与 weight. 相关联,人工神经网络具有学习能力,这种学习能力可以通过改变权重值来实现。下图显示了一个简单的人工神经网络 −

Each link is associated with weight. ANNs are capable of learning, which takes place by altering weight values. The following illustration shows a simple ANN −

atypical ann

Types of Artificial Neural Networks

有两种人工神经网络拓扑 − FeedForwardFeedback.

There are two Artificial Neural Network topologies − FeedForward and Feedback.

FeedForward ANN

在此人工神经网络中,信息流是单向的。一个单元向另一个单元发送信息,而它不会从该单元接收任何信息。没有反馈环路。它们用于模式生成/识别/分类。它们的输入和输出是固定的。

In this ANN, the information flow is unidirectional. A unit sends information to other unit from which it does not receive any information. There are no feedback loops. They are used in pattern generation/recognition/classification. They have fixed inputs and outputs.

feed forward ann

FeedBack ANN

在此处,允许使用反馈环路。它们用于内容可寻址内存。

Here, feedback loops are allowed. They are used in content addressable memories.

feedback ann

Working of ANNs

在所示拓扑图中,每个箭头表示两个神经元之间的连接,并指示信息的流动路径。每个连接都有一个权重,这是一个整数,用于控制两个神经元之间的信号。

In the topology diagrams shown, each arrow represents a connection between two neurons and indicates the pathway for the flow of information. Each connection has a weight, an integer number that controls the signal between the two neurons.

如果网络生成“良好或理想”的输出,则无需调整权重。但是,如果网络生成“不良或不理想”的输出或错误,则系统将为了改进后续结果而改变权重。

If the network generates a “good or desired” output, there is no need to adjust the weights. However, if the network generates a “poor or undesired” output or an error, then the system alters the weights in order to improve subsequent results.

Machine Learning in ANNs

人工神经网络能够学习并且需要进行训练。有几种学习策略 -

ANNs are capable of learning and they need to be trained. There are several learning strategies −

  1. Supervised Learning − It involves a teacher that is scholar than the ANN itself. For example, the teacher feeds some example data about which the teacher already knows the answers. For example, pattern recognizing. The ANN comes up with guesses while recognizing. Then the teacher provides the ANN with the answers. The network then compares it guesses with the teacher’s “correct” answers and makes adjustments according to errors.

  2. Unsupervised Learning − It is required when there is no example data set with known answers. For example, searching for a hidden pattern. In this case, clustering i.e. dividing a set of elements into groups according to some unknown pattern is carried out based on the existing data sets present.

  3. Reinforcement Learning − This strategy built on observation. The ANN makes a decision by observing its environment. If the observation is negative, the network adjusts its weights to be able to make a different required decision the next time.

Back Propagation Algorithm

这是训练或学习算法。它通过示例进行学习。如果您向算法提交网络将要执行操作的示例,它将更改网络的权重,以便在完成训练后针对特定的输入生成所需的输出。

It is the training or learning algorithm. It learns by example. If you submit to the algorithm the example of what you want the network to do, it changes the network’s weights so that it can produce desired output for a particular input on finishing the training.

反向传播网络非常适合简单的模式识别和映射任务。

Back Propagation networks are ideal for simple Pattern Recognition and Mapping Tasks.

Bayesian Networks (BN)

这些是用于表示一组随机变量之间的概率关系的图形结构。贝叶斯网络也称为 Belief NetworksBayes Nets. BNs 推理不确定的域。

These are the graphical structures used to represent the probabilistic relationship among a set of random variables. Bayesian networks are also called Belief Networks or Bayes Nets. BNs reason about uncertain domain.

在这些网络中,每个节点表示具有特定命题的随机变量。例如,在医学诊断域中,节点“癌症”表示患者患有癌症的命题。

In these networks, each node represents a random variable with specific propositions. For example, in a medical diagnosis domain, the node Cancer represents the proposition that a patient has cancer.

连接节点的边表示这些随机变量之间的概率依赖性。如果两个节点中有一个正在影响另一个,则必须按照效果的方向直接连接它们。变量之间的关系强度由与每个节点关联的概率来量化。

The edges connecting the nodes represent probabilistic dependencies among those random variables. If out of two nodes, one is affecting the other then they must be directly connected in the directions of the effect. The strength of the relationship between variables is quantified by the probability associated with each node.

BN 中的弧上只有一个约束,即您不能仅仅通过遵循有向弧而返回到一个节点。因此,BN 被称为有向无环图 (DAG)。

There is an only constraint on the arcs in a BN that you cannot return to a node simply by following directed arcs. Hence the BNs are called Directed Acyclic Graphs (DAGs).

BN 能够同时处理多值变量。BN 变量由两个维度组成 -

BNs are capable of handling multivalued variables simultaneously. The BN variables are composed of two dimensions −

  1. Range of prepositions

  2. Probability assigned to each of the prepositions.

考虑离散随机变量的有限集 X = {X1, X2, …,Xn},其中每个变量 Xi 可以从有限集 Val(Xi) 中取值。如果从变量 Xi 到变量 Xj 有一个有向链接,则变量 Xi 将成为变量 Xj 的父节点,显示变量之间的直接依赖性。

Consider a finite set X = {X1, X2, …,Xn} of discrete random variables, where each variable Xi may take values from a finite set, denoted by Val(Xi). If there is a directed link from variable Xi to variable, Xj, then variable Xi will be a parent of variable Xj showing direct dependencies between the variables.

BN 的结构非常适合于结合先验知识和观察到的数据。BN 可用于学习因果关系并了解各种问题域,以及预测未来事件,即使在数据缺失的情况下也是如此。

The structure of BN is ideal for combining prior knowledge and observed data. BN can be used to learn the causal relationships and understand various problem domains and to predict future events, even in case of missing data.

Building a Bayesian Network

知识工程师可以构建贝叶斯网络。知识工程师在构建它时需要采取一些步骤。

A knowledge engineer can build a Bayesian network. There are a number of steps the knowledge engineer needs to take while building it.

Example problem - 肺癌。一名患者一直患有呼吸急促。他去看医生,怀疑自己患有肺癌。医生知道,除了肺癌之外,患者还有可能患上多种其他疾病,例如结核病和支气管炎。

Example problem − Lung cancer. A patient has been suffering from breathlessness. He visits the doctor, suspecting he has lung cancer. The doctor knows that barring lung cancer, there are various other possible diseases the patient might have such as tuberculosis and bronchitis.

Gather Relevant Information of Problem

Gather Relevant Information of Problem

  1. Is the patient a smoker? If yes, then high chances of cancer and bronchitis.

  2. Is the patient exposed to air pollution? If yes, what sort of air pollution?

  3. Take an X-Ray positive X-ray would indicate either TB or lung cancer.

Identify Interesting Variables

Identify Interesting Variables

知识工程师试图回答以下问题:

The knowledge engineer tries to answer the questions −

  1. Which nodes to represent?

  2. What values can they take? In which state can they be?

现在,让我们考虑仅具有离散值的节点。此变量一次必须采用其中一个值。

For now let us consider nodes, with only discrete values. The variable must take on exactly one of these values at a time.

Common types of discrete nodes are

Common types of discrete nodes are

  1. Boolean nodes − They represent propositions, taking binary values TRUE (T) and FALSE (F).

  2. Ordered values − A node Pollution might represent and take values from {low, medium, high} describing degree of a patient’s exposure to pollution.

  3. Integral values − A node called Age might represent patient’s age with possible values from 1 to 120. Even at this early stage, modeling choices are being made.

肺癌示例中可能的节点和值 −

Possible nodes and values for the lung cancer example −

Node Name

Type

Value

Nodes Creation

Polution

Binary

{LOW, HIGH, MEDIUM}

Smoker

Boolean

{TRUE, FASLE}

Lung-Cancer

Boolean

{TRUE, FASLE}

X-Ray

Binary

Create Arcs between Nodes

Create Arcs between Nodes

网络拓扑应捕获变量之间的定性关系。

Topology of the network should capture qualitative relationships between variables.

例如,什么导致患者患有肺癌?- 污染和吸烟。然后从节点 Pollution 和节点 Smoker 添加指向节点 Lung-Cancer 的弧线。

For example, what causes a patient to have lung cancer? - Pollution and smoking. Then add arcs from node Pollution and node Smoker to node Lung-Cancer.

类似的,如果患者患有肺癌,那么 X 射线结果将为正。然后从节点 Lung-Cancer 添加弧线,指向节点 X-Ray。

Similarly if patient has lung cancer, then X-ray result will be positive. Then add arcs from node Lung-Cancer to node X-Ray.

bn node arc creation

Specify Topology

Specify Topology

根据惯例,BN 的布局使得弧线从上向下指向。节点 X 的父节点集合由 Parents(X) 给出。

Conventionally, BNs are laid out so that the arcs point from top to bottom. The set of parent nodes of a node X is given by Parents(X).

节点 Lung-Cancer 具有两个父节点(原因或起因):Pollution 和 Smoker,而 Smoker 节点是 X-Ray 节点的 ancestor 。类似地,X-Ray 是节点 Lung-Cancer 的子节点(后果或影响),以及节点 Smoker 和 Pollution 的 successor

The Lung-Cancer node has two parents (reasons or causes): Pollution and Smoker, while node Smoker is an ancestor of node X-Ray. Similarly, X-Ray is a child (consequence or effects) of node Lung-Cancer and successor of nodes Smoker and Pollution.

Conditional Probabilities

Conditional Probabilities

现在量化相连节点之间的关系:此过程通过为每个节点指定一个条件概率分布来完成。由于此处仅考虑离散变量,因此采用 Conditional Probability Table (CPT). 形式

Now quantify the relationships between connected nodes: this is done by specifying a conditional probability distribution for each node. As only discrete variables are considered here, this takes the form of a Conditional Probability Table (CPT).

首先,对于每个节点,我们需要查看父节点值的各种可能组合。这种组合被称为父集的 instantiation 。对于父节点值的每个不同实例,我们需要指定子节点将采用的概率。

First, for each node we need to look at all the possible combinations of values of those parent nodes. Each such combination is called an instantiation of the parent set. For each distinct instantiation of parent node values, we need to specify the probability that the child will take.

例如,肺癌节点的父节点是污染和吸烟。它们采用可能的取值 = {(H,T),(H,F),(L,T),(L,F)}。CPT 指定对于这四个案例中的每一个案例,癌症的概率分别为 <0.05,0.02,0.03,0.001>。

For example, the Lung-Cancer node’s parents are Pollution and Smoking. They take the possible values = { (H,T), ( H,F), (L,T), (L,F)}. The CPT specifies the probability of cancer for each of these cases as <0.05, 0.02, 0.03, 0.001> respectively.

每个节点都将具有如下关联的条件概率 −

Each node will have conditional probability associated as follows −

probabilities

Applications of Neural Networks

它们可以执行对于人类来说很容易但对于机器来说很难的任务 −

They can perform tasks that are easy for a human but difficult for a machine −

  1. Aerospace − Autopilot aircrafts, aircraft fault detection.

  2. Automotive − Automobile guidance systems.

  3. Military − Weapon orientation and steering, target tracking, object discrimination, facial recognition, signal/image identification.

  4. Electronics − Code sequence prediction, IC chip layout, chip failure analysis, machine vision, voice synthesis.

  5. Financial − Real estate appraisal, loan advisor, mortgage screening, corporate bond rating, portfolio trading program, corporate financial analysis, currency value prediction, document readers, credit application evaluators.

  6. Industrial − Manufacturing process control, product design and analysis, quality inspection systems, welding quality analysis, paper quality prediction, chemical product design analysis, dynamic modeling of chemical process systems, machine maintenance analysis, project bidding, planning, and management.

  7. Medical − Cancer cell analysis, EEG and ECG analysis, prosthetic design, transplant time optimizer.

  8. Speech − Speech recognition, speech classification, text to speech conversion.

  9. Telecommunications − Image and data compression, automated information services, real-time spoken language translation.

  10. Transportation − Truck Brake system diagnosis, vehicle scheduling, routing systems.

  11. Software − Pattern Recognition in facial recognition, optical character recognition, etc.

  12. Time Series Prediction − ANNs are used to make predictions on stocks and natural calamities.

  13. Signal Processing − Neural networks can be trained to process an audio signal and filter it appropriately in the hearing aids.

  14. Control − ANNs are often used to make steering decisions of physical vehicles.

  15. Anomaly Detection − As ANNs are expert at recognizing patterns, they can also be trained to generate an output when something unusual occurs that misfits the pattern.

Artificial Intelligence - Issues

AI 的发展速度令人难以置信,有时甚至像魔术一样。研究人员和开发人员有一种观点,认为 AI 可能变得无比强大,以致人类很难控制。

AI is developing with such an incredible speed, sometimes it seems magical. There is an opinion among researchers and developers that AI could grow so immensely strong that it would be difficult for humans to control.

人类向 AI 系统输入了他们掌握的每一种可能的智慧,开发出了 AI 系统,但人类自身现在看来受到了威胁。

Humans developed AI systems by introducing into them every possible intelligence they could, for which the humans themselves now seem threatened.

Threat to Privacy

理论上,能识别语音和理解自然语言的 AI 程序能够理解电子邮件和电话中的每一场对话。

An AI program that recognizes speech and understands natural language is theoretically capable of understanding each conversation on e-mails and telephones.

Threat to Human Dignity

AI 系统已经开始在一些行业取代人类。它不应取代在道德相关行业中处在尊贵职位的人员,如护士、外科医生、法官、警察等。

AI systems have already started replacing the human beings in few industries. It should not replace people in the sectors where they are holding dignified positions which are pertaining to ethics such as nursing, surgeon, judge, police officer, etc.

Threat to Safety

自完善的 AI 系统可能会变得比人类更强大,很难阻止它们实现自己的目标,这可能导致意外后果。

The self-improving AI systems can become so mighty than humans that could be very difficult to stop from achieving their goals, which may lead to unintended consequences.

Artificial Intelligence - Terminology

以下是 AI 领域中常用术语列表 −

Here is the list of frequently used terms in the domain of AI −

Sr.No

Term & Meaning

1

Agent Agents are systems or software programs capable of autonomous, purposeful and reasoning directed towards one or more goals. They are also called assistants, brokers, bots, droids, intelligent agents, and software agents.

2

Autonomous Robot Robot free from external control or influence and able to control itself independently.

3

Backward Chaining Strategy of working backward for Reason/Cause of a problem.

4

Blackboard It is the memory inside computer, which is used for communication between the cooperating expert systems.

5

Environment It is the part of real or computational world inhabited by the agent.

6

Forward Chaining Strategy of working forward for conclusion/solution of a problem.

7

Heuristics It is the knowledge based on Trial-and-error, evaluations, and experimentation.

8

Knowledge Engineering Acquiring knowledge from human experts and other resources.

9

Percepts It is the format in which the agent obtains information about the environment.

10

Pruning Overriding unnecessary and irrelevant considerations in AI systems.

11

Rule It is a format of representing knowledge base in Expert System. It is in the form of IF-THEN-ELSE.

12

Shell A shell is a software that helps in designing inference engine, knowledge base, and user interface of an expert system.

13

Task It is the goal the agent is tries to accomplish.

14

Turing Test A test developed by Allan Turing to test the intelligence of a machine as compared to human intelligence.