Artificial Intelligence Tutorial

What is AI?

  • Artificial Intelligence is a technology and a branch of computer science that deals with the study and development of intelligent machines and software.
  • It is the science of making a machine to think and act like an intelligent human being.

Turing Test in AI

  • The Turing Test was developed by Alan Turing in 1950.
  • According to Turing, intelligent behavior is an ability to achieve human-level performance in all cognitive tasks and sufficient to fool interrogator.
  • When two persons and a machine to be evaluated participate in the test, one human being acts as a tester. Each of them has to sit in different rooms.
  • However, the tester does not know that who is machine and who is a human.
  • So, the tester asks the questions by typing and sending them to both intelligences (machine and a person), to which he receives typed responses.
  • If the tester fails to determine machine’s response from the human response, then the machine is said to be an intelligent.

Applications of AI

AI is used in applicable in many aspects such as Finance, Medical, Transport, Entertainment, Pattern recognition, Data mining and many more. Some important applications of AI are listed below:

1. Gaming
AI plays an important role in designing strategic games such as chess, tic-tac-toe etc. These are the logical games in which the system can determine the various available options based on the information fed.

2. Natural Language Processing (NLP)
It is possible to interact with the computer that understands human language.

3. Expert System
Expert systems are developed to solve complex problems by the knowledge of reasoning, which is represented primarily using if–then rules rather than conventional procedural code.

4. Vision System
Computer Vision system is a technology of obtaining models to control information from visual data.
For example:
Police use computer software that can recognize the face of the criminal with the stored portrait made by forensic artist.

5. Robots
Robots are able to perform the tasks given by humans.

What is an Intelligent Agent?

  • An agent is anything that can perceive its environment through sensors and acting upon that environment through effectors.
  • A human agent has eyes, ears, and other organs as sensors and hands, legs, mouth, and other body parts for effectors.
  • A robotic agent has cameras and infrared range finders for the sensors and various motors for the effectors.
  • A software agent is encoded with bit strings as its percepts and actions.
    For example: It can produce the square root of any  positive number.
  • An intelligent agent also called as a rational agent is one that does the right thing.
  • An Intelligent agent can transform perception into actions rationally.
  • A calculator is also an agent but it provides no intelligence, because it performs just a hard core calculation up to maximum possible value. On the other hand, an intelligent agent has the capability to take decision not up to perfection like a hard core agent.
    For example: Diagnosing a patient on the basis of symptoms and predict disease.
  • An Agent comprises two components: one is architecture and another is program.

  • Agent = Architecture + Program

  • An agent resides on architecture which is a hardware infrastructure such as camera, sensors, videos, computer or any machine. A program is usually a software program that controls the architecture to initiate agent.
  • Performance evaluation of an agent can be measured by the correctness and efficiency with which an agent serves the users expectation. It should be relatively close to the  user's expectations.
intelligent agent

Let's take an example of a car Driver agent given below.

Agent TypePerceptsActionGoalsEnvironment
Car DriverSpeedometer, GPS, Microphone, CamerasSteering control, accelerate, brake, talk to passengerSafe, legal, comfortable journeyRoad, Traffic, Pedestrian etc.


Types of agent programs

1. Simple Reflex Agent
When the actions of nearest object are clearly visible then the response that has to be taken is by simple reflex agent.
For example: If the car is going ahead and a driver applies brake, then car following it should also initiate brake.

simple reflex agent

reflex agent

2. Goal based agents
  • Reflex agents respond immediately to percepts.
  • The goal should be known to the agent by means of a sequence of actions necessary to follow during operation.
For example: The destination should be known to a taxi driver so that the available routes can be derived.

goal based agent

3. Utility based agents
  • Utility-based agents try to maximize their own "happiness."
  • The goal should be achieved with some performance measure set by the user.
  • The cost, degree of comfort and safety are associated with achievement of specific goals.
utility based agent

Properties of Environment

It is very difficult to know exactly where the environment ends and agent begins in many cases. Following are the properties that are very useful to predict the task of agent related to environment. They are:

1. Accessible vs Inaccessible
  • If an agent sensory apparatus provides access to the complete state of an environment, then the environment is said to be accessible to that agent.
  • An accessible environment is convenient as agent may not be required for maintaining any internal state to keep track of the world.
2. Deterministic vs Non deterministic
  • The environment is said to be deterministic, if the next state of environment is completely determined by the current state and the actions are selected by the agents.
  • However, if the environment is inaccessible, then it may appear to be nondeterministic.
3. Episodic vs Non-episodic
  • In an episodic environment, the agents experience is divided into episodes. Each episode consists of perceiving and acting agent.
  • Episodic environments are much simpler because agents are not required to think ahead.
4. Static vs Dynamic
  • If an environment does not undergo any change especially when an agent is busy in performing a specific task, then the environment is said to be static otherwise it is dynamic.
  • If an environment does not change with the time, but the agents score changes in accordance to time, then the environment is said to be semi-dynamic.
5. Discrete vs Continues
If there are limited number of distinct defined percepts and actions, then the environment is discrete.
For example: Environment is discrete for Chess and Continuous for Driving.