0% found this document useful (0 votes)
13 views

AI_TU_CSE

The document discusses the concept of Artificial Intelligence (AI), defining it as a branch of computer science focused on creating machines capable of performing tasks that typically require human intelligence. It outlines the history, techniques, applications, and underlying assumptions of AI, emphasizing its interdisciplinary nature and the importance of knowledge representation. The document also highlights various AI techniques and the evolution of AI through different eras, showcasing its applications across multiple fields.

Uploaded by

siddiqtahaseem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

AI_TU_CSE

The document discusses the concept of Artificial Intelligence (AI), defining it as a branch of computer science focused on creating machines capable of performing tasks that typically require human intelligence. It outlines the history, techniques, applications, and underlying assumptions of AI, emphasizing its interdisciplinary nature and the importance of knowledge representation. The document also highlights various AI techniques and the evolution of AI through different eras, showcasing its applications across multiple fields.

Uploaded by

siddiqtahaseem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 110

ARTIFICIAL INTELLIGENCE

By
Dr B Nandini,
Associate Professor, Dept of CSE,
Telangana University
• There are three kinds of Intelligence:
– One kind understand things for itself,
– The other appreciates what others can
understand,
– The third understands neither for itself nor
through others.
• The first kind is excellent, the second good,
and the third kind useless.
---- Niccolo Machiavelli (1469-
1527)
Italian diplomat, political
philosopher, musician, poet and
playwright
What is AI?
• There is no single definition that universally captures
the essence of AI.
• Artificial intelligence (AI) can be understood in two
ways:
– As a field of study: AI is a branch of computer science
concerned with the development of intelligent machines that
can perform tasks typically requiring human intelligence, such
as learning, reasoning, problem-solving, and decision-making.
– As the intelligence exhibited by machines: AI refers to
the capability of machines to mimic cognitive functions that
humans associate with other human minds, such as
understanding language, learning from experience, and
adapting to new situations.
Introduction:
• Artificial Intelligence is concerned with the design of intelligence in
an artificial device. The term was coined by John McCarthy in 1956.
• Intelligence is the ability to acquire, understand and apply the
knowledge to achieve goals in the world.
• AI is the study of the mental faculties through the use of
computational models.
• AI is the study of intellectual/mental processes as computational
processes.
• AI program will demonstrate a high level of intelligence to a degree
that equals or exceeds the intelligence required of a human in
performing some task.
• AI is unique, sharing borders with Mathematics, Computer Science,
Philosophy, Psychology, Biology, Cognitive Science and many others.
• Although there is no clear definition of AI or even Intelligence, it can
be described as an attempt to build machines that like humans can
think and act, able to learn and use knowledge to solve problems on
their own.
Definitions..
• AI is the study of how to make computers do
things which, at the moment, people do better.
• According to the father of Artificial Intelligence,
John McCarthy, it is “The science and
engineering of making intelligent machines,
especially intelligent computer programs”.
• It is the theory and development of computer
systems capable of performing tasks that
historically required human intelligence, such
as recognizing speech, making decisions, and
identifying patterns.
• 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.
• Artificial intelligence (AI) is a branch
of computer science that deals with
the creation of intelligent agents,
which are systems that can reason,
learn, and act autonomously.
• From a business perspective AI is a
set of very powerful tools, and
methodologies for using those tools
to solve business problems.
• From a programming perspective, AI
includes the study of symbolic
programming, problem solving, and
search.
AI Vocabulary
• Intelligence relates to tasks involving higher mental
processes, e.g. creativity, solving problems, pattern
recognition, classification, learning, induction,
deduction, building analogies, optimization, language
processing, knowledge and many more. Intelligence is
the computational part of the ability to achieve goals.
• Intelligent behaviour is depicted by perceiving one’s
environment, acting in complex environments, learning
and understanding from experience, reasoning to solve
problems and discover hidden knowledge, applying
knowledge successfully in new situations, thinking
abstractly, using analogies, communicating with others
and more.
• Science based goals of AI pertain to
developing concepts, mechanisms and
understanding biological intelligent
behaviour. The emphasis is on
understanding intelligent behaviour.
• Engineering based goals of AI relate
to developing concepts, theory and
practice of building intelligent machines.
The emphasis is on system building.
• AI Techniques depict how we represent, manipulate and
reason with knowledge in order to solve problems.
Knowledge is a collection of ‘facts’. To manipulate these
facts by a program, a suitable representation is required. A
good representation facilitates problem solving.
• Learning means that programs learn from what facts or
behaviour can represent. Learning denotes changes in the
systems that are adaptive in other words, it enables the
system to do the same task(s) more efficiently next time.
• Applications of AI refers to problem solving, search and
control strategies, speech recognition, natural language
understanding, computer vision, expert systems, etc.
The History of Artificial Intelligence

• Early days (1943-1956)


• Early enthusiasm (1952-1969)
• A dose of reality (1966-1973)
• Expert systems (1969-1986)
• The return of neural networks (1986-present)
• Probabilistic reasoning and machine learning
(1987-present)
• Big data (2001-present)
• Deep learning (2011-present)
• In 1931, Goedel layed the foundation
of Theoretical Computer
Science1920-30s: He published the
first universal formal language and
showed that math itself is either
flawed or allows for unprovable but
true statements.
• In 1936, Turing reformulated
Goedel’s result and church’s
extension thereof.
• In 1956, John McCarthy coined the
term "Artificial Intelligence" as the
topic of the Dartmouth Conference,
• In 1957, The General Problem Solver
(GPS) demonstrated by Newell, Shaw
& Simon.
• In 1958, John McCarthy (MIT)
invented the Lisp language.
• In 1959, Arthur Samuel (IBM) wrote
the first game-playing program, for
checkers, to achieve sufficient skill to
challenge a world champion.
• In 1963, Ivan Sutherland's MIT
dissertation on Sketchpad introduced
the idea of interactive graphics into
computing.
• In 1966, Ross Quillian (PhD dissertation,
Carnegie Inst. of Technology; now CMU)
demonstrated semantic nets.
• In 1967, Dendral program (Edward
Feigenbaum, Joshua Lederberg, Bruce
Buchanan, Georgia Sutherland at
Stanford) demonstrated to interpret
mass spectra on organic chemical
compounds. First successful knowledge-
based program for scientific reasoning.
• In 1967, Doug Engelbart invented the
mouse at SRI.
• In 1968, Marvin Minsky & Seymour Papert
publish Perceptrons, demonstrating limits of
simple neural nets.
• In 1972, Prolog developed by Alain Colmerauer.
• In Mid 80’s, Neural Networks become widely
used with the Backpropagation algorithm (first
described by Werbos in 1974).
• 1990, Major advances in all areas of AI, with
significant demonstrations in machine learning,
intelligent tutoring, case-based reasoning, multi-
agent planning, scheduling, uncertain
reasoning, data mining, natural language
understanding and translation, vision, virtual
reality, games, and other topics.
• In 1997, Deep Blue beats the World
Chess Champion Kasparov.
• In 2002, iRobot, founded by
researchers at the MIT Artificial
Intelligence Lab, introduced Roomba,
a vacuum cleaning robot. By 2006,
two million had been sold.
Problems of AI:
• Early works focused on formal tasks, like game
playing and theorem proving.
• Samuel wrote a checkers-playing- not only used
play games with opponents but also used its
experience at those games to improve its later
performance.
• Chess also received a good deal of attention.
• The Logic Theorist was an early attempt to
prove mathematical theorems.
– Proved many theorems from first chapter of
whitehead and Russell’s Principia Mathematica.
• Gelernter’s theorem prover explored
another area of Mathematics: Geometry.
• Then extended to commonsense
reasoning. Includes-
– Reasoning about physical objects and their
relationships to each other.
– Reasoning about actions and their
consequences.
– To investigate this sort of reasoning Novel,
shaw, and Simon built the GPS (General
Problem Solver).
• (all these are simple tasks which uses
small amounts of knowledge)
• Later AI research progressed and techniques for
handling large amounts of world knowledge was
developed. These include –
– Perception (vision and speech)
– Natural language understanding, and
– Problem Solving in a specialized domains (medical
diagnosis, chemical analysis etc..)
• Then improvements happened in Natural Language
Processing (NLP)
• Not only to understand vocabulary and grammar but also
important to deal about unstated assumptions can be recognized.
• Later on moved to Engineering design, Scientific
discovery, medical diagnosis, and financial
planning.
• Expert Systems came into existence and
continuing..
Task Domains of AI
• AI has applications in all fields of human
study, such as finance and economics,
environmental engineering, chemistry,
computer science, and so on. Some of the
applications of AI are listed below:
• Perception
– Machine vision
– Speech understanding
– Touch ( tactile or haptic) sensation
• Robotics
• Natural Language Processing
– Natural Language Understanding
– Speech Understanding
– Language Generation
– Machine Translation
• Planning
• Expert Systems
• Machine Learning
• Theorem Proving
• Symbolic Mathematics
• Game Playing
• Etc.
• The following questions are to be considered
before we embarking on study of specific AI
problems and solution techniques:
– What are the underlying assumptions about
intelligence?
– What kinds of techniques will be useful for
solving AI problems?
– At what level human intelligence can be
modelled?
– When will it be realized when an intelligent
program has been built?
The Underlying Assumption
The field of artificial intelligence (AI) is built upon several underlying
assumptions that guide its research, development, and application. These
assumptions are fundamental to the way AI systems are designed, trained,
and deployed. Some of the key underlying assumptions of AI include:
• Computational Representation of Knowledge: AI assumes that
knowledge can be represented in a computationally tractable form, such as
symbols, rules, or statistical models. This allows AI systems to manipulate
and reason with knowledge to solve problems.
• Learning from Data: AI assumes that learning from data is a powerful
approach for creating intelligent systems. Machine learning algorithms, for
example, learn patterns and make predictions based on training data,
allowing AI systems to improve their performance over time.
• Generalization: AI assumes that patterns and knowledge learned from
specific examples can be generalized to new, unseen examples. This
enables AI systems to make accurate predictions or decisions in novel
situations based on their training data.
• Autonomy: AI assumes that intelligent systems can operate
autonomously, making decisions and taking actions without constant
human intervention. This is particularly relevant in areas such as robotics
and autonomous vehicles.
• Rationality: AI assumes that intelligent agents act rationally to
achieve their goals, given their knowledge and beliefs about the
world. Rationality does not necessarily imply perfect decision-
making but rather making decisions that maximize expected utility
based on available information.
• Emulation of Human Intelligence: While not a strict requirement,
many AI systems are designed to emulate human intelligence to
some extent. This includes tasks such as natural language
processing, computer vision, and decision-making, which are
inspired by human cognitive abilities.
• Scalability: AI assumes that intelligent systems can scale to handle
increasingly complex tasks and large volumes of data. This
scalability is essential for applications such as search engines,
recommendation systems, and data analytics.
• Ethical and Social Considerations: With the increasing
deployment of AI systems in society, there is an assumption that
ethical and social considerations must be addressed to ensure
responsible and beneficial use of AI. This includes issues such as
bias, fairness, transparency, and accountability.
• These assumptions form the foundation of AI research and
development, shaping the design, implementation, and evaluation
of AI systems across various domains and applications.
AI Technique:
• Artificial Intelligence research during the last
three decades has concluded that Intelligence
requires knowledge. To compensate
overwhelming quality, knowledge possesses
less desirable properties including:
A. It is huge.
B. It is difficult to characterize correctly.
C. It is constantly varying.
D. It differs from data by being organized in a
way
that corresponds to its application.
E. It is complicated.
An AI technique is a method that exploits
knowledge that is represented so that:
• The knowledge captures generalizations
that share properties, are grouped
together, rather than being allowed
separate representation.
• It can be understood by people who must
provide it—even though for many
programs bulk of the data comes
automatically from readings.
• In many AI domains, how the people
understand the same people must supply
the knowledge to a program.
• It can be easily modified to correct
errors and reflect changes in real
conditions.
• It can be widely used even if it is
incomplete or inaccurate.
• It can be used to help overcome its
own sheer bulk by helping to narrow
the range of possibilities that must
be usually considered.
AI Problems and series of approaches:
• In order to characterize an AI technique
let us consider initially OXO or tic-tac-
toe and use a series of different
approaches to play the game.
• The programs increase in complexity,
their use of generalizations, the clarity
of their knowledge and the extensibility
of their approach.
• In this way they move towards being
representations of AI techniques.
Example-1:Tic-Tac-Toe
The first approach (simple) : The
Tic-Tac-Toe game consists of a nine
element vector called BOARD; it
represents the numbers 1 to 9 in three
rows.
• An element contains the value
0 for blank, 1 for X and 2 for O.
• A MOVETABLE vector consists of
19,683 elements (39 ) and is needed
where each element is a nine element
vector.
• The contents of the vector are especially
chosen to help the algorithm.
• The algorithm makes moves by pursuing the
following:
1. View the vector as a ternary number. Convert
it to a decimal number.
2. Use the decimal number as an index in
MOVETABLE and access the vector.
3. Set BOARD to this vector indicating how the
board looks after the move.
This approach is capable in time but it has several
disadvantages. It takes more space and requires
stunning effort to calculate the decimal numbers. This
method is specific to this game and cannot be
completed.
• For example, let's say we have the following Tic
Tac Toe board represented as a vector:
– board = [0, 1, 0, 2, 1, 0, 0, 2, 1]
• To view this vector board as a ternary number,
we concatenate the elements of the vector from
left to right. So the ternary representation would
be:
– board_ternary = 010210021
• Now, to convert this ternary number to a decimal
number:
– board_decimal = (0 * 3^8) + (1 * 3^7) + (0 * 3^6) +
(2 * 3^5) + (1 * 3^4) + (0 * 3^3) + (0 * 3^2) + (2 *
3^1) + (1 * 3^0)
= 0 + 2187 + 0 + 486 + 81 + 0 + 0 + 6 + 1
= 2761
1) Procedure:
• Elements of vector:
– 0: Empty
– 1: X
– 2: O
→ the vector is a ternary number
2) Store inside the program a move-
table (lookuptable):
a) Elements in the table: 19683 (39 )
b) Element = A vector which
describes the most suitable move.
Comments:
1. A lot of space to store the Move-Table.
2. A lot of work to specify all the entries in the
Move-Table.
3. Difficult to extend
The second approach (Program 2)
• The structure of the data is as before but we use 2 for a blank, 3 for an
X and 5 for an O.
• A variable called TURN indicates 1 for the first move and 9 for the last.

The algorithm consists of three actions:


• MAKE2 which returns 5 if the centre square is blank; otherwise it
returns any blank noncorner square, i.e. 2, 4, 6 or 8.
• POSSWIN (p) returns 0 if player p cannot win on the next move and
otherwise returns the number of the square that gives a winning move.
It checks each line using products 3*3*2 = 18 gives a win for X,
5*5*2=50 gives a win for O, and the winning move is the holder of the
blank.
• GO(n) makes a move to square n setting BOARD[n] to 3 or 5.

This algorithm is more involved and takes longer but it is more efficient
in storage which compensates for its longer time. It depends on the
programmer’s skill.
• Data Structure:
1) Use vector, called board, as Solution
1
2) However, elements of the vector:
2: Empty
3: X
5: O
3) Turn of move: indexed by integer
1,2,3, etc
Make2:
a) Return a location on a game-board.
IF (board[5] = 2) RETURN 5;
//the center cell.
ELSE RETURN any cell that is not at
the board’s corner; // (cell: 2,4,6,8)
b) Let P represent for X or O
c) can_win(P) : P has filled already at
least two cells on a straight line
(horizontal, vertical, or diagonal)
d) cannot_win(P) = NOT(can_win(P))
2. Posswin(P):
IF (cannot_win(P))
RETURN 0;
ELSE
RETURN index to the empty cell on the
line of can_win(P)
Let odd numbers are turns of X
Let even numbers are turns of O
3. Go(n): make a move
Algorithm
1. Turn = 1: (X moves)
• Go(1) //make a move at the left-top cell
2. Turn = 2: (O moves)
IF board[5] is empty THEN Go(5)
ELSE Go(1)
3. Turn = 3: (X moves)
IF board[9] is empty THEN Go(9)
ELSE Go(3).
4. Turn = 4: (O moves)
IF Posswin (X) <> 0 THEN Go (Posswin (X)) //Prevent the opponent to win
ELSE Go (Make2)
5. Turn = 5: (X moves)
IF Posswin(X) <> 0 THEN Go(Posswin(X)) //Win for X.
ELSE IF Posswin(O) <> THEN Go(Posswin(O)) //Prevent the opponent to
win
ELSE IF board[7] is empty THEN Go(7)
ELSE Go(3).
Comments:
1. Not efficient in time, as it has to
check several conditions before
making each move.
2. Easier to understand the program’s
strategy. 3. Hard to generalize.
Program 2’
• This is similar to program 2 but only change in board
representation. 8 3 4
1 5 9

6 7 2

• Numbering of Board produces magic square: all


rows, columns, and diagonals sum upto 15.
• This simplifies the process of checking for a possible
win.
• A list is maintained for each player with every move.
(pair of squares)
• And for next move, difference of 15and the sum of
squares is going to be calculated.
The final approach (Program 3): minimax
procedure

• This algorithm looks ahead to make a


decision on the next move by deciding
which the most promising move or the
most suitable move at any stage would be
and selects the same.
• Consider all possible moves and replies
that the program can make. Continue this
process for as long as time permits until a
winner emerges, and then choose the
move that leads to the computer program
winning, if possible in the shortest time.
• Define Functions:
• Minimax Algorithm: Implement the
Minimax algorithm to determine the best
move for the computer player ('O'). The
Minimax algorithm is a recursive algorithm
that evaluates all possible future moves and
chooses the one that maximizes the
computer player's chances of winning while
minimizing the opponent's chances.
• Evaluate Board: Create a function to
evaluate the current state of the board and
assign a score to the board. This function will
be used by the Minimax algorithm to
determine the best move.
• Minimax Algorithm:
– The Minimax algorithm is based on the concept of
a game tree, where each node represents a
possible move and each edge represents a
possible outcome.
– The algorithm alternates between two players,
maximizing the computer player's score and
minimizing the opponent's score.
– At each level of the tree, the algorithm considers
all possible moves and recursively evaluates the
resulting board states.
– The algorithm assigns a score to each board state
based on whether it leads to a win, loss, or draw
for the computer player ('O').
– The computer player ('O') chooses the move that
leads to the highest score.
• Evaluate Board Function:
– The Evaluate Board function examines
the current state of the board and
assigns a score to it based on the
following criteria:
• If the computer player ('O') wins, assign a
high positive score.
• If the opponent ('X') wins, assign a high
negative score.
• If it's a draw, assign a neutral score.
• The score can be adjusted based on the
depth of recursion to favor quicker wins or
avoid early losses.
• The minimax algorithm is a decision-making technique used in two-player
zero-sum games like Tic Tac Toe. It helps a player choose the optimal move
by considering all possible future game states and their outcomes.
Here's how minimax works with Tic Tac Toe:
1. Game State and Actions:
• Imagine the game board as the current state. Each empty cell represents a
possible action the current player can take.
2. Recursive Exploration:
• The minimax algorithm works recursively. It starts by evaluating the current
state (board) from the current player's perspective.
• For each available move (empty cell), the algorithm simulates the
opponent's (minimizing player) best possible response. This involves
recursively calling minimax again, but assuming the opponent makes the
move that minimizes the current player's score.
3. Scoring and Backtracking:
• At the end of each simulated game (reaching a win, draw, or full board), the
minimax algorithm assigns a score based on the outcome:
– +10: Current player wins.
– -10: Opponent wins.
– 0: Draw.
• This score is then "backed up" to the previous state (parent node in the
game tree).
4. Maximizing vs. Minimizing:
• The current player (maximizing player) wants to choose the move that leads
to the highest score (minimizing the opponent's score).
• The minimax algorithm compares the scores returned from simulating each
possible move and chooses the one with the highest score for the
maximizing player.
Tic Tac Toe Example:
• Let's consider a simplified scenario where X is the current player
(maximizing) and O is the opponent (minimizing). The current board state is:

• X can make three moves (empty cells).


• For each move, minimax simulates O's (opponent) best response:
– If X moves to the top left, O can potentially win by placing O in the bottom right.
Minimax assigns a score of -10 for this scenario.
– Similarly, minimax simulates the other two moves and assigns scores based on the
best possible outcome for O.
• Finally, minimax compares the scores for each of X's moves. If X moves to
the center, it forces a draw at worst (score 0). In the other two scenarios, X
risks losing (score -10).
• Therefore, minimax recommends X to move to the center to achieve the best
possible outcome (avoid losing).
• Benefits of Minimax:
• Minimax guarantees an optimal move for the maximizing
player, considering all possible future game states reachable
within a specified depth.
• It's relatively easy to understand and implement for simpler
games like Tic Tac Toe.
• Limitations of Minimax:
• The number of possible game states grows exponentially with
the game's complexity (number of moves and board size). This
can make minimax computationally expensive for complex
games like chess.
• It assumes perfect play from both players, which might not be
realistic in real-world scenarios.
• In conclusion, the minimax algorithm provides a powerful tool
for making optimal decisions in two-player zero-sum games like
Tic Tac Toe. However, its computational complexity can be a
challenge for more complex games, leading to the exploration
of alternative techniques like alpha-beta pruning.
• def create_board():
• """
• Creates an empty Tic Tac Toe board.
• """
• return [' '] * 9

• def print_board(board):
• """
• Prints the Tic Tac Toe board in a formatted way.
• """
• for i in range(3):
• print(' | '.join(board[i * 3:(i * 3) + 3]))
• if i < 2:
• print('-' * 9)

• def is_valid_move(board, position):


• """
• Checks if a move is valid (position is empty).
• """
• return board[position] == ' '

• def make_move(board, player, position):


• """
• Places a player's mark on the board at the specified position.
• """
• board[position] = player
• def is_winner(board, player):
• """
• Checks if a player has won the game.
• """
• win_conditions = ((0, 1, 2), (3, 4, 5), (6, 7, 8),
• (0, 3, 6), (1, 4, 7), (2, 5, 8),
• (0, 4, 8), (2, 4, 6))
• for condition in win_conditions:
• if all(board[pos] == player for pos in condition):
• return True
• return False

• def is_board_full(board):
• """
• Checks if all the squares on the board are filled.
• """
• return all(x != ' ' for x in board)

• def main():
• """
• Main function to run the Tic Tac Toe game.
• """
• board = create_board()
• current_player = 'X'

• while True:
• print_board(board)

• # Get player input
• position = int(input(f"Player {current_player}, enter your move (1-9): ")) - 1

• # Validate move
• if not is_valid_move(board, position):
• print("Invalid move. Please try again.")
• continue

• # Make move
• make_move(board, current_player, position)

• # Check for winner or draw


• if is_winner(board, current_player):
• print_board(board)
• print(f"Player {current_player} wins!")
• break
• elif is_board_full(board):
• print_board(board)
• print("It's a draw!")
• break

• # Switch player
• current_player = 'O' if current_player == 'X' else 'X'

• if __name__ == "__main__":
• main()
Example-2: Question
Answering
• Let us consider Question Answering
systems that accept input in English and
provide answers also in English.
• This problem is harder than the previous
one as it is more difficult to specify the
problem properly.
• Another area of difficulty concerns
deciding whether the answer obtained is
correct, or not, and further what is meant
by ‘correct’.
For example, consider the following situation:

• Text
– Rani went shopping for a new Coat. She
found a red one she really liked. When
she got home, she found that it went
perfectly with her favourite dress.
• Question
1. What did Rani go shopping for?
2. What did Rani find that she liked?
3. Did Rani buy anything?
Method 1
• Data Structures
– A set of templates that match common
questions and produce patterns used to match
against inputs. Templates and patterns are
used so that a template that matches a given
question is associated with the corresponding
pattern to find the answer in the input text.
– For example, the template who did x y
generates x y z if a match occurs and z is the
answer to the question. The given text and the
question are both stored as strings.
Algorithm: Answering a question requires the
following four steps to be followed:
• Compare the template against the questions
and store all successful matches to produce
a set of text patterns.
• Pass these text patterns through a
substitution process to change the person or
voice and produce an expanded set of text
patterns.
• Apply each of these patterns to the text;
• collect all the answers and then print the
answers.
Example:
In question 1 we use the template WHAT DID
X Y which generates Rani go shopping for z
and after substitution we get Rani goes
shopping for z and Rani went shopping for z
giving z [equivalence] a new coat.
In question 2 we need a very large number
of templates and also a scheme to allow the
insertion of ‘find’ before ‘that she liked’; the
insertion of ‘really’ in the text; and the
substitution of ‘she’ for ‘Rani’ gives the
answer ‘a red one’.
Question 3 cannot be answered.
• Comments :
– This is a very primitive approach
basically not matching the criteria we
set for intelligence and worse than that,
used in the game. Surprisingly this type
of technique was actually used in ELIZA.
Method 2
Data Structures:
A structure called English consists of a dictionary, grammar and
some semantics about the vocabulary we are likely to come
across.
This data structure provides the knowledge to convert English
text into a storable internal form and also to convert the response
back into English.
The structured representation of the text is a processed form
and defines the context of the input text by making explicit all
references such as pronouns.
There are three types of such knowledge representation
systems:
production rules of the form ‘if x then y’,
slot and filler systems
and statements in mathematical logic.
The system used here will be the slot and filler system.
Take, for example sentence: ‘She found a red
one she really liked’.

The question is stored in two forms: as input


and in the above form.
Algorithm:
• Convert the question to a structured form
using English know how, then use a marker
to indicate the substring (like ‘who’ or
‘what’) of the structure, that should be
returned as an answer. If a slot and filler
system is used a special marker can be
placed in more than one slot.
• The answer appears by matching this
structured form against the structured text.
• The structured form is matched against the
text and the requested segments of the
question are returned.
Examples:
Both questions 1 and 2 generate answers via
a new coat and a red coat respectively. Question
3 cannot be answered, because there is no direct
response.

Comments
This approach is more meaningful than the
previous one and so is more effective. The extra
power given must be paid for by additional
search time in the knowledge bases.
A warning must be given here: that is – to
generate unambiguous English knowledge base
is a complex task.
The problems of handling pronouns are
difficult.
For example:
• Rani walked up to the salesperson: she
asked where the toy department was.
• Rani walked up to the salesperson: she
asked her if she needed any help.
– Whereas in the original text the linkage of
‘she’ to ‘Rani’ is easy, linkage of ‘she’ in each
of the above sentences to Rani and to the
salesperson requires additional knowledge
about the context via the people in a shop.
Method 3
• Data Structures :
• World model contains knowledge about objects,
actions and situations that are described in the
input text.
• This structure is used to create integrated text
from input text.
• The diagram shows how the system’s knowledge
of shopping might be represented and stored.
• This information is known as a script and in this
case is a shopping script.
Algorithm
• Convert the question to a structured form
using both the knowledge contained in Method
2 and the World model, generating even more
possible structures, since even more
knowledge is being used. Sometimes filters
are introduced to prune the possible answers.
• To answer a question, the scheme followed is:
Convert the question to a structured form as
before but use the world model to resolve any
ambiguities that may occur. The structured
form is matched against the text and the
requested segments of the question are
returned.
• Example
– Both questions 1 and 2 generate
answers, as in the previous program.
– Question 3 can now be answered. The
shopping script is instantiated and from
the last sentence the path through step
14 is the one used to form the
representation. ‘M’ is bound to the red
coat-got home. ‘Rani buys a red coat’
comes from step 10 and the integrated
text generates that she bought a red
coat.
• Comments
• This program is more powerful than both the previous
programs because it has more knowledge.
• Thus, like the last game program it is exploiting AI
techniques.
• However, we are not yet in a position to handle any
English question. The major omission is that of a
general reasoning mechanism known as inference to
be used when the required answer is not explicitly
given in the input text.
• But this approach can handle, with some
modifications, questions of the following form with the
answer—Saturday morning Rani went shopping. Her
brother tried to call her but she did not answer.
– Question: Why couldn’t Rani’s brother reach her?
– Answer: Because she was not in.
• This answer is derived because we
have supplied an additional fact that
a person cannot be in two places at
once. This patch is not sufficiently
general so as to work in all cases and
does not provide the type of solution
we are really looking for.
• Question answering (QA) is a fundamental and challenging problem in the field of Artificial
Intelligence (AI), specifically within Natural Language Processing (NLP). It aims to develop systems
that can automatically answer questions posed by humans in natural language.
Here are some key aspects of the question answering problem:

1. Understanding Natural Language:


• Unlike simple keyword matching, QA systems need to understand the intent behind a question.
• This involves tasks like:
– Identifying the question type: Is it factual, open ended, requiring reasoning, or something else?
– Extracting key entities and their relationships: Who, what, when, where, why, and how are mentioned in
the question and how do they relate to each other?
– Understanding the context: What information is provided in the surrounding text or the user's previous
interactions?

2. Finding Relevant Information:


• Once the question is understood, the system needs to find the relevant information to answer it.
This may involve:
– Searching through a massive knowledge base: This could be a general knowledge base or a domain-
specific one, depending on the nature of the question.
– Retrieving relevant documents: If the answer is not explicitly present in a knowledge base, the system
might need to retrieve and process relevant documents from a large corpus of text.

3. Generating the Answer:


• Finally, the system needs to generate an answer in a natural language format that is:
– Factual and accurate: The answer should be based on the retrieved information and not include any
misinformation.
– Relevant and concise: The answer should directly address the question and avoid irrelevant details.
– Clear and understandable: The answer should be phrased in natural language that is easy for the user to
understand.
Challenges of Question Answering:

• Ambiguity and complexity of natural language: Language can be ambiguous, with


multiple meanings for words and phrases depending on context. Understanding the nuances of
language is challenging for AI systems.
• Open ended and challenging questions: Not all questions have clear-cut answers, and
some may require reasoning, common sense, or knowledge of the real world that is difficult to
encode in a computer program.
• Keeping knowledge bases and information sources up-to-date: As the world and
information constantly change, ensuring the knowledge base and information sources used by
QA systems are accurate and up-to-date is crucial.

Approaches to Question Answering:


• Rule-based systems: These rely on hand-crafted rules to identify question types, extract
information, and generate answers. However, they can be difficult to maintain and scale to
handle the diversity of natural language.
• Statistical learning: Machine learning algorithms are trained on large datasets of questions
and answers to learn patterns and automatically generate responses. This approach is more
flexible but requires significant data and computational resources.

Applications of Question Answering:


• Search engines: QA technology is used to power advanced search functionalities that can
understand complex queries and provide more relevant and informative results.
• Virtual assistants: Chatbots and virtual assistants leverage QA to answer user questions
about various topics and complete tasks.
• Education and training: QA systems can be used to create interactive learning environments
where users can ask questions and receive immediate answers, enhancing the learning
experience.
• Overall, question answering is an active area of research in AI with significant progress being
made. However, it remains a challenging problem due to the complexities of natural language
and the ever-evolving nature of information.
• import spacy
• # Load the spaCy language model
• nlp = spacy.load("en_core_web_sm")
• def answer_question(question, text):
• """
• This is a simplified example and doesn't represent a complete QA system.
• It performs basic named entity recognition and keyword matching.
• Args:
• question: The question to be answered (string).
• text: The text to be analyzed (string).

• Returns:
• A potential answer extracted from the text (string), or "No answer found" if no match is found.
• """
• # Process the question and text using spaCy
• doc_question = nlp(question)
• doc_text = nlp(text)
• # Extract named entities from the question
• question_entities = [ent.text for ent in doc_question.ents]
• # Look for entities and keywords in the text that match the question
• for entity in question_entities:
• if entity.lower() in text.lower():
• # Simplistic answer extraction based on keyword matching
• return f"A possible answer based on keyword matching: {entity}"
• return "No answer found"
• # Example usage
• question = "What is the capital of France?"
• text = "France is a European country. Paris is its capital city."
• answer = answer_question(question, text)
• print(answer)

• #output
• = RESTART: C:/Users/NANDINI/AppData/Local/Programs/Python/Python311/Scripts/nlp.py
• A possible answer based on keyword matching: France
Example:
You are using a search engine and want to know the capital of France. You type the
question: "What is the capital of France?" into the search bar.
• The question answering system performs the following steps:
• Understanding the question: The system identifies the question type (factual
question) and recognizes the named entity "France" as a country.
• Finding relevant information: The system searches its database of information,
which may include text documents and knowledge bases. It retrieves relevant
information related to "France" and its capital city.
• Generating the answer: The system extracts the answer "Paris" from the
retrieved information and presents it to you in a concise and informative way: "The
capital of France is Paris."
• Additional Information:
• This example showcases a retrieval-based approach to question answering.
However, other approaches exist, including generative models that might directly
generate an answer like: "Bonjour! I can tell you that the capital of France is the
beautiful city of Paris."
• Furthermore, question answering systems are constantly evolving, and researchers
are exploring ways to improve their capabilities in various aspects, such as:
• Handling more complex and open-ended questions.
• Understanding the context of the question and providing relevant answers based
on the context.
• Generating answers that are not only factually accurate but also grammatically
correct and engaging.
Example:
• Scenario:
• You're reading an online news article about the latest advancements in electric vehicle technology.
You come across a sentence mentioning "lithium-ion batteries" and are curious about their specific
advantages and disadvantages. Instead of searching the web yourself, you decide to ask the built-
in AI assistant within the news platform: "What are the advantages and disadvantages of lithium-
ion batteries?"
• The question answering system performs the following steps:
• Understanding the context: The system analyzes the surrounding text and recognizes the
mention of "lithium-ion batteries" within the context of the news article about electric vehicles.
This helps the system understand the user's intent and focus on information related to the specific
context.
• Finding relevant information: The system leverages its knowledge base and potentially
searches the surrounding article for relevant information about lithium-ion batteries. It retrieves
information that discusses both the advantages (e.g., high energy density, long lifespan) and
disadvantages (e.g., cost, safety concerns).
• Generating the answer: The system summarizes the retrieved information, focusing on the
advantages and disadvantages relevant to the context of electric vehicles. It presents the answer
in a concise and informative way, potentially even referencing specific details from the
surrounding article.
• Example Answer:
• "Lithium-ion batteries offer several advantages for electric vehicles, including high energy density,
allowing for longer range on a single charge, and longer lifespans compared to other battery
technologies. However, they also come with disadvantages, such as higher cost compared to some
alternatives and potential safety concerns related to thermal runaway in rare cases."
• This example demonstrates a hybrid approach, combining context understanding with information
retrieval and summarization to provide a focused and informative answer tailored to the user's
specific question within the context of the surrounding information.
Conclusion:
• In the above 2 problems, the final
program exemplifies what we mean
by an AI Technique. Here come
across 3 main AI Techniques:
– Search
– Use of Knowledge
– Abstraction
The Level of the Model(Approaches to AI)
• Acting humanly: The Turing test
approach ..
• Thinking humanly: The cognitive
modelling approach ..
• Thinking rationally: The ``laws of
thought'' approach ..
• Acting rationally: The rational agent
approach..
Acting humanly: The Turing test
approach
Cont..
 To pass the Turing Test a machine will need the capabilities of
-natural language processing to enable it to
communicate successfully in English;
- knowledge representation to store what it knows or
hears;
- automated reasoning to use the stored information to
answer questions and to draw new conclusions;
- machine learning to adapt to new circumstances and
to detect and extrapolate patterns.
 Total Turing Test: Also tests the subject’s perceptual abilities
through video and passing physical objects; additional
capabilities of
- Computer vision
- Robotics
Cont..
• Importance: This approach focuses
on creating AI systems that interact
with humans in a natural and
understandable way.
• This can improve user
experience, trust, and acceptance of
AI.
• Examples include chatbots that use
natural language or robots that move
and behave in ways that are familiar
"Thinking Humanly: The Cognitive
Modeling Approach":
• the idea of creating computer
programs that think like humans.
• determining how humans think.
• need to get inside the actual
workings of human minds.
• There are three ways to do this:
introspection, psychological
experiments, and brain imaging.
Cont..
• through introspection—trying to
catch our own thoughts as they go
by;
• through psychological experiments—
observing a person in action;
• and through brain imaging—
observing the brain in action.
Building Cognitive
Models:
• Understanding the Mind Through
Computation- Cognitive models are
computational representations of mental
processes. They attempt to capture how
humans think, learn, and make decisions.
• The interdisciplinary field of cognitive
science brings together computer models
from AI and experimental techniques from
psychology to construct precise and
testable theories of the human mind.
Building these models involves:
1. Defining the Scope:
– What cognitive process are you modeling? (e.g., memory, decision-making, language
comprehension)
– What level of detail is needed? (e.g., individual neurons, brain regions, psychological
constructs)
2. Gathering Data:
– Behavioral data (e.g., reaction times, accuracy rates)
– Physiological data (e.g., brain scans, eye movements)
– Introspective data (e.g., verbal reports, self-reflection)
3. Choosing a Computational Framework:
– Symbolic AI (e.g., rules, logic)
– Connectionist AI (e.g., artificial neural networks)
– Bayesian networks (e.g., probabilistic reasoning)
4. Developing the Model:
– Implementing the chosen framework
– Training the model on the gathered data
– Refining the model based on evaluation
5. Testing and Evaluation:
– Comparing model predictions to human behavior
– Analyzing strengths and weaknesses of the model
– Iterating on the model based on the evaluation
Cont..
• Importance: This approach aims to
replicate human-like cognitive
abilities, such as
learning, reasoning, and problem-
solving.
• This can lead to more adaptable and
intelligent AI systems.
• Examples include self-driving cars
that make decisions like human
drivers or AI systems that diagnose
Thinking Rationally: The "Laws of Thought"
Approach

• The "laws of thought" approach to


rationality aims to establish a set of
fundamental principles for logical
reasoning.
• These principles, often referred to as
laws of logic, are considered to be
universally true and provide a
framework for evaluating the validity
of arguments and inferences.
Core principles:
Some of the fundamental laws of thought
include: Law of Identity: A statement is true if
and only if it is true (e.g., "All bachelors are
unmarried").
Law of Non-Contradiction: A statement
cannot be both true and false at the same time
(e.g., "It is both raining and not raining
outside").
Law of Excluded Middle: Every statement is
either true or false, there is no third option
(e.g., "The ball is either red or not red").
Applications:
These laws can be used to:
• Identify fallacies in arguments
(e.g., pointing out a violation of the
law of non-contradiction).
• Construct valid arguments that are
guaranteed to lead to true
conclusions.
• Develop formal systems of logic, such
as propositional logic and predicate
logic.
Cont..
• The "laws of thought" approach
provides a clear and rigorous
framework for evaluating reasoning.
• It can help to identify and avoid
common errors in thinking.
• It has applications in various
fields, including computer
science, mathematics, and
philosophy.
Cont..
• Goal: Aims to create AI systems that make logical
and well-founded decisions based on available
information.
• Importance:
– Reduces errors and biases: By following clear
reasoning patterns, AI can avoid mistakes and unfair
judgments.
– Improves explainability and transparency: Logical
decision-making processes are easier to understand and
audit, fostering trust in AI systems.
– Enables effective planning and problem-solving: AI
can analyze situations, consider alternatives, and choose
optimal actions rationally.
Challenges:

• Defining rationality: What constitutes


"rational" behavior can vary depending on the
context and goals of the AI system.
• Handling incomplete information: Real-
world scenarios often involve uncertainty and
ambiguity, requiring AI to reason effectively
despite limitations.
• Balancing logic with other factors: Purely
rational AI might not consider ethical or social
implications, necessitating careful design
choices.
Acting Rationally: The Rational Agent Approach

• The rational agent approach is a


way of thinking about artificial
intelligence (AI) that focuses on
creating agents that act in a way
that is expected to achieve their
goals, given their beliefs about
the world.
• This approach is based on the idea
that an agent's actions should be
guided by logic and reason, rather
Here are some key points about the
rational agent approach:
• Goals and beliefs: A rational agent has well-
defined goals and beliefs about the
world. These goals and beliefs guide the
agent's decision-making.
• Perception and action: The agent perceives
the world through its sensors and takes actions
that it believes will help it achieve its goals.
• Performance measure: The agent's
performance is measured by how well it
achieves its goals, given its limited resources
and knowledge.
Here are some examples:
• Self-driving cars: These systems have the goal of
safely navigating from one point to another. They use
sensors to perceive the world around them and make
decisions about how to steer, brake, and accelerate.
• Chess-playing programs: These programs have the
goal of winning the game of chess. They use their
knowledge of the rules of chess and their evaluation of
the current board position to choose their next move.
• Recommendation systems: These systems have the
goal of recommending products or services that users are
likely to be interested in. They use information about the
user's past behavior and the characteristics of different
products or services to make their recommendations.
Cont..
• Goal: Aims to create AI systems that behave in
ways that achieve their goals effectively in the real
world.
• Importance:
– Increases effectiveness: AI can adapt its actions to
different situations and unforeseen circumstances to
achieve its objectives.
– Enables interaction and collaboration: AI can act in
ways that are understandable and predictable for
humans, facilitating cooperation.
– Promotes responsible AI development: Considering
real-world impacts of AI actions encourages ethical and
beneficial applications.
Cont..
• Challenges:
• Aligning goals with human values: Ensuring AI
actions align with desired outcomes and societal
values requires careful consideration of potential
risks and unintended consequences.
• Accounting for emotions and social
cues: Human interactions often involve emotions
and social nuances that AI may struggle to
understand and respond to appropriately.
• Avoiding manipulation and deception: It's
crucial to design AI that acts transparently and
avoids misleading or exploiting others.
Pros and Cons of 4
approaches..
• Acting Like Humans:
• Pros: Can make AI more relatable and
understandable to users, potentially
fostering trust and acceptance. Useful for
tasks like natural language processing and
human-computer interaction.
• Cons: Can be misleading or manipulative if
AI doesn't truly understand human emotions
or intentions. Raises ethical concerns about
artificial sentience or consciousness.
Cont..
• Thinking Like Humans:
• Pros: Could lead to AI with more flexible and
adaptable reasoning abilities, able to handle
complex situations and learn from
experience. Useful for tasks like problem-solving
and decision-making in uncertain environments.
• Cons: Difficult to define and replicate what
"thinking like a human" even means. Human
thought is messy and influenced by
emotions, biases, and social contexts, which
might be challenging for AI to model accurately.
Cont..
• Thinking Rationally:
• Pros: Provides a clear framework for AI
decision-making, potentially reducing errors
and biases. Useful for tasks requiring logical
analysis and objective reasoning.
• Cons: Can be overly simplistic and struggle
with real-world complexities like incomplete
information or ethical dilemmas. Might not
account for emotional or social factors
important in human interactions.
Cont..
• Acting Rationally:
• Pros: Ensures AI actions align with its goals
and achieve desired outcomes
effectively. Useful for tasks requiring efficient
task completion and adaptation to changing
environments.
• Cons: Needs careful consideration of AI's goals
to ensure they align with human values and
don't cause harm. Must avoid manipulation or
deception, and account for social contexts and
potential unintended consequences.
Criteria for success
In the very beginning i.e in 1950 Alan Turing designed a test called Turing Test. But now The criteria for success
in artificial intelligence (AI) can vary depending on the specific task, application, and context. Some common
criteria used to evaluate the success of AI systems include:
• Accuracy: This criterion measures how well the AI system performs its intended task. For example, in a
machine learning model for image classification, accuracy refers to the percentage of correctly classified
images compared to the total number of images.
• Precision and Recall: Precision measures the proportion of true positive predictions out of all positive
predictions made by the AI system, while recall measures the proportion of true positive predictions out of all
actual positive instances in the dataset. These metrics are commonly used in tasks such as information
retrieval and binary classification.
• Speed and Efficiency: The speed and efficiency of an AI system refer to how quickly it can perform its tasks
and how efficiently it utilizes computational resources such as CPU, memory, and energy. Faster and more
efficient systems are often preferred in real-time applications and resource-constrained environments.
• Robustness: Robustness measures the ability of an AI system to perform consistently and accurately across
different conditions, such as varying input data, noise, or environmental changes. A robust system can
maintain its performance under different scenarios without significant degradation.
• Scalability: Scalability refers to the ability of an AI system to handle increasing amounts of data, users, or
computational demands while maintaining its performance. Scalable systems can efficiently process large
datasets or accommodate growing user bases without significant performance degradation.
• Interpretability: Interpretability refers to the degree to which an AI system's decisions and behaviors can be
understood and explained by humans. Systems that are more interpretable are often preferred in applications
where transparency and accountability are important, such as healthcare and finance.
• Generalization: Generalization measures the ability of an AI system to apply its learned knowledge to new,
unseen data or tasks. A system that can generalize well can make accurate predictions or decisions in novel
situations beyond its training data.
• User Satisfaction: User satisfaction measures how well an AI system meets the needs and expectations of its
users. Factors such as usability, user experience, and user feedback are important for evaluating user
satisfaction.
• These criteria are often used individually or in combination to assess the success of AI systems in various
applications and domains. Depending on the specific goals and requirements of a project, additional criteria
may also be considered.
THE FOUNDATIONS OF ARTIFICIAL
INTELLIGENCE
• A brief history of the disciplines that contributed
ideas, viewpoints, and techniques to AI.
-Philosophy
-Mathematics
-Economics
-Neuroscience
-Psychology
-Computer engineering
-Control theory and cybernetics
-Linguistics
Philosophy : It discussed a historical overview of philosophical contributions
to the development of Artificial Intelligence (AI). It focuses on four key questions:

• Formal rules and reasoning: Can logical rules be used to draw


valid conclusions? Philosophers like Aristotle and Leibniz explored
this question, laying the groundwork for symbolic reasoning in AI.
• Mind and matter: Is the mind a physical system governed by the
laws of physics, or something separate from it? This debate
between dualism (Descartes) and materialism has implications for
understanding how intelligence arises.
• Source of knowledge: Where does knowledge come
from? Empiricism (Locke, Hume) emphasizes sensory
experience, while rationalism (Leibniz) highlights the role of
reason. AI research draws on both perspectives.
• Knowledge and action: How does knowledge lead to
action? Aristotle's work on goal-directed reasoning and decision-
making has influenced research in planning and decision-making
for AI systems.
Mathematics : This delves into the mathematical
foundations of Artificial Intelligence (AI), focusing on three key areas :
• Logic: Formal logic, originating from ancient Greece and formalized
by Boole, Frege, and Tarski, provides a framework for drawing valid
conclusions and reasoning with certainty.
• Computation: The concept of computability, explored by Gödel and
Turing, defines the limits of what can be achieved through
algorithmic processes. It highlights the existence of problems that
cannot be solved by machines, emphasizing the need for efficient
resource management in AI.
• Probability: Probability theory, pioneered by Cardano, Pascal, and
Bayes, helps deal with uncertainty and incomplete
information, crucial for AI systems operating in real-world scenarios.
• These mathematical contributions laid the groundwork for
developing AI models and algorithms capable of reasoning, learning,
and making decisions under various conditions. Understanding
these concepts is essential for further exploring the field of AI.
Economics: the contributions of economics to the field of Artificial Intelligence (AI), focusing on three key areas:

• Decision-making: How do individuals make choices to achieve their desired


outcomes? This involves concepts like utility theory, which formalizes the idea of
"preferred outcomes," and decision theory, which incorporates probability into
decision-making under uncertainty.
• Game theory: How do individuals make decisions when their choices affect each
other? This branch of economics studies strategic interactions between agents,
where one player's actions influence the payoffs of others.
• Sequential decision-making: How do individuals make choices when the
outcomes depend on a series of actions taken over time? This area, explored in
operations research, deals with problems where optimal decisions involve
considering future consequences.
highlights the concept of "satisficing" introduced by Herbert Simon, which
suggests that in the face of complex decisions, individuals often make choices that
are "good enough" rather than searching for the absolute optimal solution.
Overall, economics provides valuable frameworks and tools for AI research,
particularly in areas like multi-agent systems, robot planning, and resource
allocation. Understanding how individuals and groups make decisions can inform the
design of intelligent agents that interact effectively with the world and each other.
Neuroscience: an overview of neuroscience and its contributions to the field of Artificial Intelligence (AI). Here
are some key points:

• Brain structure and function: The brain consists of


interconnected nerve cells called neurons, responsible for
information processing. Different brain regions have specialized
functions, like speech production or sensory perception.
• Brain activity measurement: Techniques like EEG and MRI
allow scientists to observe brain activity during various
cognitive tasks, providing insights into how the brain works.
• Challenges in understanding the brain: Despite
advancements, fully understanding how the brain enables
thought, memory, and consciousness remains a scientific
mystery.
• Brain vs. computers: While sharing some similarities, brains
and computers differ significantly in their processing speed,
storage capacity, and architectural design.
The parts of a nerve cell or
neuron
Psychology:delves into the fascinating history of psychology and its contributions to
understanding how humans and animals think and act. Here are the key takeaways:

• Psychology as a science: The field emerged in the 19th


century with efforts to study mental processes using scientific
methods. Early pioneers like Wundt established experimental
psychology, while others like Jennings focused on objective
observation of animal behavior.
• Different perspectives: Two major schools of thought
emerged:
– Behaviorism: Focused on observable behaviors and stimuli-response
relationships, rejecting subjective introspection as unreliable.
– Cognitive psychology: Views the brain as an information
processor, studying internal mental processes like
memory, language, and decision-making.
• The rise of cognitive science: Combining psychology with
computer modeling led to this new field, aiming to understand
cognition through computational theories and simulations.
Computer engineering: a historical overview of computer engineering, focusing on how efficient computers have been
built and their role in artificial intelligence (AI). Here are the key takeaways:

• Early computers: The first digital computers were developed during


World War II, with the Colossus and ENIAC being influential early
models. These machines laid the foundation for modern computers.
• Moore's Law: For several decades, computer performance roughly
doubled every two years, following a trend known as Moore's
Law. This rapid progress was fueled by miniaturization of transistors
and other components.
• Challenges and future directions: As miniaturization reaches its
limits, future performance gains are expected to come from other
innovations like parallel processing and specialized hardware.
• Software's role: the importance of software, including operating
systems, programming languages, and tools, in enabling AI
development.
• AI's contributions to computer science: how research in AI has
also led to advancements in mainstream computer science, such as
time-sharing, interactive interfaces, and new programming concepts.
Control theory and cybernetics:

• Early examples of self-control: The idea of machines regulating their own


behavior dates back centuries, as seen in inventions like the water clock and the
steam engine governor.
• Birth of control theory: The 19th century saw the development of the
mathematical foundation for stable feedback systems, paving the way for more
advanced control mechanisms.
• Norbert Wiener and cybernetics: Wiener's work bridged the gap between
engineering and biology, suggesting parallels between machine control and animal
behavior. His book "Cybernetics" popularized the notion of intelligent machines.
• Homeostasis and adaptation: W. Ross Ashby and others explored the concept of
"homeostasis," where systems maintain stability through feedback loops, as a
potential principle for achieving intelligence.
• Modern control theory: Today, control theory aims to design systems that optimize
specific objectives over time, reflecting a common goal with AI.
• Divergence of AI and control theory: Despite their shared history, the two fields
diverged due to differences in their mathematical tools and the types of problems
they addressed. Control theory focused on continuous variables and well-defined
systems, while AI explored broader challenges like language, vision, and planning.
Linguistics: an interesting look at the relationship between linguistics and artificial
intelligence (AI), particularly regarding language and thought. Here are some key points:

• Behaviorism vs. Creativity:


Behaviorism, focusing on observable behavior, struggled to
explain how children use language creatively.
Chomsky's theory, emphasizing syntax and structure, offered an
alternative explanation for language acquisition and generation.
• Birth of Computational Linguistics:
Chomsky's work coincided with the development of AI, leading
to the field of computational linguistics, which applies computer
science to understand and process language.
• Beyond Syntax:
Language understanding requires knowledge of the world and
context, not just sentence structure.
Research in linguistics and philosophy informed the
development of knowledge representation in AI.

You might also like