In this series, we would be exploring, at a high level, some ideas, techniques, and algorithms that are at the foundation of AI. AI covers a wide range of techniques and in this series I would be covering the following categories of problems:
In this post, we will explore Search and Knowledge.
Search problems are those where the computer tries to figure out what to do when in a particular situation.
These problems can come in many different types of formats. Some examples are:
The algorithms that are commonly used for solving classical search problems are Depth-first search, Breadth-first search, Greedy Best First search and A* search.
Adversarial search is where the agent is trying to make intelligent decisions and there is someone else such as an opponent who has the opposite objective and trying to win the game for itself. A popular example of this would be a game of Tic-Tac-Toe.
Minimax is an algorithm that can be used to solve adversarial search problems. The algorithm evaluates the various moves the opponent could take in a particular situation and determines the optimal move to make to win the game.
In a simple game such as Tic-Tac-Toe, it is possible to evaluate all the possible moves of the opponent. But in more complex games such as Chess, it is computationally intractable to evaluate all the possible options. This is where optimization methods to estimate the optimal move without having to compute all the alternatives become important. Evaluation function is one such method.
How good the AI is at playing a game would ultimately depend on how good the evaluation function is at estimating how good or bad a particular game state is.
Knowledge problems are those where the computer makes inferences or deductions based on facts and logical reasoning.
Consider the following statements.
From these statements, AI will derive the following:
Application for this problem type would be in playing games such as Clue, Mastermind, etc. and solving logical puzzles.
Knowledge Engineering is the process of encoding known facts and logic in AI and making AI logical so they can do the reasoning and make deductions.
Model Checking is an algorithm behind the scenes. The idea is to encode all the statements using Propositional Logic and apply Model Checking to make deductions.
Another approach is to convert all the statements to Conjunctive Normal Form by using Inference Rules. Then we can apply Inference by Resolution to solve the puzzle. First-Order Logic is another algorithm ideal for complex logical puzzles.
Reference: CS50’s Introduction to Artificial Intelligence with Python