Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
30 views23 pages

AI Course Overview for Students

lecture 1 A I course

Uploaded by

elmihassanf
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)
30 views23 pages

AI Course Overview for Students

lecture 1 A I course

Uploaded by

elmihassanf
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/ 23

02/15/2024

ECI-671
ARTIFICIAL INTELLIGENCE

Dr Junaid Ahmed
Associate Professor,
Electrical & Computer Engineering,
COMSATS University Islamabad.

Dr Junaid Ahmed

 Room 127 (1st floor)


 Email: [email protected]

 Phone: 051-9049240

 Course material will be made available at MS Teams


class portal.

1
02/15/2024

 Course Textbook
 Artificial Intelligence with Python by Alberto Artasanchez
and Prateek Joshi, second edition, 2020, Packt Publishing,
ISBN: 978-1-83921-953-5
 Artificial Intelligence A Modern Approach, by Stuart J.
Russell and Peter Norvig, Prentice Hall

 Additional recommended books:


 A Smarter Way to Learn Python, by Mark Myers, e-book
http://www.ASmarterWayToLearn.com

# Topic Assignment
1 Introduction. what is AI, Branches of AI, Use-cases of Install environment
AI. Machine Learning Pipelines. Deduction versus
induction reasoning. Reasoning with Certainty &
Uncertainty. Use-cases of AI
2 Machine Learning Pipelines. Importance of Data in AI Collect Dataset
3 Data Cleaning, Feature Selection and Feature Clean and refine your Data
Engineering
4 Supervised, unsupervised and reinforcement Learning. Apply machine learning to
Error Metrics, Decision Trees. your data
5 Neural Networks Develop a neural network for
your data
6 PyTorch and TensorFlow Implement your model using
PyTorch and TensorFlow
7 Deep Learning and Transfer Learning Use transfer learning on a
pretrained NN
8 Natural Language Programming Optimize an LLM
9 Search Techniques
10 Search Techniques

2
02/15/2024

1. Introduction: what is AI, Branches of AI, Use-cases of AI


2. Machine Learning Pipelines: Problem definition, Data
ingestion, Data preparation, Data segregation, Model
training, Model Evaluation, Model deployment,
Performance monitoring
3. Feature Selection and Feature Engineering:
Information Contribution of a Feature, Principal
Component Analysis, Data Preparation (Imputation,
Outlier management, One-hot encoding etc).
4. Introduction to Supervised Learning: Classification,
Regression
5. Introduction to Unsupervised Learning: Clustering,
K-Means algorithm, Gaussian Mixture Models
6. Search Techniques: Uninformed Search Strategies,
Informed Search Strategies, Local Search Algorithms,
constraint satisfaction problem.
7. Knowledge Representation (Optional)

 Quizzes/Assignments : 25%
 Midterm Exam : 25%
 Final Exam : 50%

3
02/15/2024

 Popular conception driven by science fiction


 Robots good at everything except emotions, empathy,
appreciation of art, culture, …
 … until later in the movie.

 Perhaps more representative of human autism than of


(current) real robotics/AI
 “It is my belief that the existence of autism has
contributed to [the theme of the intelligent but soulless
automaton] in no small way.” [Uta Frith, “Autism”]
 Current AI is also bad at lots of simpler stuff!

 There is a lot of AI work on thinking about what other


agents are thinking

4
02/15/2024

 A serious science.
 General-purpose AI like the robots of science fiction is
incredibly hard
 Human brain appears to have lots of special and general
functions, integrated in some amazing way that we really do
not understand at all (yet)
 Special-purpose AI is more doable (nontrivial)
 E.g., chess/poker playing programs, logistics planning,
automated translation, voice recognition, web search, data
mining, medical diagnosis, keeping a car on the road, … …
……

 Artificial Intelligence (AI) is a way to make machines


think and behave intelligently.
 These machines are controlled by software inside them,
so AI has a lot to do with intelligent software programs
that control these machines.

Why do we need to study AI?


 AI has the ability to impact every aspect of our lives.

 The field of AI tries to understand patterns and


behaviors of entities.

10

5
02/15/2024

 One of the main reasons we want to study AI is to


automate many things.
 We live in a world where:
 We deal with huge and insurmountable amounts of data.
 Data originates from multiple sources simultaneously.
 The data is unorganized and chaotic.
 Knowledge derived from this data has to be updated
constantly because the data itself keeps changing.
 The sensing and actuation has to happen in real time with
high precision.
 Human brain is great at analyzing things around us, it
cannot keep up with the preceding conditions. Hence,
we need to design and develop intelligent machines
that can do this.

11

 We need AI systems that can:


 Handle large amounts of data in an efficient way.
 Ingest data simultaneously from multiple sources without
any lag.
 Index and organize data in a way that allows us to derive
insights.
 Learn from new data and update constantly using the right
learning algorithms.
 Think and respond to situations based on the conditions in
real time.

12

6
02/15/2024

 Computer Vision:
 These are the systems that deal with visual data such as images
and videos.
 These systems understand the content and extract insights based
on the use case.
 For example, Google uses reverse image search to search for
visually similar images across the Web.
 Natural Language Processing:
 This field deals with understanding text. We can interact with a
machine by typing natural language sentences.
 Search engines use this extensively to deliver the right search
results.
 Speech Recognition:
 These systems are capable of hearing and understanding spoken
words.
 For example, there are intelligent personal assistants on our
smartphones that can understand what we are saying and give
relevant information or perform an action based on that.

13

 Expert Systems:
 These systems use AI techniques to provide advice or make
decisions.
 They usually use databases of expert knowledge areas such
as finance, medicine, marketing, and so on to give advice
about what to do next.
 Games:
 AI is used extensively in the gaming industry.
 It is used to design intelligent agents that can compete with
humans.
 For example, AlphaGo is a computer program that can play
the strategy game Go.

14

7
02/15/2024

 Robotics:
 Robotic systems actually combine many concepts in AI.
 These systems are able to perform many different tasks.
 Depending on the situation, robots have sensors and
actuators that can do different things
 Wireless Communication
 Modelling of wireless channel,
 Resource allocation
 Network Optimization
 Parameter Configuration

15

Some of the dominant branches of AI are


 Machine learning and pattern recognition
 We design and develop software that can learn from data.
Based on these learning models, we perform predictions on
unknown data.
 Search: The Search techniques are used extensively in
AI programs. These programs examine a large number
of possibilities and then pick the most optimal path.
For example, this is used a lot in strategy games such
as Chess, networking, resource allocation, scheduling,
and so on.

16

8
02/15/2024

 Knowledge representation: The facts about the


world around us need to be represented in some way
for a system to make sense of them.
 Planning: This field deals with optimal planning that
gives us maximum returns with minimal costs.
 Heuristics: A heuristic is a technique used to solve a
given problem that’s practical and useful in solving the
problem in the short term, but not guaranteed to be
optimal.
 Genetic programming: Genetic programming is a
way to get programs to solve a task, by mating
programs and selecting the fittest.

17

 Alan Turing, proposed the Turing Test to provide a


definition of intelligence.
 He defined intelligent behavior as the ability to achieve
human-level intelligence during a conversation.
 This performance should be sufficient to trick an
interrogator into thinking that the answers are coming
from a human.
 This is quite a difficult task for the respondent
machine. There are a lot of things going on during a
conversation. At the very minimum, the machine needs
to be well versed with the following things:
 Natural Language Processing: The machine needs to
parse the sentence, extract the context, and give an
appropriate answer.

18

9
02/15/2024

 Knowledge Representation: The machine needs to store


the information provided before the interrogation. It also
needs to keep track of the information being provided
during the conversation so that it can respond appropriately
if it comes up again.
 Reasoning: It's important for the machine to understand
how to interpret the information that gets stored. Humans
tend to do this automatically to draw conclusions in real
time.
 Machine Learning: This is needed so that the machine
can adapt to new conditions in real time. The machine needs
to analyze and detect patterns so that it can draw
inferences.

19

 Human: The table won’t fit through the doorway


because it is too narrow.What is too narrow?
 ChatGPT: If a table won’t fit through a doorway
because it is too narrow, it means that the width of the
table is greater than the width of the doorway. In other
words, the doorway is not wide enough to allow the
table to pass through it. This can be a problem if you
are trying to move the table from one room to another
and the only way to do so is through the doorway. In
order to solve this problem, you may need to remove
the door or trim the table so that it fits through the
doorway. Alternatively, you may need to find a
different route to move the table, such as through a
window or by taking it apart and reassembling it in the
other room.

20

10
02/15/2024

 Human: The table won’t fit through the doorway


because it is too wide. What is too wide?
 ChatGPT: If a table won’t fit through a doorway
because it is too wide, it means that the width of the
doorway is smaller than the width of the table. In other
words, the table is too big to fit through the doorway.
This can be a problem if you are trying to move the
table from one room to another and the only way to do
so is through the doorway. In order to solve this
problem, you may need to remove the door or trim the
table so that it fits through the doorway. Alternatively,
you may need to find a different route to move the
table, such as through a window or by taking it apart
and reassembling it in the other room. Human: The

21

 Clearly-defined tasks that we think require intelligence and


education from humans tend to be doable for AI techniques
 Playing chess, drawing logical inferences from clearly-stated facts,
performing probability calculations in well-defined environments, …
 Although, scalability can be a significant issue
 Complex, messy, ambiguous tasks that come natural to
humans (in some cases other animals) are much harder
 Recognizing your grandmother in a crowd, drawing the right conclusion
from an ungrammatical or ambiguous sentence, driving around the city,

 Humans better at coming up with reasonably good
solutions in complex environments
 Humans better at adapting/ self-evaluation/
creativity (“My usual strategy for chess is getting
me into trouble against this person… Why? What
else can I do?”)

22

11
02/15/2024

 50s/60s: Early successes! AI can draw logical


conclusions, prove some theorems, create simple
plans… Some initial work on neural networks…
 Led to overhyping: researchers promised funding
agencies spectacular progress, but started running
into difficulties:
 Ambiguity: highly funded translation programs (Russian to
English) were good at syntactic manipulation but bad at
disambiguation
 “The spirit is willing but the flesh is weak” becomes “The vodka is good
but the meat is rotten”
 Scalability/complexity: early examples were very small, programs
could not scale to bigger instances
 Limitations of representations used

23

 70s, 80s: Creation of expert systems (systems


specialized for one particular task based on
experts’ knowledge), wide industry adoption
 Again, overpromising…

 … led to AI winter(s)
 Funding cutbacks, bad reputation

24

12
02/15/2024

 More rigorous, scientific, formal/mathematical


 Fewer grandiose promises

 Divided into many subareas interested in


particular aspects.
 More directly connected to “neighboring”
disciplines
 Theoretical computer science, statistics, economics,
operations research, biology, psychology/neuroscience, …
 Often leads to question “Is this really AI”?
 Some senior AI researchers are calling for re-
integration of all these topics, return to more
grandiose goals of AI

25

 In deduction, we move from the general to the specific


in a systematic way.
 Induction we move from the specific to the general.
 Note that the deductive approach always provides
mathematically accurate conclusions, whereas the
inductive approach is a form of “faulty” logic based on
generalizing specific experiences.
 However, the inductive approach when coupled with
statistical techniques, can yield insights and
predictions that may not be immediately apparent but
are frequently correct.
 As a practical matter, inductive methods are usually
learning methods, whereas deductive methods are
almost always reasoning methods.

26

13
02/15/2024

 Deduction:
 Given the laws of physics and the properties of materials, if
a certain load is applied to a beam, it will deform by a
certain amount.
 Therefore, based on calculations and analysis, engineers can
deduce the required dimensions and materials for a beam to
withstand specific loads without failure.
 Induction:
 After analyzing data from user interactions with a mobile
app, it's observed that users prefer a certain layout for the
interface.
 Inductively, the development team infers that this layout
enhances user experience and increases engagement.
 Therefore, future versions of the app are designed with
similar layout principles based on the inductive reasoning
derived from observed user preferences.

27

 Deduction:
 Given the laws of circuit theory and Ohm's law, if the
voltage and resistance of a circuit are known, the current
can be calculated using the formula I = V/R.
 Therefore, through deductive reasoning, engineers can
predict the behavior of electrical circuits and design them to
meet specific performance requirements.
 Induction:
 After conducting experiments on the reaction kinetics of a
certain chemical process under varying conditions of
temperature and pressure, a pattern emerges where higher
temperatures accelerate the reaction rate.
 Inductively, chemical engineers infer that temperature has
a significant impact on the reaction rate in this system.
 Therefore, in future reactor designs, engineers may
prioritize temperature control to optimize the efficiency of
the process based on the inductive reasoning derived from
experimental observations.

28

14
02/15/2024

29

 An agent is anything that can be viewed as perceiving


its environment through sensors and acting upon
that environment through actuators.
 A human agent has eyes, ears, and other organs for
sensors and hands, legs, vocal tract, and so on for
actuators.
 A robotic agent might have cameras and infrared range
finders for sensors and various motors for actuators.
 A software agent receives keystrokes, file contents, and
network packets as sensory inputs and acts on the
environment by displaying on the screen, writing files,
and sending network packets.

30

15
02/15/2024

 There are many ways to impart intelligence to an


agent. The most commonly used techniques include
machine learning, stored knowledge, rules, and so on.

31

32

16
02/15/2024

 Reasoning and Planning with Certainty


 How can an agent represent its knowledge, reason, and
plan, under the assumption that it knows both what is true
in the world and the effects of its actions?
 Searching for Solutions

 Learning and Reasoning with Uncertainty


 How can an agent learn and reason, relaxing the
assumption that it knows what is in the world?
 Supervised Machine Learning
 Unsupervised Machine Learning
 Reinforcement Learning

33

 Some of the most popular examples are:


1. ChatGPT
2. Google Assistant:
3. Amazon Alexa
4. Apple Siri
 All these assistants will allow you to perform all or at least most of
these tasks:
 Provide conversational assistance and generate human-like responses.
 Control devices in your home
 Play music and display videos on command
 Set timers and reminders
 Make appointments
 Send text and email messages
 Make phone calls
 Open applications
 Read notifications
 Perform translations
 Order from e-commerce sites

34

17
02/15/2024

 Self-driving or driverless cars are vehicles that can travel


along a pre-established route with no human assistance.
 SAE International has created standard J3016, which
defines six levels of automation for cars
1. Level 0 (No automation) The car has no self-driving
capabilities
2. Level 1 (Driver assistance) Under certain conditions,
the car controls either the steering or the vehicle speed,
but not both simultaneously.
 Examples include brake boost if you edge too close to another
vehicle, an adaptive cruise control function to control your distance
and speed, park assist function etc.
3. Level 2 (Partial automation) The car can steer,
accelerate, and brake in certain circumstances.
 The human driver still performs many maneuvers like
interpreting and responding to traffic signals or changing lanes.

35

 Assist driver in steering, acceleration, braking, and maintaining


speed, although drivers still need to have both hands on the wheel
and be ready to take control if necessary.
 Assist driver by centering the car within the lane, control speed to
ensures that the correct distance is kept from other cars.
 Implementation examples of this level are Audi Traffic Jam Assist,
Cadillac Super Cruise, Mercedes-Benz Driver Assistance Systems,
Tesla Autopilot, Volvo Pilot Assist
4. Level 3 (Conditional automation) The responsibility for
controlling and monitoring the car starts to change from
driver to computer at this level.
 Under the right conditions, the computer can control the car,
including monitoring the environment.
 If the car encounters a scenario that it
cannot handle, it requests that the driver intervene
and take control.
 Examples include Audi's A8,

36

18
02/15/2024

5. Level 4 (High automation) The car does not need


human involvement under most conditions but still
needs human assistance under some road, weather, or
geographic conditions.
 Under a shared car model restricted
to a defined area, there may not be any
human involvement.
 Google's Waymo is an example of level 4 vehicle

6. Level 5 (Full automation) The driverless system


can control and operate the car on any road and under
any conditions that a human driver could handle.
 The "operator" of the car only needs to enter a destination.
 No examples of this level are available.

37

 Computers take customer orders and decide where to route


merchandise, the robots act as mules carrying the pallets and
inventory around the warehouse.
 Humans plug the "last mile" problem by hand picking the items
that are going into each order.

38

19
02/15/2024

 The ways that AI can be applied in health science is


almost limitless.
 Some of the examples are
 Drug discovery
 Insurance pricing
 Patient diagnosis
 Medical imaging interpretation
 Psychiatric analysis
 Smart health records
 Disease detection and prediction

39

 Google search relies on AI to generate search query


responses.
 It uses a deep learning system called RankBrain to
assist in generating search query responses.

"RankBrain uses artificial intelligence to embed vast


amounts of written language into mathematical entities
— called vectors — that the computer can understand. If
RankBrain sees a word or phrase it isn't familiar with,
the machine can make a guess as to what words or
phrases might have a similar meaning and filter the
result accordingly, making it more effective at handling
never-before-seen search queries.“
— Clark, Jack [2]

40

20
02/15/2024

 Amazon, YouTube, Netflix, LinkedIn, and Facebook all


rely on recommendation technology to recommend
books, videos, movies, articles etc.
 One of the ways that a recommender system works is
by having previous selections from users of the system.
 If you visit an e-commerce site for the first time, the site
recommendation is not tailored for you.
 If you purchase sneakers, the website now has one data
point that it can start
using as a starting point.
 It might recommend a
different pair of sneakers,
 A pair of athletic socks,
or maybe even a basketball.

41

 AI based robots can help in household chores like


 Wash and dry clothes,
 Pick up items off the floor
 Fold clothes,
 Mop, dust and vacuum
 Cook dinner
 Make beds
 Wash dishes
 Monitor the home

42

21
02/15/2024

 Humans are competitive by nature and having


machines beat us at our own games is an interesting
yardstick to measure the breakthroughs in the field.
 AI-based game engines learn from our moves to
improve their performance.
 AI-based game engines have been developed for many
games including
 Chess
 Checkers
 Go
 Jeopardy
 StarCraft 2
 AlphaGo

43

 It is predicted that within the next few decades it will


be possible to create movies that are 100% computer
generated.
 It is not unfathomable to envision a system where the
input is a written script and the output is a full-length
feature film.
 An examples

include
Deepfakes

44

22
02/15/2024

 Python 3
 NumPy:
 http://docs.scipy.org/doc/numpy-1.10.1/user/install.html
 SciPy:
 http://www.scipy.org/install.html
 scikit-learn:
 http://scikit-learn.org/stable/install.html
 matplotlib:
 http://matplotlib.org/1.4.2/users/installing.html

 Alternatively you can install Anaconda and get all packages

45

 Install Python and all packages


 Successfully execute python scripts on pages 18-20 of
your book

46

23

You might also like