AI Programming

Principles and Algorithms with Practical Application

AI Programming & Machine Learning4.9(72)12h 35m59 lectures6 sections

What you'll learn

  • Understand the concept of artificial intelligence and its fields
  • Understand the intelligent agent, PEAS analysis and environment types
  • Formulate problems and use search strategies such as DFS and BFS
  • Use the A Star and Minimax algorithms
  • Apply logical reasoning and model checking
  • Understand probability, Bayes rule and Bayesian networks
  • Install Anaconda and try the practical code
  • Use optimization algorithms such as Hill Climbing
  • Get to know the basics of machine learning

About this course

This course teaches artificial intelligence programming, meaning the principles and algorithms along with hands-on practice using the Python language and Anaconda. It starts with a definition of artificial intelligence, its fields and its sciences, then the intelligent agent, the rational agent, PEAS analysis, environment types and agent types. Next you learn the search process, problem formulation, the search tree and search strategies such as DFS, BFS, ID, UCS, GBFS, A Star and Minimax, with a practical Maze application. Then you move on to knowledge and logical reasoning, propositional logic, the Model Checking algorithm, knowledge engineering and first-order logic. After that come probability, Bayes rule, Bayesian networks and probabilistic inference, then optimization, local search, the Hill Climbing algorithm, simulated annealing and linear programming, ending with an introduction to Machine Learning. The course includes application and code files that you download and try. It suits students of programming and computing and anyone interested in artificial intelligence, and it is best if you know Python basics. Afterwards, you will understand how artificial intelligence algorithms work and apply them in projects.

Expected outcomes

  • Master the design and implementation of AI applications.
  • Understand the inner workings of AI algorithms.
  • Ability to analyze data and use it to improve processes.
  • Develop real projects using advanced programming tools.
  • Prepare to enter the professional field of AI applications.

Learner reviews

These reviews are from learners who bought the content and completed at least 50% of it — there are no reviews from anyone who hasn't gone through the material.
4.9
★★★★★
72 reviews
5★
65
4★
7
3★
0
2★
0
1★
0

    Course content

    1

    Introduction to Artificial Intelligence

    3 lectures
    1. What is Artificial IntelligenceDefines artificial intelligence by splitting the two words, explains that no single agreed definition exists, and reviews definitions such as John McCarthy's and one describing it as making computers do what humans do, but better.4:31
    2. Methods of Defining Artificial IntelligenceReviews four approaches to defining AI: thinking humanly, thinking rationally, acting humanly and acting rationally, including the Turing test and what a program needs to pass it, and the rational agent concept.9:02
    3. Fields and Sciences of Artificial IntelligenceSurveys the fields and sciences of AI: the agent in hardware and software forms, the traits of intelligence such as learning, thinking, reasoning and problem solving, and areas like Computer Vision, neural networks and types of Machine Learning.15:32
    2

    Intelligent Agents

    8 lectures
    1. Introduction to Smart AgentIntroduces the Intelligent Agent concept and the topics of this part: the environment, rationality, the PEAS elements of performance measure, actuators and sensors, environment types and agent types.1:36
    2. What is an AgentDefines an Agent as something that perceives its environment through Sensors and acts on it through Actuators, and explains percepts, the agent function and the agent program with a vacuum cleaner cleaning two rooms.15:34
    3. Rational AgentExplains the Rational Agent, which picks the best action to achieve the best performance given its performance measure and knowledge of the environment, the difference between rationality and omniscience, and the concept of Autonomy.8:11
    4. PEAS Analysis for AgentExplains PEAS analysis of an agent before designing it: Performance Measure, Environment, Actuators and Sensors, with examples of a vacuum cleaner, a taxi driver and a medical system.8:56
    5. Types of EnvironmentsExplains how to classify the environments an agent works in: fully or partially observable, deterministic or stochastic, episodic or sequential, static or dynamic, discrete or continuous, single or multi-agent, using the taxi driver example.9:48
    6. Types of Agents (Part One)Classifies agents by their program and explains the Simple Reflex Agent, which acts on simple rules from the current percept with no memory, using the Vacuum Cleaner example and its limits.12:08
    7. Types of Agents (Part Two)Covers the remaining agent types: the Model-Based Reflex Agent that keeps a model of the world and the Goal-Based Agent that acts toward a goal, with a taxi example, leading into the Utility-Based Agent.23:26
    8. Types of Agents (Part Three)Explains the Learning Agent, the most advanced agent type, its components Critic, Performance Standard, Learning Element and Performance Element, how it learns from feedback, then summarizes the steps of designing an agent.17:15
    3

    Search Operations

    15 lectures
    1. Introduction to the Research ProcessIntroduces Search as a problem-solving approach in AI: turning a problem into a search problem and applying an algorithm to it, with a number-guessing example that narrows the range through successive questions.8:57
    2. Steps to Convert the ProblemExplains the steps for turning a problem into a Search Problem with four parts: state space, actions and transition function, initial state and goal test, where the solution is a plan of sequential actions, plus the idea of a model.9:05
    3. Practical Example of Problem Transformation StepsApplies turning a problem into a Search Problem in practice, with the example of travelling to Bucharest in Romania and then the Pacman game, defining the state space, successor function, goal test and cost.12:23
    4. Determining the Number of CasesExplains how to count the number of states in a state space using the Pacman game: multiplying agent positions and ghost movements, and adding dot states for the eat-all-dots problem, leading into state-based graphs and search trees.20:35
    5. Organizing CasesExplains organizing states in a Search Problem as a Graph and a Search Tree, where states branch into children, and how cycles appear in the graph, ahead of applying search algorithms.18:01
    6. Search Method within the Search TreeExplains the difference between Search Tree and Tree Search, the role of the Frontier in the general search algorithm, and the steps of picking and expanding nodes until the goal is reached, with a city example and a graph example.18:40
    7. First Search Strategy DFSExplains Depth First Search: going as deep as possible down one branch, then backtracking to the branching point to try the other branch, applied on a graph that starts at S and aims for goal G.23:51
    8. Second Strategy BFSExplains Breadth First Search, which explores the graph level by level using a FIFO Queue, and is best when the solution lies close to the starting point.14:07
    9. Practical Application of the First and Second Strategies DFS & BFSA hands-on Python application of DFS and BFS on mazes read from text files, comparing how many states each explores and how a Stack differs from a Queue in their use.17:17
    10. Third Strategy IDExplains Iterative Deepening, which combines the strengths of DFS and BFS by running depth-first search up to a level limit and raising that limit level by level, with a graph example.12:43
    11. Fourth Strategy UCSExplains Uniform Cost Search, which always expands the node with the lowest cumulative cost from the root, comparing node costs in the Frontier, and notes its drawback of exploring many states since it does not know where the goal is.16:51
    12. Fifth Strategy GBFSExplains Greedy Best First Search, which picks the node closest to the goal using a Heuristic Function that estimates distance, and compares its result with the optimal solution.25:15
    13. Sixth Strategy A StarRecaps the earlier search strategies, then explains A Star Search, which picks nodes by adding the cost so far G and the estimated distance to the goal H, on a maze, and leads into Adversarial Search.21:33
    14. Seventh Strategy MinimaxExplains the Minimax algorithm for Adversarial Search in Tic Tac Toe, where the Max player maximizes and the Min player minimizes the value, with the Actions, Result and Utility functions used to pick the best move.33:43
    15. Practical Application Maze
    4

    Knowledge

    10 lectures
    1. Introduction to KnowledgeIntroduces the Knowledge part: intelligence depends on knowledge to draw new conclusions, setting up knowledge-based agents that act through the knowledge represented inside them.2:00
    2. Logical ThinkingExplains logical reasoning in AI: deriving new information from known sentences using the Harry, Hagrid and Dumbledore example, then representing knowledge in a formal language and leading to Propositional Logic.6:12
    3. Default Logic (Part One)Explains Propositional Logic and its symbols P, Q and R, and its connectives Not, And, Implication and Biconditional, with truth tables and the difference between Implication and Biconditional.14:41
    4. Default Logic (Part Two)Explains the Model, the Knowledge Base, Entailment and Inference in propositional logic, with an example where it being Tuesday and not raining means Harry will go for a run.9:31
    5. Model Checking AlgorithmExplains the Model Checking inference algorithm: enumerating all possible models in a table and checking whether the knowledge base KB entails Alpha, with an example of three symbols and eight possibilities.14:38
    6. Practical Example of Model Checking AlgorithmApplies the Model Checking algorithm in Python: defining symbols and building logical sentences with And, Or and Not to represent knowledge, then checking whether the knowledge base entails the conclusion.25:04
    7. Practical Application Model Checking
    8. Knowledge EngineeringExplains Knowledge Engineering, identifying symbols and representing a problem in a knowledge base, applied to a game of deducing the culprit, weapon and room in Python using the logic.py file.29:25
    9. The Code Used in Designing the Clue Game
    10. First-Order LogicExplains First Order Logic and how it improves on propositional logic, using constant symbols, predicate symbols and universal and existential quantifiers, with a Hogwarts houses example.17:18
    5

    Probability

    12 lectures
    1. Introduction to ProbabilityIntroduces Probability for handling uncertain information in AI, with examples such as a robot sensing its environment, weather forecasting and rolling a die.2:44
    2. Probability and Unconditional ProbabilityExplains the basics of probability theory: probability values between zero and one, computing probabilities for dice and the sum of two dice, and Unconditional Probability and why it is not enough for an intelligent agent.12:17
    3. Conditional ProbabilityExplains Conditional Probability, the probability of an event given prior evidence, its formula P(A given B) with the two-dice example, converting between P(A|B) and P(B|A), and a lead-in to random variables.10:29
    4. Random Variable and IndependenceExplains the Random Variable, its domain and its probability distribution that sums to one, then Independence between events and the product rule for independent events, using the two-dice example.19:00
    5. Bayes' TheoremExplains Bayes' Rule: deriving it from conditional probability and using it to compute the probability of an event from that of the reverse event, with the example of predicting afternoon rain given a cloudy morning.12:01
    6. Joint ProbabilityExplains Joint Probability, the chance of two events happening together such as clouds and rain, its distribution table, and how Conditional Probability is derived from it.11:12
    7. Probability RulesCovers the rules of probability: negation, and marginalization for obtaining an unconditional probability from a joint probability, linking this to how an agent handles uncertain information.20:46
    8. Bayesian NetworkExplains the Bayesian Network, a data structure that represents dependencies among random variables through nodes and arrows, with conditional probability tables and the computation of joint probability from them.25:31
    9. Inference for ProbabilityExplains probabilistic Inference: deriving a probability distribution for a query variable given evidence while accounting for hidden variables, with an example of an appointment, train track maintenance and rain.11:55
    10. Practical Application of Building a Bayesian NetworkA hands-on Python build of a Bayesian Network: defining nodes and conditional probability tables, then adding the arrows between nodes to complete the model.25:23
    11. Downloading the Application and Codes
    12. Installing AnacondaSteps to download Anaconda from its official website, install it on the computer, then open it and confirm the installation succeeded.2:09
    6

    Optimization

    11 lectures
    1. Introduction to OptimizationIntroduces Optimization problems, which means choosing the best option among the possible ones, contrasts them with search, knowledge and probability problems, and leads into the Local Search algorithm.1:50
    2. Local SearchExplains the Local Search algorithm, which tracks one current state and moves to a neighbor, using a houses and hospitals example with Manhattan distance, and defines the objective function, cost function, current state and neighbors.7:31
    3. Hill Climbing AlgorithmExplains the Hill Climbing algorithm, the simplest Local Search method, which moves to the best neighbor of the current state, with pseudocode and the houses and two hospitals example, and its flaw of being short-sighted and settling on a non-optimal solution.12:07
    4. Algorithm VariablesExplains the problems of Hill Climbing such as Local Maximum, Local Minimum and Flat Local Maximum, and the algorithm variants that address them: Steepest-ascent, First-choice, Random-restart and Local Beam Search.8:39
    5. Practical ApplicationA hands-on Python implementation of the Hill Climbing algorithm on a hospital placement problem over a grid of squares, using Random Restart to pick the best result.24:10
    6. Downloading the App and Codes
    7. Annealing Simulation AlgorithmExplains Simulated Annealing, which avoids Hill Climbing's weakness of stopping at local optima by using a gradually decreasing temperature that controls acceptance of worse solutions, with a city-ordering example.16:39
    8. Linear Programming AlgorithmIntroduces Linear Programming for optimizing a cost function under constraints, formulates a two-machine and workers example as equations, and converts a greater-than constraint to less-than by multiplying by negative one.16:40
    9. Practical Solution to Linear Programming Algorithm ProblemA practical solution to the linear programming problem in Python using SciPy's linear programming function, setting the cost function coefficients and constraints, then printing the solution or reporting none.10:02
    10. Downloading the App and Codes
    11. Machine LearningAn introduction to Machine Learning as a branch of AI and its types: supervised learning with regression and classification, unsupervised learning with clustering, and reinforcement learning.6:27

    Instructor

    Eng. Amr Abdel Fattah

    Eng. Amr Abdel Fattah

    Computer systems engineer specializing in mobile app and website development, with experience in creating popular platforms and web applications.
    49.1K views20 courses

    This course is part of the diploma

    Related courses