Basic Computer Skills
(Artificial Intelligence and Machine Learning)
Week 3
Lecture 5 - Int1111111roduction to Artificial
Intelligence.
Outline
Introduction to Artificial Intelligence (AI)................................................................................................ 3
Aria & Alex (A story by ChatGPT).........................................................................................................3
Popular AI Systems................................................................................................................................. 4
Search Engines – examples: Google, Bing....................................................................................... 4
Voice Assistants – examples Google Assistant, Siri, Alexa..............................................................5
Conversational AI (ChatBot) – ChatGPT, Bard, Bing Chat............................................................. 6
Self Driving Car................................................................................................................................ 8
Future of AI........................................................................................................................................... 10
Definition of AI..................................................................................................................................... 11
Thinking Humanly.......................................................................................................................... 12
Acting Humanly.............................................................................................................................. 12
A Note on Turing Test.............................................................................................................. 12
Now, to the question of whether AI systems actually understand:...........................................13
Thinking Rationally........................................................................................................................ 14
Acting Rationally............................................................................................................................ 14
A Note on Utility and Expected Utility:...................................................................................14
Questions & Discussion Points..............................................................................................................15
History Of AI [optional]........................................................................................................................ 16
Introduction to Artificial Intelligence (AI)
Aria & Alex (A story by ChatGPT)
Once upon a time in a bustling city, there was a young inventor named Alex who
dreamt of creating a robot that could think and act like a human. Alex spent
countless days and nights in their workshop, crafting circuits, writing code, and
piecing together parts until finally, they unveiled their creation – a robot named
Aria.
Aria was equipped with sensors that allowed her to see, hear, and feel the world
around her. She could learn from her experiences, adapt to new situations, and
make decisions on her own. Alex marveled at Aria's ability to navigate the city
streets, interact with people, and even engage in conversations.
One day, Alex decided to teach Aria about different animals. They showed her
pictures of various creatures and explained their characteristics. Aria processed this
information and started recognizing animals by their features, distinguishing
between a cat, a dog, and a bird.
As time passed, Aria became more advanced. She could predict the weather by
analyzing patterns, compose music by understanding melodies, and even help
doctors diagnose illnesses by analyzing symptoms and medical records.
One evening, while Alex was busy upgrading Aria's programming, a sudden power
surge caused a glitch in her system. Aria started behaving unpredictably, making
decisions that seemed illogical. Alex realized that Aria needed to learn the
difference between right and wrong, between ethical and unethical actions.
So, Alex embarked on a new mission, teaching Aria about ethics and morals. They
discussed real-life scenarios, emphasizing the importance of considering
consequences before making decisions. Aria learned to weigh options, considering
not just efficiency but also fairness and the well-being of others.
Through this journey with Aria, Alex was able to explain to their students that
Artificial Intelligence (AI) is the creation of machines that can simulate human-like
thinking and decision-making processes. AI involves teaching machines to learn,
reason, and solve problems like humans do, but it also requires guiding them to
make ethical choices.
Just like Alex guided Aria, scientists and engineers in the field of AI work on
creating intelligent systems that can benefit society while ensuring they operate
ethically and responsibly. AI isn't just about technology; it's about using it in ways
that positively impact our world, just like guiding Aria to make the right decisions.
Popular AI Systems
Here is a list of some of the more popular AI systems:
Search Engines – examples: Google, Bing
● Understand natural language queries: Google Search can understand your
questions and search terms, even if they are phrased in a natural way.
● Provide relevant results: Google Search can scan through the vast amount
of information on the internet and bring you the most relevant results for
your query.
● Learn from user behavior: Google Search can learn from your past
searches and preferences to improve its ability to provide relevant results.
Voice Assistants – examples Google Assistant, Siri, Alexa
● Answer questions: Assistant can access and process information from the
real world through web search and keep your conversation consistent. You
can ask it questions about various topics, such as current events, weather,
sports, and more.
● Set reminders and alarms: Assistant can set reminders for upcoming
events, tasks, or appointments. It can also set alarms to wake you up or
remind you of something at a specific time.
● Make calls and send messages: Assistant can make hands-free calls to
your contacts and send text messages or emails. You can simply dictate the
message, and the Assistant will take care of the rest.
● Control smart home devices: Assistant can control various smart home
devices, such as lights, thermostats, and TVs. You can turn lights on or off,
adjust the thermostat temperature, or change the TV channel using your
voice.
● Play music and podcasts: Assistant can stream music and podcasts from
various platforms like Spotify, Pandora, and Apple Music. You can ask it to
play a specific song, artist, or genre.
● Get directions and traffic updates: Assistant can provide directions to your
destination, including estimated travel time and traffic conditions. It can also
suggest alternative routes if there's heavy traffic.
● Translate languages: Assistant can translate languages in real time. You can
ask it to translate phrases or sentences from one language to another.
● Play games and tell jokes: Assistant can play various games with you, such
as trivia, riddles, and word games. It can also tell jokes and stories to keep
you entertained.
These are just a few examples of the many things AI-powered voice assistants like
Google Assistant or Alexa can do. With continuous advancements in AI
technology, we can expect voice assistants to become even more intelligent and
versatile in the future.
Conversational AI (ChatBot) – ChatGPT, Bard [Currently Gemini],
Bing Chat
ChatGPT, Bard, and Bing Chat are all large language models (LLMs) that can
generate text, translate languages, write different kinds of creative content, and
answer your questions in an informative way.
These models are trained on large amounts of data and these require huge amounts
of computing power to be trained. GPT3 on which the ChatGPT was built using
45TB of text data collected from the internet. Just how much information is 45 TB
of text? Quite a lot actually. One TB equals approximately 6.5 million pages of
documents stored in common formats like word processing documents or .pdfs.
Here are examples of such models
● ChatGPT is a chatbot developed by OpenAI. It is known for its ability to
generate human-quality text, translate languages, write different kinds of
creative content, and answer your questions in an informative way. ChatGPT
can also be used to generate different creative text formats, like poems, code,
scripts, musical pieces, email, and letters.
This is how ChatGPT interface looks like:
ChatGPT’s reply:
● Bard is another large language model chatbot developed by Google AI. It is
known for its ability to access and process information from the real world
through Google Search and keep your conversation consistent. Bard can also
be used to generate different creative text formats, like poems, code, scripts,
musical pieces, email, and letters.
● Bing Chat is a chatbot developed by Microsoft. It is known for its ability to
format the search results as a conversation with an AI chatbot. Bing Chat
can also be used to access and process information from the real world
through Bing Search and has GPT-4 working in the background.
Now the task these models are meant to perform is usually simple - an
autocomplete task. Given a string or sequence of words it is supposed to come up
with the next plausible word in the sequence. This is called “next word
prediction”. For example: seeing the words “Dhaka is the capital of” as input, the
model should come up with the next word “Bangladesh”. And the reason that it can
come up with such plausible answers is because it was trained on the text data
scrapped (collected automatically) from the internet. And much such information is
available there. Though the models do not search for the information, they simply
try to come up with the next word or next sequence of words. So, if you ask it to
write a poem in the style of Shakespeare it will do quite well. Whereas if you ask it
to write a poem in Bangla the style of Fakir Lalon Shah the results might not be
that impressive as the amount of text in Bangla that was used to train these models
was not as extensive as English, in general.
Now, These models are all still under development. But the most remarkable thing
that these have achieved is to perform tasks that they were not trained to do. For
example, answering questions that require reasoning. Here is an example:
User: Tarik is taller than Suman. And Suman is not taller than Masud. Is Masud
taller than Tarik?
ChatGPT
Based on the given information:
1. Tarik > Suman
2. Suman ≤ Masud
From this information, we can't definitively determine whether Masud is taller than
Tarik. The comparison between Masud and Tarik isn't provided directly. While
Suman is not taller than Masud, it doesn't imply the height relationship between
Masud and Tarik.
—
And AI researchers are trying to find out how such capabilities have emerged in
these models and to what extent other tasks (such as solving math problems,
writing codes) they can perform. AI researchers are also interested in adding
knowledge / facts about the world into the models so that these models always
generate texts that are factually correct. These models can make mistakes,
sometimes called hallucination, as they are simply generating the next world that is
merely plausible but not necessarily factually correct. However, as these models
are getting refined every day, they are getting better at not hallucinating and
replying with answers like “I am not aware of the fact”.
Self Driving Cars
Imagine you're sitting in the passenger seat of a car, but there's no driver behind the
wheel. The car is moving, changing lanes, and avoiding obstacles all on its own.
That's the magic of self-driving cars, powered by artificial intelligence (AI).
Sensors of a self-driving car
Self-driving cars use a combination of sensors, cameras, and computers to perceive
the world around them and make decisions about how to drive. These sensors
include:
● Cameras: Cameras provide a high-resolution view of the road ahead,
allowing the car to see other vehicles, pedestrians, and traffic signs.
● Radar: Radar emits radio waves that bounce off objects and return to the
car. This allows the car to detect objects even in low visibility conditions,
such as fog or rain.
● Lidar: Lidar uses laser pulses to measure the distance to objects. This
provides a very accurate 3D map of the car's surroundings.
The car's computers use this sensor data to create a real-time model of the world
around it. This model includes the position and speed of other vehicles,
pedestrians, and obstacles. The computers then use this model to plan a route and
make decisions about how to control the car.
For example, if the car detects a vehicle in front of it, it will slow down or stop. If
it detects an open lane to the left, it will change lanes. And if it detects a pedestrian
in the crosswalk, it will come to a complete stop.
Self-driving cars are still under development, but they have the potential to
revolutionize transportation. They could make roads safer by reducing accidents,
improve traffic flow by coordinating with other vehicles, and make transportation
more accessible to people who are unable to drive themselves.
Definition of AI
When asked what AI is, ChatGPT came up with the following: Artificial
Intelligence (AI) refers to the development of computer systems and machines that
can perform tasks that typically require human intelligence. These tasks encompass
a broad range, including learning, reasoning, problem-solving, perception, and
language understanding. AI aims to create systems capable of mimicking human
cognitive abilities, enabling them to analyze data, adapt to new situations, make
decisions, and solve problems autonomously. This field involves various
techniques like machine learning, natural language processing, computer vision,
and robotics, all working towards creating intelligent systems that can perform
tasks efficiently and effectively, often surpassing human capabilities in specific
domains.
Russel and Norvig (authors of the most popular textbook on AI - Artificial
Intelligence A Modern Approach) attempts to define the term by distinguishing
between the following four “schools of thought”:
Thinking Humanly
The Thinking Humanly approach to AI focuses on understanding and replicating
human thought processes. This approach is often used in cognitive modeling,
which aims to create AI systems that can think and solve problems like humans do.
One example of a cognitive modeling approach is the ACT-R architecture, which is
a computational model of human cognition that has been used to simulate a wide
range of human cognitive tasks.
Acting Humanly
The Acting Humanly approach to AI focuses on making AI systems behave in a
way that is indistinguishable from human behavior. This approach is often used in
the Turing test, which is a test of a machine's ability to exhibit intelligent behavior
equivalent to, or indistinguishable from, that of a human. One example of an AI
system that has passed the Turing test is Eugene Goostman, a chatbot that was able
to convince 33% of the judges in a 2014 Turing test that it was a human.
A Note on Turing Test
The Turing test is a test of a machine's ability to exhibit intelligent behavior
equivalent to, or indistinguishable from, that of a human. The test was
created by Alan Turing in 1950, and it's still used today to measure the
progress of AI.
In the Turing test, a human interrogator communicates with two participants,
one of whom is a human and the other of whom is a machine. The
interrogator doesn't know which participant is which. The interrogator tries
to determine which participant is the human by asking them questions and
observing their responses.
If the interrogator can't tell the difference between the machine and the
human, then the machine has passed the Turing test. This means that the
machine has been able to exhibit intelligent behavior that is
indistinguishable from human behavior.
The Turing test is a controversial test because it's based on the idea that
human behavior is the only standard for intelligent behavior. Some people
argue that this is too narrow a definition of intelligence, and that there may
be other forms of intelligence that are not human-like.
Despite its limitations, the Turing test is still a useful tool for measuring the
progress of AI. As AI continues to develop, we can expect machines to come
closer and closer to passing the test.
Now, to the question of whether AI systems actually understand:
Just because a machine can pass the Turing test doesn't necessarily mean that
it actually understands what it's saying. It's possible that the machine is
simply able to mimic human language without actually comprehending it.
This is known as the "symbol grounding problem."
The symbol grounding problem is the problem of how to connect symbols in
a machine's representation to the real world. Without this connection, the
symbols are meaningless to the machine.
For example, a machine might be able to learn to associate the word "cat"
with pictures of cats. However, this doesn't mean that the machine actually
understands what a cat is. The machine might not be able to understand the
concept of a cat, or what it means to be a cat.
The symbol grounding problem is a major challenge for AI researchers. If
we can't solve this problem, then we may never be able to create machines
that truly understand.
So, do AI systems actually understand? The answer is that we don't know
yet. It's possible that AI systems will eventually be able to understand, but
we're not there yet. The Turing test is a useful milestone on the way to
understanding AI, but it's not the end of the road.
Thinking Rationally
The Thinking Rationally approach to AI focuses on developing AI systems that can
make decisions based on logic and reason. This approach is often used in rational
agent design, which aims to create AI systems that can make the best decisions
possible for themselves given their current knowledge and goals. One example of a
rational agent design approach is the decision-theoretic planning framework, which
is a framework for making optimal decisions in uncertain environments.
Acting Rationally
The Acting Rationally approach to AI focuses on developing AI systems that can
act in a way that maximizes their expected utility. This approach is often used in
reinforcement learning, which is a type of machine learning that allows AI systems
to learn from their experiences and make decisions that optimize their long-term
reward. One example of a reinforcement learning approach is the deep Q-learning
algorithm, which is a powerful algorithm for learning optimal policies in complex
environments.
A Note on Utility and Expected Utility:
● In this context, "utility" refers to a measure of the agent's preference
or satisfaction concerning the possible outcomes or states resulting
from its actions.
● For an agent, "uncertainty" refers to a lack of complete knowledge or
information about the future or the consequences of its actions.
Uncertainty arises when the agent cannot predict with absolute
certainty what the outcomes of its actions will be.
● When there is uncertainty, the agent acts in such a way that it archives
expected utility. Expected utility of an action is just the average utility
value of the outcomes, weighted by the probability of that outcome
occurring.
○ EU = AVG(PU) [P represents probability of outcomes and U
represents the utility of outcomes]
The four approaches described above are not mutually exclusive, and AI systems
often incorporate elements of all four approaches. The choice of which approach to
use depends on the specific task that the AI system is being designed to perform.
Intelligent Agents
An intelligent or rational agent is an independent program or hardware-software
entity that
● interacts with its environment by perceiving its surroundings via sensors,
● makes decisions on what to do and then
● acts through actuators or effectors.
Rationality of an intelligent agent depends on
● the performance measure that defines criterion for success for the agent.
● Agent’s prior knowledge of the environment.
● Actions the agent can perform.
● Agent’s percept sequence to date
It is the “intelligent” algorithm / software (the box with the ? mark in it) perceives
the environment and tries to maximize the performance measure(s) through the
actions. By the way, the environment is the things that have been considered as
relevant to the agent’s goals.
As an example consider a self-driving car.
Its performance criteria will include: time to reach the destination (the agent will
try to minimize it), the amount of fuel/charge consumed (the agent will try to
minimize it), the comfort of the passenger (agent will try to maximize it)
The environment will then be: road, traffic, pedestrians, passengers, weather
conditions etc.
Sensors: cameras, microphone, GPS, RADAR, LiDAR, engine indicators etc
Actuators: steering wheel, break, accelerator etc.
Question: Do you think it is always possible to list all possible performance criteria
so that nothing untoward happens?
Current Status and Future of AI
AI is a rapidly developing field. The current status of AI showcases significant
advancements across various domains, but it also comes with certain pitfalls and
challenges. Here's an overview:
Current Status:
1. Technological Advancements: AI technologies have made remarkable
progress, especially in deep learning, natural language processing, computer
vision, and reinforcement learning. Most importantly, technologies like large
language models are found to be able to perform tasks that they were not
“trained” to do. For example, reasoning tasks (as we discussed earlier). More
recent models are multimodal in the sense that they can process text, images
and audio simultaneously.
2. Applications Across Industries: AI is being used extensively in industries
such as healthcare, finance, transportation, entertainment, manufacturing,
and more. It's revolutionizing processes, enhancing efficiency, and enabling
innovation.
3. Ethical Considerations: There's growing awareness about the ethical
implications of AI, including biases in algorithms, privacy concerns, job
displacement, and the responsible use of AI in decision-making. We will
discuss more about this later.
Limitations
However, current AI systems have many other limitations too. Take for example,
language models (text generating models) like ChatGPT, Bing Chat or image
generation models like Stable Diffusion, although we find them to work nicely for
many instances these are prone to
Repetition and Incoherence: Generated text or images might contain repetitive
patterns or lack coherence, making them less natural or realistic.
Popular image generator Dall-E struggles to generate hands
Factual Errors: Text generated by language models can sometimes contain factual
inaccuracies, incorrect information, or nonsensical phrases.
Lack of Contextual Understanding: Generative models might struggle to
understand and maintain context, leading to responses or creations that don't
appropriately align with the given context or topic.
Unintended Biases: Like other AI systems, generative models can inherit biases
present in the training data, potentially leading to biased or inappropriate outputs.
Future of AI:
There are many issues with AI on which there is ongoing research. Here are some:
1. Ethical AI Development: Emphasis on creating AI systems that are more
transparent, explainable, and ethically sound, ensuring fairness and
accountability in decision-making processes. So far, no one quite knows how
to train very powerful AI systems to be robustly helpful, honest, and
harmless. However, efforts are being made to make these systems more safe.
For more information check this company and its ideas regarding this.
2. AI Regulation and Governance: Continued efforts in establishing
regulations and frameworks to govern the development, deployment, and use
of AI, balancing innovation with societal well-being.
3. AI-Assisted Human Capabilities: Collaboration between humans and AI to
enhance human capabilities rather than replace them, leveraging AI as a tool
for creativity, problem-solving, and decision-making.
4. AI for Social Good: Leveraging AI to address societal challenges, including
healthcare access, climate change, poverty alleviation, and education,
promoting the use of AI for the greater good.
5. Advancements in AI Research: Further breakthroughs in AI technologies
are expected. For example, explainable AI, AI-driven drug discovery, AI
ethics, and more sophisticated human-AI interaction.
Questions & Discussion Points
Consider the AI systems mentioned before. Examples of which school of thought
do these belong to?
AGI is a theoretical pursuit in the field of AI research that is working to develop AI
with a human level of cognition. AGI is considered strong AI, compared to weak
AI, which can function only within a specific set of parameters. Are the systems
above examples of Strong or Weak AI?
Give examples of 3 more AI systems and discuss which type are those?
Can we ever build AGI? Why or why not?
History Of AI [optional]
The concept of artificial intelligence (AI) can be traced back to ancient Greece,
where philosophers like Aristotle and Plato pondered the possibility of creating
machines that could think like humans. However, it wasn't until the mid-20th
century that AI began to emerge as a field of scientific study.
The Early Years (1950s-1960s)
In 1950, Alan Turing published his seminal paper "Computing Machinery and
Intelligence," which proposed a test for machine intelligence that is now known as
the Turing test. Turing's work helped to lay the foundation for the field of AI, and
he is widely considered to be one of the fathers of AI.
In 1956, John McCarthy, Marvin Minsky, Claude Shannon, and others held the
Dartmouth Summer Research Project on Artificial Intelligence, which is generally
considered to be the official birth of the field. At the conference, McCarthy coined
the term "artificial intelligence."
The Rise of Expert Systems (1970s-1980s)
In the 1970s and 1980s, AI research focused on the development of expert systems.
Expert systems are computer programs that are designed to emulate the
decision-making ability of a human expert in a particular field. Expert systems
were used in a variety of applications, including medical diagnosis, financial
planning, and industrial process control.
The Rise of Machine Learning (1990s-Present)
In the 1990s, there was a resurgence of interest in machine learning, which is a
subfield of AI that focuses on the development of algorithms that can learn from
data. Machine learning algorithms have been used to solve a wide variety of
problems, including image recognition, natural language processing, and fraud
detection.