<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Algorithms Q&amp;A - Recent questions and answers in Informed Search</title>
<link>https://notexponential.com/qa/artificial-intelligence/informed-search</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Stationary Distribution for this conditional probability table</title>
<link>https://notexponential.com/705/stationary-distribution-this-conditional-probability-table?show=1079#a1079</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Hello Professor,&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Let the stationary distribution be:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;pi = (s, c, r)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;where:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = probability of Sun&lt;br&gt;c = probability of Cloudy&lt;br&gt;r = probability of Rain&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;For a stationary distribution, the probabilities should stay the same after one transition. So we need:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;pi = pi P&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Using the table, the equations are:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 0.6s + 0.4c + 0.1r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 0.3s + 0.2c + 0.4r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 0.1s + 0.4c + 0.5r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Also, since these are probabilities:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + c + r = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;From the first equation:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 0.6s + 0.4c + 0.1r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.4s = 0.4c + 0.1r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;4s = 4c + r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 4s - 4c&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;From the second equation:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 0.3s + 0.2c + 0.4r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.8c = 0.3s + 0.4r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Substitute r = 4s - 4c:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.8c = 0.3s + 0.4(4s - 4c)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.8c = 0.3s + 1.6s - 1.6c&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;2.4c = 1.9s&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 19s / 24&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now use r = 4s - 4c:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 4s - 4(19s / 24)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 4s - 19s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 24s / 6 - 19s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 5s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now use the total probability equation:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + c + r = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + 19s / 24 + 5s / 6 = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + 19s / 24 + 20s / 24 = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;63s / 24 = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 24 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 8 / 21&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now find c:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 19s / 24&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 19 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now find r:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 5s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 20 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So the stationary distribution is:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Sun = 8 / 21&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Cloudy = 19 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Rain = 20 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;In decimal form:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Sun = 0.381&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Cloudy = 0.302&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Rain = 0.317&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Final answer:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;pi = (8 / 21, 19 / 63, 20 / 63)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;This means that in the long run, the weather is sunny about 38.1% of the time, cloudy about 30.2% of the time, and rainy about 31.7% of the time&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/705/stationary-distribution-this-conditional-probability-table?show=1079#a1079</guid>
<pubDate>Sun, 26 Apr 2026 13:16:22 +0000</pubDate>
</item>
<item>
<title>Answered: Admissible Heuristic for Chutes and Ladders</title>
<link>https://notexponential.com/981/admissible-heuristic-for-chutes-and-ladders?show=1031#a1031</link>
<description>&lt;p data-pm-slice=&quot;0 0 []&quot; style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;An admissible heuristic can be built&amp;nbsp;simply by ignoring chutes and keeping ladders.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;caret-color:#ffffff; color:#000000&quot;&gt;Let&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;caret-color:#ffffff; color:#000000&quot;&gt;h(i)&lt;/em&gt;&lt;span style=&quot;color:#000000&quot;&gt;&lt;span style=&quot;caret-color:#ffffff&quot;&gt; be the minimum number of dice throws needed to reach square 100 from square &lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;caret-color:#ffffff; color:#000000&quot;&gt;i&lt;/em&gt;&lt;span style=&quot;color:#000000&quot;&gt;&lt;span style=&quot;caret-color:#ffffff&quot;&gt; in this relaxed game. Since removing chutes&amp;nbsp;makes&amp;nbsp;the game easier, the true cost in the real game is never smaller than this value, so&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;caret-color:#ffffff; color:#000000&quot;&gt;h(i)&lt;/em&gt;&lt;span style=&quot;color:#000000&quot;&gt;&lt;span style=&quot;caret-color:#ffffff&quot;&gt; is admissible.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;Steps:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;1. States 1...100&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;2. For each square &lt;em&gt;s&lt;/em&gt;, for each die result d (1...6):&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- move to &lt;em&gt;t = s + d&lt;/em&gt; if &lt;em&gt;t &amp;lt;= 100&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;&amp;nbsp; &amp;nbsp; - if t is the foot of a ladder, replace it by the ladder top,&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- do not apply chutes&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#000000&quot;&gt;&lt;span style=&quot;caret-color:#ffffff&quot;&gt;3. This&amp;nbsp;gives a directed graph where every edge has cost 1 throw.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;4. Run BFS backward from square 100&amp;nbsp;or BFS forward from each node in order to get the shortest path length to 100.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;5. Set that distance as&lt;em&gt; h(s)&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#000000&quot;&gt;&lt;em&gt;------------------------------&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style=&quot;color:#000000&quot;&gt;&lt;span style=&quot;caret-color:#ffffff&quot;&gt;Why admissible? The&amp;nbsp;relaxed game has all real moves except the harmful effect of chutes, therefore, its shortest path cost is a lower bound on the true shortest path cost.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/981/admissible-heuristic-for-chutes-and-ladders?show=1031#a1031</guid>
<pubDate>Thu, 16 Apr 2026 10:39:31 +0000</pubDate>
</item>
<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>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>Answered: Solve this GridWorld</title>
<link>https://notexponential.com/689/solve-this-gridworld?show=972#a972</link>
<description>10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;br /&gt;
10 &amp;nbsp;&amp;nbsp;&amp;nbsp;a &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a &amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;br /&gt;
10 &amp;nbsp;&amp;nbsp;&amp;nbsp;b &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b &amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;br /&gt;
10 &amp;nbsp;&amp;nbsp;&amp;nbsp;a &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a &amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;br /&gt;
10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10 &amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;br /&gt;
&lt;br /&gt;
a = 0.5*(0.8*10 + 0.1*b + 0.1*10) = 0.5*(9+0.1*b)&lt;br /&gt;
b = 0.5*(0.8*10 + 0.1*a + 0.1*b) = 0.5*(8 + 0.1*a + 0.1*b)&lt;br /&gt;
c = 0.5*(0.8*b + 0.1*b + 0.1*b) = 0.5*(b)&lt;br /&gt;
On solving, a = 4.72 b = 4.459 c = 2.23</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/689/solve-this-gridworld?show=972#a972</guid>
<pubDate>Mon, 06 May 2024 20:21:15 +0000</pubDate>
</item>
<item>
<title>Answered: Admissible Heuristic for n-Queens Problem</title>
<link>https://notexponential.com/542/admissible-heuristic-for-n-queens-problem?show=971#a971</link>
<description>&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;background-color:#ffffff;margin-top:0pt;margin-bottom:15pt;&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;To calculate the heuristic that considers both vertical, horizontal, and diagonal attacks, we need to sum up the counts of attacking pairs for each of these categories. Let&#039;s denote these counts as follows:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-bottom:0; margin-top:0; padding-inline-start:48px&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:12pt;font-family:Roboto,sans-serif;color:#0d0d0d;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;1&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;em style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:italic; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;V&lt;/em&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;: Number of pairs of queens attacking each other vertically.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:12pt;font-family:Roboto,sans-serif;color:#0d0d0d;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;1&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;em style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:italic; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;H&lt;/em&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;: Number of pairs of queens attacking each other horizontally.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:12pt;font-family:Roboto,sans-serif;color:#0d0d0d;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;1&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;background-color:#ffffff;margin-top:0pt;margin-bottom:12pt;&quot; role=&quot;presentation&quot;&gt;&lt;em style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:italic; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;D&lt;/em&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;: Number of pairs of queens attacking each other diagonally.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;background-color:#ffffff;margin-top:15pt;margin-bottom:0pt;padding:0pt 0pt 15pt 0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;The final admissible heuristic would then be the sum of these counts:&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt;padding:0pt 0pt 15pt 0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Heuristic=&lt;/span&gt;&lt;em style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:italic; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;V&lt;/em&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;+&lt;/span&gt;&lt;em style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:italic; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;H&lt;/em&gt;&lt;span style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;+&lt;/span&gt;&lt;em style=&quot;background-color:transparent; color:#0d0d0d; font-family:Arial,sans-serif; font-size:12pt; font-style:italic; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;D&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:2.1;text-align: justify;background-color:#ffffff;margin-top:0pt;margin-bottom:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#333333; font-family:Arial,sans-serif; font-size:12pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;This heuristic is admissible because it provides a lower bound on the number of moves required to reach the goal state. It&#039;s consistent because moving a queen to a different row in the same column, to a different column, or diagonally will either decrease the count of vertical, horizontal, or diagonal attacks, or leave it unchanged.&lt;/span&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/542/admissible-heuristic-for-n-queens-problem?show=971#a971</guid>
<pubDate>Sat, 04 May 2024 22:55:17 +0000</pubDate>
</item>
<item>
<title>Answered: Give an example of a task environment that is..</title>
<link>https://notexponential.com/605/give-an-example-of-a-task-environment-that-is?show=970#a970</link>
<description>&lt;p dir=&quot;ltr&quot; style=&quot;line-height:2.1;text-align: justify;margin-top:0pt;margin-bottom:15pt;&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Examples for given combinations:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;margin-bottom:0; margin-top:0; padding-inline-start:48px&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:decimal;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;1&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Episodic and Discrete:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-bottom:0; margin-top:0; padding-inline-start:48px&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;2&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Example: Playing a game of tic-tac-toe.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;2&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Explanation: In tic-tac-toe, each game is discrete and episodic. The game consists of a finite number of discrete states (the possible board configurations), and each episode (game) has a clear starting point (an empty board) and ending point (win, lose, or draw).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:decimal;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;1&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Continuous and Episodic:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-bottom:0; margin-top:0; padding-inline-start:48px&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;2&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Example: Skiing down a mountain.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;2&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Explanation: Skiing down a mountain can be considered a continuous and episodic task. Each skiing session is an episode, with a clear starting point (the top of the mountain) and ending point (reaching the bottom or stopping at a certain point). The action space (movements on the slopes) is continuous, as there are infinite possible movements and trajectories.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:decimal;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;1&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Continuous, Non-Deterministic, and Non-Episodic:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-bottom:0; margin-top:0; padding-inline-start:48px&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;2&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Example: Autonomous driving in a city.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;list-style-type:disc;font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;&quot; aria-level=&quot;2&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height:1.44;text-align: justify;margin-top:0pt;margin-bottom:0pt;&quot; role=&quot;presentation&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; text-decoration:none; vertical-align:baseline; white-space:pre-wrap&quot;&gt;Explanation: Autonomous driving in a city can be a continuous, non-deterministic, and non-episodic task. The environment is continuous because the car&#039;s movement and surroundings form a continuous space (e.g., streets, traffic flow). It&#039;s non-deterministic because external factors such as weather conditions, road conditions, and the behavior of other drivers introduce uncertainty into the system. It&#039;s non-episodic because there&#039;s no clear division between episodes – the driving task continues indefinitely without clear start or end points, especially in urban environments with continuous traffic flow.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/605/give-an-example-of-a-task-environment-that-is?show=970#a970</guid>
<pubDate>Sat, 04 May 2024 22:49:19 +0000</pubDate>
</item>
<item>
<title>Answered: A* algorithm for fruit sorting</title>
<link>https://notexponential.com/794/a-algorithm-for-fruit-sorting?show=967#a967</link>
<description>By graph-representing the problem, generating a cost function and heuristic function, and creating successors to travel across the state space, the A* approach may be used to efficiently arrange a set of fruits in a 3x10 array. Using the A* method, we may reduce the number of movements required to reach the goal state, where the fruits are arranged in ascending order of size.&lt;br /&gt;
&lt;br /&gt;
This method ensures that the algorithm explores the state space wisely by taking into account both the estimated cost (heuristic) and the actual cost (moves). We can re-create the optimal path by going back and using the solution&amp;#039;s final steps to physically arrange the fruits in the desired sequence.&lt;br /&gt;
&lt;br /&gt;
Overall, the A* algorithm provides a logical and effective solution to the problem at hand, maximizing the arrangement of fruits in the array while taking constraints and allowable motions into mind.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/794/a-algorithm-for-fruit-sorting?show=967#a967</guid>
<pubDate>Fri, 22 Dec 2023 18:39:24 +0000</pubDate>
</item>
<item>
<title>Answered: 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?show=940#a940</link>
<description>In tree search, the algorithm does not keep track of visited states. It explores nodes without checking whether a similar state has been encountered before.&lt;br /&gt;
This can lead to revisiting the same state multiple times, which might result in inefficiency and redundant computations.&lt;br /&gt;
Tree search is more straightforward to implement but can be less efficient in terms of time and space.&lt;br /&gt;
&lt;br /&gt;
In graph search, the algorithm keeps track of visited states to avoid revisiting them. This is typically done using a set or some data structure to store the explored states.&lt;br /&gt;
This ensures that the algorithm does not waste time revisiting the same states, improving both time and space efficiency.&lt;br /&gt;
The additional bookkeeping for visited states makes the implementation slightly more complex than tree search.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/703/what-code-level-difference-between-graph-search-tree-search?show=940#a940</guid>
<pubDate>Thu, 14 Dec 2023 02:57:34 +0000</pubDate>
</item>
<item>
<title>Answered: 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?show=803#a803</link>
<description>&lt;p&gt;Here I have formed solution by using policy iteration approach. I am assuming it will move to the right always. Only one action per state. We are given a discount factor (γ) of 0.9 and noise of 0.8, 0.1, 0.1. The first column has terminal states with a value of -1, and the last column has terminal states with a value of 1. There are no living rewards.&lt;br&gt;&lt;br&gt;a - go to the right always, fixed policy.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;We have the following grid world:&lt;/strong&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;It can be shown as :&lt;/strong&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;A&lt;/td&gt;&lt;td&gt;B&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;C&lt;/td&gt;&lt;td&gt;D&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;E&lt;/td&gt;&lt;td&gt;F&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Policy Iteration:&lt;/p&gt;&lt;p&gt;A = 0.9* (0.8 * B + 0.1 * A + 0.1 * C)&lt;/p&gt;&lt;p&gt;B = 0.9* (0.8 * 1 + 0.1 * B + 0.1 * D )&lt;/p&gt;&lt;p&gt;C = 0.9* (0.8 * D + 0.1 * A + 0.1 * E )&lt;/p&gt;&lt;p&gt;D = 0.9* (0.8 * 1 + 0.1 * B + 0.1 * F )&lt;/p&gt;&lt;p&gt;E = 0.9* (0.8 * F + 0.1 * C + 0.1 * E )&lt;/p&gt;&lt;p&gt;F = 0.9* (0.8 * 1 + 0.1 * D + 0.1 * F )&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;--------------------------------------------------&lt;/p&gt;&lt;p&gt;A = 0.72B + 0.09A&amp;nbsp; + 0.09C&lt;/p&gt;&lt;p&gt;B = 0.72 + 0.09B + 0.09D&lt;/p&gt;&lt;p&gt;C = 0.72D + 0.09A&amp;nbsp; + 0.09E&lt;/p&gt;&lt;p&gt;D = 0.72 + 0.09B + 0.09F&lt;/p&gt;&lt;p&gt;E = 0.72F + 0.09C&amp;nbsp; + 0.09E&lt;/p&gt;&lt;p&gt;F = 0.72 + 0.09D + 0.09F&lt;/p&gt;&lt;p&gt;-------------------------------------------------&lt;/p&gt;&lt;p&gt;0.72B + 0.09A&amp;nbsp; + 0.09C - A = 0&lt;/p&gt;&lt;p&gt;0.72 + 0.09B + 0.09D - B&amp;nbsp; &amp;nbsp;= 0&lt;/p&gt;&lt;p&gt;0.72D + 0.09A&amp;nbsp; + 0.09E - C = 0&lt;/p&gt;&lt;p&gt;0.72 + 0.09B + 0.09F - D = 0&lt;/p&gt;&lt;p&gt;0.72F + 0.09C&amp;nbsp; + 0.09E - E = 0&lt;/p&gt;&lt;p&gt;0.72 + 0.09D + 0.09F - F = 0&lt;/p&gt;&lt;p&gt;------------------------------------------------&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Now we have :&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;0.72B - 0.91A&amp;nbsp; + 0.09C&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72&amp;nbsp; - 0.91B&amp;nbsp; + 0.09D&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72D + 0.09A&amp;nbsp; + 0.09E - C = 0&lt;/p&gt;&lt;p&gt;0.72 + 0.09B + 0.09F - D = 0&lt;/p&gt;&lt;p&gt;0.72F + 0.09C&amp;nbsp; - 0.91E&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72 + 0.09D&amp;nbsp; - 0.91F&amp;nbsp; &amp;nbsp;=&amp;nbsp; 0&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We can see that :&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;0.72 -&amp;nbsp; 0.91F&amp;nbsp; + 0.09D&amp;nbsp; &amp;nbsp;=&amp;nbsp; 0&lt;/p&gt;&lt;p&gt;0.72&amp;nbsp; - 0.91B&amp;nbsp; + 0.09D&amp;nbsp; &amp;nbsp;=&amp;nbsp; 0&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;It means that B = F&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;---------------------------------&lt;/p&gt;&lt;p&gt;Now we have :&amp;nbsp;&lt;/p&gt;&lt;p&gt;0.72B - 0.91A&amp;nbsp; + 0.09C&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72&amp;nbsp; - 0.91B&amp;nbsp; + 0.09D&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72D + 0.09A&amp;nbsp; + 0.09E - C = 0&lt;/p&gt;&lt;p&gt;0.72 + 0.09B + 0.09B - D = 0&lt;/p&gt;&lt;p&gt;0.72B + 0.09C&amp;nbsp; - 0.91E&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We can see that :&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;- 0.09C + 0.91E&amp;nbsp; = 0.91A&amp;nbsp; - 0.09C&lt;/p&gt;&lt;p&gt;&lt;strong&gt;It means that : A = E&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;----------------------------------&lt;/p&gt;&lt;p&gt;Now we have :&amp;nbsp;&lt;/p&gt;&lt;p&gt;0.72B - 0.91A&amp;nbsp; + 0.09C&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72&amp;nbsp; - 0.91B&amp;nbsp; + 0.09D&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72D + 0.18A&amp;nbsp; &amp;nbsp;- C = 0&lt;/p&gt;&lt;p&gt;0.72 +&amp;nbsp; 0.18B - D = 0&lt;/p&gt;&lt;p&gt;0.72B + 0.09C&amp;nbsp; - 0.91A&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We can see that&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;0.91B&amp;nbsp; - 0.09D&amp;nbsp; = -0.18B + D&lt;/p&gt;&lt;p&gt;1.09B = 1.09D&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;B = D = F&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;----------------------------------&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Now we have :&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;0.72B - 0.91A&amp;nbsp; + 0.09C&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72&amp;nbsp; - 0.91B&amp;nbsp; + 0.09D&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;0.72B + 0.18A&amp;nbsp; - C = 0&lt;/p&gt;&lt;p&gt;0.72 +&amp;nbsp; 0.18B - B = 0&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;We can see that:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;- 0.91A&amp;nbsp; + 0.09C&amp;nbsp; = 0.18A&amp;nbsp; - C&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A = C = E&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;So it can be shown as :&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;0.72B - 0.82A&amp;nbsp;&amp;nbsp;= 0&lt;/p&gt;&lt;p&gt;0.72&amp;nbsp; - 0.82B&amp;nbsp; = 0&lt;/p&gt;&lt;p&gt;--------------------------------------------------------&lt;/p&gt;&lt;p&gt;&lt;strong&gt;B = D = F = 0.72/0.82&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;≈&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;0.88&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A =&amp;nbsp; C =&amp;nbsp; E&amp;nbsp; =&amp;nbsp; ( 0.72 * B ) / 0.82 = (0.72 *&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;0.878&lt;/strong&gt;&lt;strong&gt;) /&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;0.82&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;≈&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;0.77&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;So it can be shown as :&lt;/strong&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0.77&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0.88&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0.77&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0.88&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0.77&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0.88&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;1&lt;br&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&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?show=803#a803</guid>
<pubDate>Tue, 02 May 2023 21:29:57 +0000</pubDate>
</item>
<item>
<title>Answered: 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?show=685#a685</link>
<description>for any tile, it can swap with the empty tile，and each swap counts for max(|y1-y2|,|x1-x2|) moves, and if they are in the same row or same col, this move will count for 0. every time, if the empty tile is not in the right place(the tile the empty tile should be in goal position), then swap it with the number should be in this tile in the goal position(to make this number matched). If the empty tile is in goal position, then swap it with the farthest mismatched number, do until to the goal position. And heuristic is the sum of moves.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/684/admissible-heuristic-for-puzzle-multiple-tiles-slided-once?show=685#a685</guid>
<pubDate>Tue, 07 May 2019 13:24:05 +0000</pubDate>
</item>
<item>
<title>Answered: 8 puzzle that can be solved or not?</title>
<link>https://notexponential.com/641/8-puzzle-that-can-be-solved-or-not?show=646#a646</link>
<description>I can delete some states with the potential rule in parity order.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/641/8-puzzle-that-can-be-solved-or-not?show=646#a646</guid>
<pubDate>Tue, 30 Apr 2019 23:14:59 +0000</pubDate>
</item>
<item>
<title>Answered: Is Harmonic Mean of admissible heuristics an admissible heuristic?</title>
<link>https://notexponential.com/629/harmonic-mean-admissible-heuristics-admissible-heuristic?show=636#a636</link>
<description>&lt;p&gt;Hi Professor Arora,&lt;/p&gt;&lt;p&gt;I think it is. Firstly, when we talk about Harmonic Mean, we have assumed that all heuristic functions are not equal to 0, otherwise they can&#039;t be denominators. Then, after we have this assumption, Harmonic Mean is obviously admissible.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Proof:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;For all h&lt;sub&gt;i&lt;/sub&gt; in {h&lt;sub&gt;1&lt;/sub&gt;, ... , h&lt;sub&gt;n&lt;/sub&gt;}, h&lt;sub&gt;i&lt;/sub&gt; &amp;lt;= C&lt;sup&gt;*&lt;/sup&gt;, where C&lt;sup&gt;*&lt;/sup&gt; is the fact cost (this is the definition of admissibility).&lt;/li&gt;&lt;li&gt;Since h&lt;sub&gt;i&lt;/sub&gt; &amp;lt;= C&lt;sup&gt;*&lt;/sup&gt;, we have 1 / h&lt;sub&gt;i&lt;/sub&gt; &amp;gt;= 1 / C&lt;sup&gt;*&lt;/sup&gt; for all h&lt;sub&gt;i&lt;/sub&gt; not equal to 0.&lt;/li&gt;&lt;li&gt;By 2, we get 1 / h&lt;sub&gt;1&lt;/sub&gt; + ... + 1 / h&lt;sub&gt;n&lt;/sub&gt; &amp;gt;= n / C&lt;sup&gt;*&lt;/sup&gt;.&lt;/li&gt;&lt;li&gt;Multiply C&lt;sup&gt;*&lt;/sup&gt; / (1 / h&lt;sub&gt;1&lt;/sub&gt; + ... + 1 / h&lt;sub&gt;n&lt;/sub&gt;) on both sizes, we have C&lt;sup&gt;*&lt;/sup&gt; &amp;gt;= n / (1 / h&lt;sub&gt;1&lt;/sub&gt; + ... + 1 / h&lt;sub&gt;n&lt;/sub&gt;), i.e. H &amp;lt;= C&lt;sup&gt;*&lt;/sup&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Q.E.D.&amp;nbsp;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/629/harmonic-mean-admissible-heuristics-admissible-heuristic?show=636#a636</guid>
<pubDate>Sat, 13 Apr 2019 02:41:13 +0000</pubDate>
</item>
<item>
<title>Answered: Converting ternary constraint into binary constraints</title>
<link>https://notexponential.com/616/converting-ternary-constraint-into-binary-constraints?show=617#a617</link>
<description>&lt;p&gt;We can use a new data structure.&amp;nbsp;&lt;/p&gt;&lt;p&gt;For example, make an&amp;nbsp;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;auxiliary variable&amp;nbsp;&lt;/span&gt;t = [x, z-x].&lt;/p&gt;&lt;p&gt;t.1 = x&lt;/p&gt;&lt;p&gt;t.2 = y&lt;/p&gt;&lt;p&gt;sum(t) = z&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/616/converting-ternary-constraint-into-binary-constraints?show=617#a617</guid>
<pubDate>Sat, 09 Feb 2019 16:36:43 +0000</pubDate>
</item>
<item>
<title>Answered: Manhattan Distances, but Linear Interference...</title>
<link>https://notexponential.com/614/manhattan-distances-but-linear-interference?show=615#a615</link>
<description>For every liner conflict, it will take at least 2 more moves, like choose one of them to move down and up. We can add 2 for heuristic as some kinds of penalty. &lt;br /&gt;
&lt;br /&gt;
There seems to be a lot of good solutions to this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://idm-lab.org/bib/abstracts/papers/aaai07b.pdf&quot; rel=&quot;nofollow&quot;&gt;http://idm-lab.org/bib/abstracts/papers/aaai07b.pdf&lt;/a&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/614/manhattan-distances-but-linear-interference?show=615#a615</guid>
<pubDate>Wed, 06 Feb 2019 17:47:04 +0000</pubDate>
</item>
<item>
<title>Answered: 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?show=541#a541</link>
<description>&lt;p&gt;The complete means&amp;nbsp;&lt;span style=&quot;color:#545454; font-family:Roboto,arial,sans-serif; font-size:small&quot;&gt;the algorithm&amp;nbsp;addresses all possible inputs, optimal means algorithm will return the best solution, optimally efficient means no other methods will cost less.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#545454; font-family:Roboto,arial,sans-serif; font-size:small&quot;&gt;A* is complete because heuristic&amp;nbsp;is always less than the real and finally it will lead to the optimal solution. The prove is same with why A* is optimal.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#545454; font-family:Roboto,arial,sans-serif; font-size:small&quot;&gt;A* is optimal g(n)+h(n)&amp;lt;= real cost, g(final)+h(0)=final cost, so the algorithm will travel some&amp;nbsp;possible nodes which costs less than real final cost. But the final solution must be optimal.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#545454; font-family:Roboto,arial,sans-serif; font-size:small&quot;&gt;A* is optimally efficient: if we design h, method doesn&#039;t matter.&lt;/span&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/540/informed-difference-complete-optimally-efficient-algorithm?show=541#a541</guid>
<pubDate>Tue, 20 Mar 2018 03:48:56 +0000</pubDate>
</item>
<item>
<title>Answered: N-Queens Count all conflicts in O(n) time</title>
<link>https://notexponential.com/495/n-queens-count-all-conflicts-in-o-n-time?show=496#a496</link>
<description>We can count line by line to determine how many queens in a line.&lt;br /&gt;
&lt;br /&gt;
For example, we take the horizontal direction as row by row from top to bottom.&lt;br /&gt;
&lt;br /&gt;
In each row, we count how many queens in this row and get the number of conflicts= ((number of queens-1)+1)*(number of queens-1)/2.&lt;br /&gt;
&lt;br /&gt;
There are almost n line in each direction and there is 4 direction.&lt;br /&gt;
&lt;br /&gt;
So cost=4*n=O(n).</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/495/n-queens-count-all-conflicts-in-o-n-time?show=496#a496</guid>
<pubDate>Sat, 03 Mar 2018 03:13:26 +0000</pubDate>
</item>
</channel>
</rss>