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

Artificial Intelligence and Programming

The document outlines a series of lessons focused on artificial intelligence, sensors, robotics, Scratch programming, Python principles, and variables in Python. Each lesson aims to equip students with knowledge and practical skills related to these topics, including the types of artificial intelligence and their applications in daily life. Additionally, it provides guidance on using tools like Teachable Machine for creating intelligent models and project ideas for practical implementation.

Uploaded by

Ihab Freiha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Artificial Intelligence and Programming

The document outlines a series of lessons focused on artificial intelligence, sensors, robotics, Scratch programming, Python principles, and variables in Python. Each lesson aims to equip students with knowledge and practical skills related to these topics, including the types of artificial intelligence and their applications in daily life. Additionally, it provides guidance on using tools like Teachable Machine for creating intelligent models and project ideas for practical implementation.

Uploaded by

Ihab Freiha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Objectives

Lesson 2
Lesson I
Sensors
Artificial Intelligence Applications
By the end of the lesson, I will be able to :
By the end of the lesson, I will be able to :
1. Mention the different types of sensors and
I. List types of artificial intelligence
their areas of use
2. Review some practical applications of
2. List the importance of sensors in our modern life
artificial intelligence
3. Design a simple project based on the idea of
3. Suggest the largest number of ideas for the
sensors
uses Of artificial intelligence in our lives
Lesson 4
Lesson 3
Scratch
Robot
By the end of the lesson, I will be able to :
By the end Of the lesson, I Will be able to :
I. Explain the uses Of the Scratch program
I. Explain the concept Of robot
2. Deduce the features of the Scratch program
2. List the types of robots and their functions
3. Use the Scratch program to create a simple
3. Suggest the largest number of ideas for the
project
uses of robots in our lives
Lesson 6
Lesson 5
Principles of Python
Sprites Area in Scratch
By the end of the lesson, I will be able to :
By the end of the lesson, I will be able to :
1. Explain the concept of the Python
1. Discuss the concept of sprites area in Scratch
programming language
2. Create a simple project in Scratch and its role
2. List the uses of the Python
in our lives
language
3. Develop my project (add-delete-modify) for
3. Practice the steps to
sprites on the project
download the Python
Lesson 7 language to my device
Variables in Python

By the end of the lesson, I will be able to :

I. Explain the concept of variables

2. Deduce the types of variables

3. Write a simple programming code in Python


Artificial Intelligence and Programming

Lesson One
Artificial Intelligence Applications
Lesson Two
Sensors
Lesson Three
Robot
Lesson Four
Scratch
Lesson Five
Sprites Area in Scratch
Lesson Six
Principles of Python
Lesson Seven
Variables in Python
Lesson One
Artificial Intelligence Applications
Types of Artificial Intelligence:

Artificial intelligence is not just one type, but there are many and varied types. Imagine that we
have a large garden full of different flowers, each flower has a different shape and color, and so is
the case with artificial intelligence.

➢ Narrow AI:

This type of artificial intelligence focuses on performing a specific task, such as recognizing faces
or translating languages. Another example is a robot that can play chess brilliantly, but it cannot
do anything else.
➢ General artificial intelligence (GAI):

This type of artificial intelligence is more advanced and can perform any task that a human can
do. Example: A robot that completely mimics a human, as it can think, innovate, solve complex
problems, learn, and adapt to different situations.
➢ Super artificial intelligence (SAI):

This type of artificial intelligence is the most advanced; it can solve problems that are difficult for
humans to solve easily and discover new things that we have never imagined before.
Applications of artificial intelligence in daily life:

1- Personal Assistant: Do you have a friend who talks to you, answers your
questions, and performs tasks? This is the personal assistant like (Siri) or
(Alexa), it uses artificial intelligence to understand your commands and
perform them.
2- Smart Games: Do you play video games? Some of these games use
artificial intelligence to make the game more fun and challenging, as the
characters in the game can learn from their mistakes and become
smarter.
3- Smart Cars: Have you ever imagined a car driving itself without a
driver? This is the dream of the future that is getting closer to being
realized thanks to artificial intelligence.

4- Digital Doctors: Doctors use artificial intelligence to help them


diagnose and treat diseases faster and more accurately.

5- Instant Translator: Have you traveled to another country and spoken a


different language? Artificial intelligence can translate words and
sentences instantly, making it easier for people to communicate.

6- Smart Shopping: Have you noticed that shopping sites offer you
suggestions for products that you might like? This is thanks to artificial
intelligence that analyzes your previous purchasing behavior.
Artificial Intelligence Fields:

1. Machine Learning -Learning from Mistakes:


AI has to learn new things, the more we show it a picture of a cat, the more it learns to name it,
and the more we play a game with it, the smarter it becomes, this is called
Machine Learning, and it is like when you learn to ride a bike, the more you fall, the better you
learn how to balance.
2. Natural Language Processing -Understanding Languages:
Can you imagine talking to your computer as if it were a friend? It understands our different
languages and can answer our questions. This is Natural Language Processing, and it is like an
intelligent language translator as it understands written and spoken human language, interprets
it, and learns to "speak" human language.
3. Computer Vision -Sees the World:
AI can look at a picture and tell you everything in it, and it can find your face in a crowded picture,
and distinguish between pictures of different animals, which is called Computer Vision.
4. Robotics:
There are smart robots that do many tasks such as cleaning the house, playing chess, or
performing complex and precise surgery, and they can work with great accuracy even in
environments that are dangerous to humans.
5. Simulation of human thinking and decision-making -Expert Systems:
Artificial intelligence can solve complex problems and make difficult decisions. This is the field of
expert systems. It is like an intelligent doctor who can diagnose diseases.
6. Simulation of human learning -Deep Learning:
Deep learning aims to enable computer systems to learn complex tasks in a way similar to the
way humans learn. Artificial intelligence has a mind similar to the human mind. It uses this mind
to learn things very quickly. Deep learning relies mainly on neural networks and deep learning.

Create intelligent models to recognize images, sounds, and movements using machine
learning (Teachable Machine):
Imagine if you could teach a computer to recognize objects in the same way you learn! This is
exactly what Teachable Machine does, an easy-to-use tool that helps you create intelligent
models to recognize images, sounds, and movements.
Activity
Model Building Training:
download the Teachable Machine website.
Note: It is preferable to update your internet browser and work on the Microsoft Edge browser.
Click on the following link to enter the website https://teachablemachine.withgoogle.com/"
Home screen layout of the site

Imagine that you are training a young child to do new things! First, you need to teach him the
names of things.
• You show the young child a picture of a cat and say, “This is a cat,” then you show him a
picture of a dog and say, “This is a dog.”
• You are telling the child what things he sees, just as you teach him the names of letters and
numbers.
• After the young child sees a lot of pictures and hears names, his little brain starts to
understand the difference between a cat and a dog, just like when scientists try to train a
computer to understand pictures and sounds.
• The child has learned so well that he can now tell the difference between a cat and a dog
on his own, and in the same way, the computer has learned to recognize different things,
and we can use it for a lot of fun things!
Imagine that we want to teach the computer to recognize numbers. We can start by giving him
pictures of numbers from “0-9,” and telling him what number is in each picture. After a while, the
computer will be able to look at any number and tell us what it is.
Website login window layout
Ready to explore the world of photography? Our first project will take you on an exciting journey!

The images of numbers from "0-9" are prepared in the form of images of files stored on the computer.

1. Classification that includes a group of


images that belong to a specific category
such as images of numbers "from 0-9" and
another classification that includes images
of alphabet letters.
2. Upload images of numbers in (Class1).
3. Open the camera, prepare images of numbers on paper boards" and have the model take them
in (Class2),
Note: The images were provided to the model in the form of files or he takes them through the
Web camera.
4. The artificial intelligence model is trained on the image categories that were given to it.
5. Add more image categories when needed, for example "adding special symbols".
6. After that, the model can be given an image that determines for us which category of images it
follows.

Save the project:


1-Save the project on Google Drive…
2-Download the project to the device..
Practical example:
Suppose you want to make a game where you control a character on the screen with your hand
movement, here are the steps:
• Training: You record your hand in different positions (such as raising the hand, lowering it,
moving it right and left).
• Recognition: Teachable Machine learns to associate each position of your hand with a
specific movement of the character on the screen.
• Game: When you move your hand in front of the camera, the character on the screen
moves according to what the computer has learned.

Example application:
• Access the site:
Open your browser and type "Teachable Machine" in the search bar, then access the site.
• Select the training model:
We find several options, choose the option related to image recognition (Image).
• Prepare the camera:
The site will ask you to choose to upload images (Upload) or allow it to use your device's camera
(web). Click on the camera (web) and make sure that the lighting is good and the camera
background is simple so that the computer focuses on the movement of your hand.
• Train the computer.
• Create Classes:
Create at least two classes (Class1) and (Class2), for example (Class1) "Raised hand" and
(Class2) "Shaky hand".
• Record examples: In front of each category, record several examples of the corresponding
hand movement, for example, in front of the category "raised hand", raise your hand several
times and each time raise it with a specific movement or a different shape, and so on in
front of the category "shaky hand".
• Review examples: Make sure that the examples are clear and that the computer
understands the difference between the two movements.
• Training: After you finish taking the pictures, click on the "Train Model" button to teach the
computer these movements.
• Test the model: After you finish training, the site will ask you to test the model.
• Camera: Point the camera at your hand and perform the movements you trained.
• Results: You will see that the computer will try to guess the movement you are performing.
• Save the model: If you like the model, you can save it and use it in other projects.

Ideas for your projects:


• Recognize faces: Train the computer to recognize the faces of your friends and family.
• Create a motion control game: Use your body movements to control characters in a video
game.
• Image classification: Teach the computer to classify images into different categories (such
as animals, food, colors).
• Create a robot that follows you: Build a small robot that follows you wherever you go.

You might also like