Artificial Intelligence Tutorial

Introduction to Artificial Intelligence Intelligent Agents Artificial intelligence Permeations Difference Between Greedy Best First Search and Hill Climbing Algorithm Multi-Layer Feed-Forward Neural Network Implementing Artificial Neural Network Training Process in Python Agent Environment in Artificial Intelligence Search Algorithms in Artificial Intelligence Turing Test in AI Reasoning in Artificial Intelligence Mini-Max Algorithm in Artificial Intelligence Examples of artificial intelligence software How to Implement Interval Scheduling Algorithm in Python Means-Ends Analysis in Artificial Intelligence Mini-Batch Gradient Descent with Python 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 Narrow Artificial Intelligence Artificial Intelligence in Banking Approaches of Artificial Intelligence Artificial Intelligence Techniques 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 What is OpenAI Who invented Artificial Intelligence Artificial Intelligence in Medicine History and Evolution of Artificial Intelligence How can we learn Artificial Intelligence (AI) Objective of developing Artificial Intelligence Systems Artificial Intelligence and Robotics Physics in Artificial Intelligence What are the Advantages and Disadvantages of Artificial Neural Networks? The Role of AIML in Transforming Customer Support

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 Cryptarithmetic Problem in Artificial Intelligence Difference between AI and Neural Network Difference between Artificial Intelligence and Human Intelligence Virtual Assistant (AI Assistant) ARTIFICIAL INTELLIGENCE PAINTING ARTIFICIAL INTELLIGENCE PNG IMAGES Best Books to learn Artificial Intelligence Certainty Factor in AI Certainty Factor in Artificial Intelligence Disadvantages of Artificial Intelligence In Education Eight topics for research and thesis in AI Engineering Applications of Artificial Intelligence Five algorithms that demonstrate artificial intelligence bias 6th Global summit on artificial intelligence and neural networks Artificial Communication Artificial Intelligence in Social Media Artificial Intelligence Interview Questions and Answers Artificial Intelligence Jobs in India For Freshers Integration of Blockchain and Artificial Intelligence Interesting Facts about Artificial Intelligence Machine Learning and Artificial Intelligence Helps Businesses Operating System Based On Artificial Intelligence SIRI ARTIFICIAL INTELLIGENCE SKILLS REQUIRED FOR ARTIFICIAL INTELLIGENCE Temporal Models in Artificial Intelligence Top 7 Artificial Intelligence and Machine Learning trends for 2022 Types Of Agents in Artificial Intelligence Vacuum Cleaner Problem in AI Water Jug Problem in Artificial Intelligence What is Artificial Super Intelligence (ASI) What is Logic in AI Which language is used for Artificial Intelligence Essay on Artificial Intelligence Upsc Flowchart for Genetic Algorithm in AI Hill Climbing In Artificial Intelligence IEEE Papers on Artificial Intelligence Impact of Artificial Intelligence On Everyday Life Impact of Artificial Intelligence on Jobs The benefits and challenges of AI network monitoring

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 Permeations Difference Between Greedy Best First Search and Hill Climbing Algorithm What is Inference in AI Inference in Artificial Intelligence Interrupt in CPI Artificial Intelligence in Broadcasting Ai in Manufacturing Conference: AI Vs Big Data Career: Artificial Ingtelligence In Pr: AI in Insurance Industry Which is better artificial intelligence and cyber security? Salary of Ai Engineer in Us Artificial intelligence in agriculture Importance Of Artificial Intelligence Logic in Artificial Intelligence

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.