AI with Python - Primer Concept

Since the invention of computers or machines, their capability to perform different tasks has experienced an exponential growth. Humans have built up the power of computer systems in terms of their assorted working domains, their increasing speed, and reducing size with respect to time.

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

Basic Concept of Artificial Intelligence (AI)

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

Artificial Intelligence is a method of making a computer, a computer-controlled robot, or a software think intelligently, in the similar way 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 issue, and then using the results of this study as a basis of developing intelligent software and systems.

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?”

Accordingly the development of AI started with the goal of creating similar intelligence in machines that we find and regard high in humans.

The Necessity of Learning AI

As we realize that AI pursues creating the machines as intelligent as human beings. There are various reasons for us to study AI. The reasons are as follows −

AI can learn through data

In our day by day life, we deal with huge amount of data and human brain cannot keep track of so much information. That is the reason we need to automate the things. For doing automation, we need to examine AI because it can learn from data and can do the repetitive tasks with accuracy and without tiredness.

AI can teach itself

It is extremely important that a system should teach itself because the data itself keeps changing and the knowledge which is derived from such data must be updated continually. We can use AI to fulfill this purpose because an AI enabled system can learn itself.

AI can respond in real time

Artificial intelligence with the assistance of neural networks can analyze the data more profoundly. Because of this capability, AI can think and respond to the situations which are based on the conditions in real time.

AI achieves accuracy

With the assistance of deep neural networks, AI can accomplish tremendous accuracy. AI helps in the field of medicine to diagnose diseases such as cancer from the MRIs of patients.

AI can organize data to get most out of it

The data is an intellectual property for the systems which are using self-learning algorithms. We need AI to index and organize the data in a way that it always gives the best outcomes.

Understanding Intelligence

With AI, smart systems can be assembled. We need to comprehend the concept of intelligence so that our brain can construct another intelligence system like itself.

What is Intelligence?

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

Types of Intelligence

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

Sr. No. Intelligence & Description Example

Linguistic intelligence

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

Narrators, Orators

Musical intelligence

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

Musicians, Singers, Composers

Logical-mathematical intelligence

The capicity to use and understand relationships in the absence of action or objects. It is also the capicity to understand complex and abstract ideas.

Mathematicians, Scientists

Spatial intelligence

The capicity 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 capicity 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 capicity to distinguish among one’s own feelings, intentions, and motivations.

Gautam Buddhha

Interpersonal intelligence

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

Mass Communicators, Interviewers

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

What is Intelligence Composed Of?

The intelligence is intangible. It is composed of −

  • Reasoning
  • Learning
  • Problem Solving
  • Perception
  • Linguistic Intelligence


Let us go through all the components briefly −


It is the set of processes that empower 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 begins 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 − "Sita is a teacher. Sita is studious. Therefore, All teachers are studious." Example − "All women of age above 60 years are grandmothers. seema is 65 years. Therefore, Seema is a grandmother."

Learning − l

The capicity of learning is possessed by humans, particular species of animals, and AI-enabled systems. Learning is categorized as follows −

Auditory Learning

It is learning by listening and hearing. For example, students listening to recorded audio lectures.

Episodic Learning

To learn by recalling sequences of events that one has witnessed or experienced. This is straight and orderly.

Motor Learning

It is learning by precise movement of muscles. For instance, picking objects, writing, etc.

Observational Learning

To learn by watching and imitating others. For example, kid 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 different 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 tbsp of salt.

  • Spatial Learning − It is learning through visual stimuli such as pictures, 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 instance, a dog raises its ear on hearing doorbell.

Problem Solving

It is the way 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 incorporate decision making, which is the cycle of selecting the best suitable alternative out of multiple alternatives to reach the desired goal.


It is the cycle 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.

Linguistic Intelligence

It is one’s capacity to use, comprehend, speak, and write the verbal and written language. It is significant in interpersonal communication.

What’s Involved in AI

Artificial intelligence is a vast area of study. This field of study helps in discovering solutions to real world problems.

Let us now see the various fields of study within AI −

Machine Learning

It is one of the most popular fields of AI. The basic concept of this filed is to make the machine learning from data as the human beings can learn from his/her experience. It contains learning examples on the basis of which the predictions can be made on unknown data.


It is other important field of study in which mathematical logic is used to execute the computer programs. It contains rules and facts to perform pattern matching, semantic analysis, etc.


This field of study is basically used in games like chess, tic-tac-toe. Search algorithms give the optimal solution after finding the whole search space.

Artificial neural networks

This is a network of efficient computing systems the central theme of which is borrowed from the analogy of biological neural networks. ANN can be utilized in robotics, speech recognition, speech processing, etc.

Genetic Algorithm

Genetic algorithms assist in solving problems with the help of more than one program. The result would be based on selecting the fittest.

Knowledge Representation

It is the field of study with the help of which we can show the facts in a way the machine that is understandable to the machine. The more efficiently knowledge is represented; the more system would be intelligent.

Application of AI

In this chapter, we will see the different fields supported by AI −


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

Natural Language Processing

It is possible to interact with the computer that comprehends natural language spoken by humans.

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.

Vision Systems

These systems understand, interpret, and comprehend visual input on the computer. For example,

  • A spying aeroplane takes photographs, which are utilized 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.

Speech Recognition

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

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.

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 processors, multiple sensors and huge memory, to exhibit intelligence. As well, they are capable of learning from their mistakes and they can adapt to the new environment.

Cognitive Modeling: Simulating Human Thinking Procedure

Cognitive modeling is generally the field of study within computer science that deals with the study and simulating the thinking process of human beings. The main task of AI is to make machine think like human. The most significant feature of human thinking process is problem solving. That is why more or less cognitive modeling tries to understand how humans can resolve the problems. After that this model can be utilized for various AI applications such as machine learning, robotics, natural language processing, etc. Following is the diagram of various thinking levels of human brain −


Agent & Environment

In this chapter, we will focus on the agent and environment and how these help in Artificial Intelligence.


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

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

  • robotic agent replaces cameras and infrared range finders for the sensors, and different motors and actuators for effectors.

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


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

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 is designed to scan the online preferences of the client and shows interesting items to the client works in the real as well as an artificial environment.

Input your Topic Name and press Enter.