Table of Contents

## Algorithm AO* in Artificial Intelligence

Best-first search algorithm for solving planning problems – AO*. This is an improved version of A* algorithm which performs better in problem solving under the dynamics of environment.

The AO* algorithm operates by generating an AND-OR graph representing the problem. For a single time period, let’s denote the set of all possible actions as E and denote the set of all possible states by V. The AND nodes stand for conditions attained before reaching the proposed end-state while the OR nodes reflect many potentials ways in which such a point could be reached.

The AO* maintains a priority queue of nodes ordered by f-value. The f-value of a node equals the total of its g-value and h-value. G-value of a node is the cost of the path from the starting state to the present state, whereas H- value represents the estimated cost of the path from the present state to the ultimate state.

The first step is expanding of a node with the minimum f-value value in the priority queue using the AO * algorithm. The algorithm halts if the node is a goal node, and provides a path to the goal node. In this case, the algorithm branches to all other nodes that come after the nod..

The algorithm increases the value ‘f’ in the successor node when it expands one. All of the node’s predecessor f-values are updated by the algorithm as well.

When the goal node expands, the AO* algorithm terminates when it comes upon an empty queue. This implies that if the priority queue is empty, there is no solution to the problem.

The illustration shows an AND-OR diagram in AO * Algorithm in Artificial Intelligence.

To pass an exam, we have two options, cheat or work hard.

This graph has two options to cheat first or work hard (the red line) and fold (the arc).

When we have more than one option and need to choose one, we apply the OR condition to choose one (we did that here).

In ai javatpoint, the ARK here denotes an AND state.

Here we have recreated the arc between hard work and passing because hard work makes it possible to pass an exam is more than cheating.

**Also Read:** Manchester United transfer news LIVE Camavinga to Man Utd latest England news

## A* vs AO*

Both are part of the information search technique and use heuristics to solve the problem.

For ao* algorithm in artificial intelligence, the solution is guaranteed in both algorithms.

A* always delivers an optimal solution (the shortest route with low costs).

However, there is no guarantee that AO * always provides optimal solutions.

Reason: Because AO * does not scan the entire solution path once it has received the solution.

**Also Read:** Oppo Mobile Phones Under 10000 (2021) Prices, Specifications, and Reviews

## Algorithm

Step 1: Put the start node to OPEN.

Step 2: Calculate the most promising solution tree, say T0.

Then, Step 3: Select a node n that is both OPEN and a member of T0. Take it out of OPEN and put it inside

Step 4: If n is the final destination node, then one levels n as resolved and levels all ancestors of n as resolved. If the start node is marked as resolved, then success and exits.

Step 5: If “n” is not a known solvable knot, mark n as not solvable. If the boot node is marked as no solution, return the error and exit.

Then, Step 6: Expand N. Find all its successors and find its value h (n), slide them to OPEN.

Step 7: go back to step 2.

Step 8: Finishing.

**Also Read:** Neopets Stock Market – The Complete Guide and Shares Report

## How does AO * work?

For AO * Algorithm in Artificial Intelligence, Let’s try to understand it with the following diagram.

Basically ao* algorithm example, we calculate the cost function here (F (n) = G (n) + H (n))

H: Heuristic / estimated value of the nodes. And G: actual costs or edge value (here unit value).

Here in ao* algorithm in artificial intelligence ppt, we have taken the value of the edges 1, which means that we only need to focus on the heuristic value.

The purple values are limit values (they are all equal to one here).

Values in red are heuristic values for nodes.

The green values are new heuristic values for nodes.

### Process

In the diagram, we have two paths: A to D or A to B-C (due to a condition). Calculate the cost of choosing a route, a* algorithm in ai.

F (A-D) = 1 + 10 = 11 and F (A-BC) = 1 + 1 + 6 +12 = 20

As we can see, F (A-D) is smaller than F (A-BC), so the algorithm chooses path F (A-D).

Form D, we have an option that is F-E.

F (A-D-FE) = 1 + 1 + 4 +4 = 10

10 is the cost of getting to FE from D. And the heuristic value of node D also denotes the cost to get from D to FE.

So the new heuristic value of D is 10.

And the cost of A-D remains the same, namely 11.

Assuming we have searched this path and have the goal state, we will never explore the other direction. (that says AO* but here we will also explore another way to see what happens)

**Also Read:** Machine Learning Internship: The Ultimate Guide to Land a ML Internship

**Related Searches**

[a* algorithm in ai]

[a* search algorithm]

[ai javatpoint]

[a* algorithm in artificial intelligence]

[ao* algorithm in artificial intelligence]

[ao* algorithm in artificial intelligence ppt]

[a* and ao* algorithm in artificial intelligence]

[ao* algorithm in artificial intelligence with example]

[ao * algorithm in artificial intelligence]

[ao* algorithm example]

[ao* algorithm]

[a * algorithm]

[a* search algorithm]

[a* algorithm in artificial intelligence notes]

[a* algorithm]

[graphs gfg]

[graph in data structure]

[ao* algorithm geeksforgeeks]

[a* search algorithm]

[knn algorithm tutorialspoint]

[knn algorithm]

[a* algorithm with example]

[a* algorithm]

[and or graph in artificial intelligence]

[and or graph in artificial intelligence]

[problem reduction in ai]

## Related posts

### Featured Posts

##### Jojoy toca boca – The Complete Guide

Jojoy toca boca In the rapid development of computer entertainment. One game stands out as an indicator of creativity and…

##### The Endurance of Y2K Clothes Fashion in Cross-Generational Trends

Y2K Clothes Introduction Imagine bold colors paired with metallic logos so large they can be seen a mile away; It’s…