Professional Documents
Culture Documents
Problem Solving Techniques in Artificial Intelligence (AI)
Problem Solving Techniques in Artificial Intelligence (AI)
https://www.javatpoint.com/types-of-ai-agents
4. Utility-Based Agents
o These agents are similar to the goal-based agent but provide an extra
component of utility measurement which makes them different by providing a
measure of success at a given state.
o Utility-based agent act based not only goals but also the best way to achieve
the goal.
o The Utility-based agent is useful when there are multiple possible
alternatives, and an agent has to choose in order to perform the best action.
o The utility function maps each state to a real number to check how efficiently
each action achieves the goals.
5. Learning Agents
o A learning agent in AI is the type of agent which can learn from its past
experiences, or it has learning capabilities.
o It starts to act with basic knowledge and then able to act and adapt
automatically through learning.
o A learning agent has mainly four conceptual components, which are:
1. Learning element: It is responsible for making improvements by
learning from environment
2. Critic: Learning element takes feedback from critic which describes
that how well the agent is doing with respect to a fixed performance
standard.
3. Performance element: It is responsible for selecting external action
4. Problem generator: This component is responsible for suggesting
actions that will lead to new and informative experiences.
b. Hence, learning agents are able to learn, analyze performance, and look for
new ways to improve the performance.
These agents prove helpful in the mapping of states and actions.
While solving a complex problem, these agents often fail to
comprehend the next step adequately; thus, problem-solving agents
solve such scenarios. These agents use techniques like B-tree and
heuristic algorithms to solve the problems using artificial
intelligence.
Heuristics
The heuristic method helps comprehend a problem and devises a
solution based purely on experiments and trial and error methods.
However, these heuristics do not often provide the best optimal
solution to a specific problem. Instead, these undoubtedly offer
efficient solutions to attain immediate goals. Therefore, the
developers utilize these when classic methods do not provide an
efficient solution for the problem. Since heuristics only provide time-
efficient solutions and compromise the accuracy, these are
combined with optimization algorithms to improve efficiency.
Example: Travelling Salesman Problem
The most common example of using heuristic is the Travelling
Salesman problem. There is a provided list of cities and their
distances. The user has to find the optimal route for the Salesman
to return to the starting city after visiting every city on the list. The
greedy algorithms solve this NP-Hard problem by finding the optimal
solution. According to this heuristic, picking the best next step in
every current city provides the best solution.
Searching Algorithms
Searching is one of the primary methods of solving any problem in
AI. Rational agents or problem-solving agents use these searching
algorithms to find optimal solutions. These problem-solving agents
are often goal-based and utilize atomic representation. Moreover,
these searching algorithms possess completeness, optimality, time
complexity, and space complexity properties based on the quality of
the solution provided by them.
Types of Searching Algorithms
There are following two main types of searching algorithms:
1. Informed Search
2. Uninformed Search
Informed Search
These algorithms use basic domain knowledge and comprehend
available information regarding a specified problem as a guideline
for optimal solutions. The solutions provided by informed search
algorithms are more efficient than uninformed search algorithms.
Types of informed Search Algorithms
There are following main two types of informed search algorithms:
1. Greedy Search
2. A * Search
Uninformed Search
These algorithms do not have the privilege of using basic domain
knowledge, such as the desired goal’s closeness. It contains
information regarding traversing a tree and identifying leaf and goal
nodes. Uninformed search also goes by the name of blind search
because while traversing, there is no specific information about the
initial state and test for the goal. This search goes through every
node till reaching the desired destination.
Properties of Mini-Max
algorithm:
o Complete- Min-Max algorithm is
Complete. It will definitely find a
solution (if exist), in the finite search
tree.
o Optimal- Min-Max algorithm is optimal if both opponents are playing
optimally.
o Time complexity- As it performs DFS for the game-tree, so the time
complexity of Min-Max algorithm is O(bm), where b is branching factor of the
game-tree, and m is the maximum depth of the tree.
o Space Complexity- Space complexity of Mini-max algorithm is also similar
to DFS which is O(bm).
Step 5: At next step, algorithm again backtrack the tree, from node B to node A. At
node A, the value of alpha will be changed the maximum available value is 3 as max
(-∞, 3)= 3, and β= +∞, these two values now passes to right successor of A which
is Node C.
At node C, α=3 and β= +∞, and the same values will be passed on to node F.
Step 6: At node F, again the value of α will be compared with left child which is 0,
and max(3,0)= 3, and then compared with right child which is 1, and max(3,1)= 3
still α remains 3, but the node value of F will become 1.
Step 7: Node F returns the node value 1 to node C, at C α= 3 and β= +∞, here the
value of beta will be changed, it will compare with 1 so min (∞, 1) = 1. Now at C,
α=3 and β= 1, and again it satisfies the condition α>=β, so the next child of C which
is G will be pruned, and the algorithm will not compute the entire sub-tree G.
Step 8: C now returns the value of 1 to A here the best value for A is max (3, 1) =
3. Following is the final game tree which is the showing the nodes which are
computed and nodes which has never computed. Hence the optimal value for the
maximizer is 3 for this example.