<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Algorithms Q&amp;A - Recent questions in Informed Search</title>
<link>https://notexponential.com/questions/artificial-intelligence/informed-search</link>
<description>Powered by Question2Answer</description>
<item>
<title>Solve this grid world.</title>
<link>https://notexponential.com/982/solve-this-grid-world</link>
<description>&lt;p&gt;Solve the final V* values for the given grid world.&amp;nbsp; All given values are exit states.&amp;nbsp; Fill in all missing cells.&amp;nbsp; Don’t use value iteration.&amp;nbsp; Show all your work/logic/steps, etc.&lt;/p&gt;&lt;p&gt;Assume: Gamma = 0.9.&amp;nbsp; Noise Model: [0.8, 0.1, 0.1], that is, 80% chance of going in the intended direction and 10% in each of perpendicular ones.&lt;/p&gt;&lt;p&gt;Using pen and paper is preferable.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/982/solve-this-grid-world</guid>
<pubDate>Tue, 06 May 2025 15:13:38 +0000</pubDate>
</item>
<item>
<title>Admissible Heuristic for Chutes and Ladders</title>
<link>https://notexponential.com/981/admissible-heuristic-for-chutes-and-ladders</link>
<description>You are a player of Chutes and Ladders. You are going from cell 1 to cell 100, using standard 6 faced dice. There are “chutes” and “ladders” that hurt and help, respectively.&lt;br /&gt;
Explain an algorithm to calculate an admissible heuristic starting square i.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/981/admissible-heuristic-for-chutes-and-ladders</guid>
<pubDate>Tue, 06 May 2025 15:12:07 +0000</pubDate>
</item>
<item>
<title>Weird N Puzzle</title>
<link>https://notexponential.com/980/weird-n-puzzle</link>
<description>You are given a weirdly shaped n puzzle (sliding puzzle).&lt;br /&gt;
&lt;br /&gt;
The best way to imagine the shape is that think of 10 x 10 n puzzle (a rather large one), and that some tiles in the center are just fixed - they don&amp;#039;t move. (See Slack for an example).&lt;br /&gt;
&lt;br /&gt;
For this problem, what is a good heuristic, from an A Star algorithm perspective? Clearly Manhattan Distance still works, but is that the best?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/980/weird-n-puzzle</guid>
<pubDate>Tue, 04 Mar 2025 16:03:53 +0000</pubDate>
</item>
<item>
<title>I have all the (unsorted) cards</title>
<link>https://notexponential.com/979/i-have-all-the-unsorted-cards</link>
<description>You are given 52 playing cards, organized in 4 columns and 13 rows. However, these are all Aces, in 4 different colors: red, blue, green and yellow. These are all jumbled up. You are supposed to organize them such that each column has one color of Aces only. You can decide which color you want to go in which column. The only move that you can move is to swap/exchange two cards that horizontally or vertically adjacent. That is, just vertical or horizontal movement, like the n-puzzle, and no diagonal moves.&lt;br /&gt;
&lt;br /&gt;
Analyze the problem, and present an algorithm for this. Present your heuristic. No need to explain how A-Star works itself. Describe without using any pseudocode.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/979/i-have-all-the-unsorted-cards</guid>
<pubDate>Tue, 04 Mar 2025 15:50:53 +0000</pubDate>
</item>
<item>
<title>Solve the V* values for this grid world MDP - 3 x 4</title>
<link>https://notexponential.com/796/solve-the-v-values-for-this-grid-world-mdp-3-x-4</link>
<description>&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);&quot;&gt;Estimate the final V* values for a given grid world.&amp;nbsp; Discount, noise, terminal states are all given.&amp;nbsp; You are given a 3x4 grid world and you want to find V* values.&amp;nbsp; There is a discount rate of 0.9 and noise of 0.8, 0.1, 0.1.&amp;nbsp; The first column has all terminal states with value -1 and the last column has terminal states with value 1.&amp;nbsp; There is no living reward.&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; style=&quot;border-collapse:collapse; border:none; margin-left:76.25pt; border-spacing: 0px;&quot; class=&quot;MsoTableGrid&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border-style:solid; border-width:1pt; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;-1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:none; border-right:1pt solid black; border-top:1pt solid black; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:none; border-right:1pt solid black; border-top:1pt solid black; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:none; border-right:1pt solid black; border-top:1pt solid black; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:1pt solid black; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;-1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:1pt solid black; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;-1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/796/solve-the-v-values-for-this-grid-world-mdp-3-x-4</guid>
<pubDate>Sun, 16 Apr 2023 19:47:18 +0000</pubDate>
</item>
<item>
<title>A* algorithm for fruit sorting</title>
<link>https://notexponential.com/794/a-algorithm-for-fruit-sorting</link>
<description>You are given 10 apples of different sizes, 10 bananas of different sizes and 10 oranges of different sizes, organized in a 3x10 array. &amp;nbsp;You want to organize them so that fruits go from top to bottom in ascending order of size. &amp;nbsp;Any fruit can be used in any column that you like. &amp;nbsp;The only move allowed is to swap two fruits horizontally or vertically. &amp;nbsp;You want to use A* algorithm to minimize the number of moves for this. &amp;nbsp;Explain your approach.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/794/a-algorithm-for-fruit-sorting</guid>
<pubDate>Sun, 19 Mar 2023 16:44:14 +0000</pubDate>
</item>
<item>
<title>Stationary Distribution for this conditional probability table</title>
<link>https://notexponential.com/705/stationary-distribution-this-conditional-probability-table</link>
<description>&lt;p&gt;What is the stationary distribution for the following conditional probability table?&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://www.notexponential.com/notes/wp-content/uploads/2020/04/MarkovModel.png&quot; style=&quot;height:177px; width:833px&quot;&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/705/stationary-distribution-this-conditional-probability-table</guid>
<pubDate>Sat, 04 Apr 2020 13:35:39 +0000</pubDate>
</item>
<item>
<title>What is the code level difference between graph search and tree search?</title>
<link>https://notexponential.com/703/what-code-level-difference-between-graph-search-tree-search</link>
<description>What is the code level difference between graph search and tree search?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/703/what-code-level-difference-between-graph-search-tree-search</guid>
<pubDate>Mon, 03 Feb 2020 16:54:34 +0000</pubDate>
</item>
<item>
<title>Solve this GridWorld</title>
<link>https://notexponential.com/689/solve-this-gridworld</link>
<description>&lt;p&gt;Calculate the final V* values for the given grid world.&amp;nbsp; Fill in all missing cells.&amp;nbsp; All given values are terminal states.&amp;nbsp; Use value iteration/policy iteration, any method that you like.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:&amp;quot;Calibri&amp;quot;,sans-serif; font-size:11.0pt&quot;&gt;Assume 50% discount (that is, gamma = 0.5).&amp;nbsp; Assume 0.8, 0.1, 0.1 noise, that is, probability of going to the intended direction is 0.8, and probability of going left/right is 0.1 each.&lt;/span&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;caption&gt;GridWorld&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/689/solve-this-gridworld</guid>
<pubDate>Mon, 13 May 2019 20:24:23 +0000</pubDate>
</item>
<item>
<title>Admissible Heuristic for n-puzzle if multiple tiles can be slided at once</title>
<link>https://notexponential.com/684/admissible-heuristic-for-puzzle-multiple-tiles-slided-once</link>
<description>In the context of n-puzzle, consider a variation that we can slide multiple tiles in one row or column, if they are touching each other. &amp;nbsp;The cost of this slide operation is the same as that of sliding one tile.&lt;br /&gt;
&lt;br /&gt;
Design an admissible and useful heuristic for this problem.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/684/admissible-heuristic-for-puzzle-multiple-tiles-slided-once</guid>
<pubDate>Tue, 07 May 2019 10:51:24 +0000</pubDate>
</item>
<item>
<title>8 puzzle that can be solved or not?</title>
<link>https://notexponential.com/641/8-puzzle-that-can-be-solved-or-not</link>
<description>Some of 8 puzzles can be solved if it is transferred from the #12345678. But there are 9! states. How to rule out many of the wrong states use rules that 8 puzzles have potential, like odd and even, the right rule is #12345678, every line only three place and so on.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/641/8-puzzle-that-can-be-solved-or-not</guid>
<pubDate>Tue, 30 Apr 2019 22:49:15 +0000</pubDate>
</item>
<item>
<title>Is Harmonic Mean of admissible heuristics an admissible heuristic?</title>
<link>https://notexponential.com/629/harmonic-mean-admissible-heuristics-admissible-heuristic</link>
<description>Given a family of admissible heuristic functions h1, h2, .. hn. &amp;nbsp;Is the Harmonic Mean, H = n / (1/h1 + 1/h2 + ... 1/hn) an admissible function? &amp;nbsp;How would you define this function if one of the h functions is zero?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/629/harmonic-mean-admissible-heuristics-admissible-heuristic</guid>
<pubDate>Tue, 09 Apr 2019 02:25:06 +0000</pubDate>
</item>
<item>
<title>Converting ternary constraint into binary constraints</title>
<link>https://notexponential.com/616/converting-ternary-constraint-into-binary-constraints</link>
<description>Show how a single ternary constraint such as &amp;quot;x + y = z&amp;quot; can be turned into three binary constraints by using an auxiliary variable.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/616/converting-ternary-constraint-into-binary-constraints</guid>
<pubDate>Sat, 09 Feb 2019 15:59:04 +0000</pubDate>
</item>
<item>
<title>Manhattan Distances, but Linear Interference...</title>
<link>https://notexponential.com/614/manhattan-distances-but-linear-interference</link>
<description>&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;Manhattan Distance does not take into account linear conflicts. For example:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;- - 3,1 needs to be changed to -&amp;nbsp;1, -, 3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;[Only first row is being shown here, and the blank is assumed to be at the top left corner.]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;Manhattan Distance is 4, but tiles 1 and 3 interfere with each other while moving.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;So, how can we improve this heuristic?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/614/manhattan-distances-but-linear-interference</guid>
<pubDate>Sat, 02 Feb 2019 16:11:04 +0000</pubDate>
</item>
<item>
<title>Give an example of a task environment that is..</title>
<link>https://notexponential.com/605/give-an-example-of-a-task-environment-that-is</link>
<description>&lt;p&gt;Give an example of a task environment that is..&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Episodic and Discrete&lt;/li&gt;&lt;li&gt;Continuous and Episodic&lt;/li&gt;&lt;li&gt;Continuous, Non-Deterministic and Non-Episodic.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;For each of the combinations above, give an example of a task environment.&lt;/div&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/605/give-an-example-of-a-task-environment-that-is</guid>
<pubDate>Fri, 25 Jan 2019 18:48:48 +0000</pubDate>
</item>
<item>
<title>Admissible Heuristic for n-Queens Problem</title>
<link>https://notexponential.com/542/admissible-heuristic-for-n-queens-problem</link>
<description>Given all queens are in their own columns, and a move is defined as picking up a queen and moving to any other row in the same column, what is an admissible heuristic for this problem?&lt;br /&gt;
&lt;br /&gt;
[We note that by the structure of the problem, we always have a queen in each column.]</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/542/admissible-heuristic-for-n-queens-problem</guid>
<pubDate>Sat, 24 Mar 2018 11:44:41 +0000</pubDate>
</item>
<item>
<title>In the context of informed search, what is the difference between complete, optimal and optimally efficient algorithm?</title>
<link>https://notexponential.com/540/informed-difference-complete-optimally-efficient-algorithm</link>
<description>In the context of informed search, what is the difference between complete, optimal and optimally efficient algorithm?&lt;br /&gt;
&lt;br /&gt;
Is A* complete?&lt;br /&gt;
&lt;br /&gt;
Is A* optimal?&lt;br /&gt;
&lt;br /&gt;
Is A* optimally efficient?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/540/informed-difference-complete-optimally-efficient-algorithm</guid>
<pubDate>Mon, 19 Mar 2018 02:35:55 +0000</pubDate>
</item>
<item>
<title>N-Queens Count all conflicts in O(n) time</title>
<link>https://notexponential.com/495/n-queens-count-all-conflicts-in-o-n-time</link>
<description>&lt;p&gt;Count all the conflicts in a given n-Queen state.&amp;nbsp; It is easy to do in O(n&lt;sup&gt;2&lt;/sup&gt;) time.&amp;nbsp; Give an O(n) time algorithm to count all conflicts.&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/495/n-queens-count-all-conflicts-in-o-n-time</guid>
<pubDate>Sat, 03 Mar 2018 02:26:23 +0000</pubDate>
</item>
</channel>
</rss>