Artificial Intelligence Tutorial

Introduction to Artificial Intelligence Intelligent Agents

Search Algorithms

Problem-solving Uninformed Search Informed Search Heuristic Functions Local Search Algorithms and Optimization Problems Hill Climbing search Differences in Artificial Intelligence Adversarial Search in Artificial Intelligence Minimax Strategy Alpha-beta Pruning Constraint Satisfaction Problems in Artificial Intelligence

Knowledge, Reasoning and Planning

Knowledge based agents in AI Knowledge Representation in AI The Wumpus world Propositional Logic Inference Rules in Propositional Logic Theory of First Order Logic Inference in First Order Logic Resolution method in AI Forward Chaining Backward Chaining Classical Planning

Uncertain Knowledge and Reasoning

Quantifying Uncertainty Probabilistic Reasoning Hidden Markov Models Dynamic Bayesian Networks Utility Functions in Artificial Intelligence

Misc

What is Artificial Super Intelligence (ASI) Artificial Satellites Top 7 Artificial Intelligence and Machine Learning trends for 2022 8 best topics for research and thesis in artificial intelligence 5 algorithms that demonstrate artificial intelligence bias AI and ML Trends in the World AI vs IoT Artificial Intelligence in Social Media Artificial Intelligence in Transportation Disadvantages of Artificial Intelligence in Education Flowchart for Genetic Algorithm in Artificial Intelligence IEEE Papers on Artificial Intelligence Impact of Artificial Intelligence On Everyday Life Impact of Artificial Intelligence on Jobs Interesting Facts about Artificial Intelligence Siri Artificial Intelligence Artificial intelligence assistant operating system Best Books to learn Artificial Intelligence 6th Global summit on artificial intelligence and neural networks Acting Humanly in Artificial Intelligence Artificial Intelligence in Pharmacy Artificial Intelligence in Power Station Artificial Intelligence in Supply Chain Management Artificial Intelligence Interview Questions and Answers Artificial Intelligence Jobs in India For Freshers Artificial Intelligence Painting Artificial Intelligence PNG Images Certainty Factor in AI Essay on Artificial Intelligence Upsc Hill Climbing in Artificial Intelligence Machine Learning and Artificial Intelligence Helps Businesses Operating System Based On Artificial Intelligence Skills Required for Artificial Intelligence Temporal Models in Artificial Intelligence Water Jug Problem in Artificial Intelligence Certainty Factor in Artificial Intelligence Vacuum Cleaner Problem in Artificial Intelligence What is Logic in Artificial Intelligence Artificial Communication Engineering Applications of Artificial Intelligence Types of Agents in Artificial Intelligence which-language-is-used-for-artificial-intelligence Artificial Intelligence in Agriculture Importance of Artificial Intelligence Logic in Artificial Intelligence What is Inference in AI Artificial intelligence in Broadcasting Artificial intelligence in insurance industry AI in Manufacturing Conference AI in PR AI Vs Big Data Career Salary Of AI Engineer in US Temporal Models in Artificial Intelligence Which is Better Artificial Intelligence and Cyber Security Inference in Artificial Intelligence The Role of aiml in Transforming Customer Support AI in Medicine Examples of Artificial Intelligence Software Interrupt in CPI How can we Learn Artificial Intelligence Physics in Artificial Intelligence Artificial Intelligence and Robotics History And Evolution of Artificial Intelligence Objective of Developing Artificial Intelligence Systems Agent Environment in AI Choose the Optimal Number of Epochs to Train a Neural Network in Keras Difference between Backward Chaining and Forward Chaining Difference between Feed Forward Neural Networks and Recurrent Neural Networks Means Ends Analysis in Artificial Intelligence Mini Max Algorithm in Artificial Intelligence Multi Layer Feed Forward Neural Network Reasoning in Artificial Intelligence Search Algorithms in Artificial Intelligence Turing Test in AI Issues in Design of Search Problem in Artificial Intelligence Markov Network in Artificial Intelligence Ontology in Artificial Intelligence Opportunities in Artificial Intelligence Research Center For Artificial Intelligence Scope of Artificial Intelligence And Machine Learning AI ML in India Uniform Cost Search Algorithm in Artificial Intelligence Cryptarithmetic Problem Dynamic Routing Artificial Intelligence Technologies In 2020 Gradient Descent Neural Networks Natural Language Processing Information Retrieval Unsupervised Learning In Ai Reinforcement Learning In Ai Integration of Blockchain and Artificial Intelligence Artificial Intelligence vs Machine Learning Difference between Machine Learning and Artificial Intelligence Alexnet in Artificial Intelligence Googlenet in Artificial Intelligence Rnn for Sequence Labeling Statistical Machine Translation of Languages in Artificial Intelligence Top 5 Best Programming Languages for Artificial Intelligence Field Transfer Learning in Artificial Intelligence What is Openai Who Invented Artificial Intelligence Approaches of Artificial Intelligence Artificial Intelligence in Banking Artificial Intelligence Techniques

Alpha-beta Pruning | Artificial Intelligence

Alpha-beta pruning is an advance version of MINIMAX algorithm. The drawback of minimax strategy is that it explores each node in the tree deeply to provide the best path among all the paths. This increases its time complexity. But as we know, the performance measure is the first consideration for any optimal algorithm. Therefore, alpha-beta pruning reduces this drawback of minimax strategy by less exploring the nodes of the search tree.

The method used in alpha-beta pruning is that it cutoff the search by exploring less number of nodes. It makes the same moves as a minimax algorithm does, but it prunes the unwanted branches using the pruning technique (discussed in adversarial search).  Alpha-beta pruning works on two threshold values, i.e., ? (alpha) and ? (beta).

  • ?: It is the best highest value, a MAX player can have. It is the lower bound, which represents negative infinity value.
  • ?: It is the best lowest value, a MIN player can have. It is the upper bound which represents positive infinity.

So, each MAX node has ?-value, which never decreases, and each MIN node has ?-value, which never increases.

Note: Alpha-beta pruning technique can be applied to trees of any depth, and it is possible to prune the entire subtrees easily.

Working of Alpha-beta Pruning

Consider the below example of a game tree where P and Q are two players. The game will be played alternatively, i.e., chance by chance. Let, P be the player who will try to win the game by maximizing its winning chances.  Q is the player who will try to minimize P’s winning chances. Here, ? will represent the maximum value of the nodes, which will be the value for P as well. ? will represent the minimum value of the nodes, which will be the value of Q.

alpha beta pruning
  • Any one player will start the game. Following the DFS order, the player will choose one path and will reach to its depth, i.e., where he will find the TERMINAL value.
  • If the game is started by player P, he will choose the maximum value in order to increase its winning chances with maximum utility value.
  • If the game is started by player Q, he will choose the minimum value in order to decrease the winning chances of A with the best possible minimum utility value.
  • Both will play the game alternatively.
  • The game will be started from the last level of the game tree, and the value will be chosen accordingly.
  • Like in the below figure, the game is started by player Q. He will pick the leftmost value of the TERMINAL and fix it for beta (?). Now, the next TERMINAL value will be compared with the ?-value. If the value will be smaller than or equal to the ?-value, replace it with the current ?-value otherwise no need to replace the value.
  • After completing one part, move the achieved ?-value to its upper node and fix it for the other threshold value, i.e., ?.
  • Now, its P turn, he will pick the best maximum value. P will move to explore the next part only after comparing the values with the current ?-value. If the value is equal or greater than the current ?-value, then only it will be replaced otherwise we will prune the values.
  • The steps will be repeated unless the result is not obtained.
  • So, number of pruned nodes in the above example are four and MAX wins the game with the maximum UTILITY value, i.e.,3

The rule which will be followed is: “Explore nodes if necessary otherwise prune the unnecessary nodes.”

Note: It is obvious that the result will have the same UTILITY value that we may get from the MINIMAX strategy.