<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Smart Home on Xiaowei Liu</title><link>https://xwliu.com/tags/smart-home/</link><description>Recent content in Smart Home on Xiaowei Liu</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 01 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://xwliu.com/tags/smart-home/index.xml" rel="self" type="application/rss+xml"/><item><title>Why This Schedule? Contrastive Explanations for Smart-Home Planning</title><link>https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/</link><pubDate>Thu, 01 Oct 2026 00:00:00 +0000</pubDate><guid>https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/</guid><description>&lt;p&gt;People rarely ask &lt;em&gt;&amp;ldquo;why P?&amp;rdquo;&lt;/em&gt; in isolation; they ask &lt;em&gt;&amp;ldquo;why P rather than Q?&amp;rdquo;&lt;/em&gt; Miller argued that such &lt;strong&gt;contrastive&lt;/strong&gt; questions lie at the heart of human explanation. We tested this idea on &lt;strong&gt;Cuttlefish&lt;/strong&gt;, an end-user planning application that schedules a home battery and appliances under a dynamic energy tariff.&lt;/p&gt;&#10;&lt;h2 id="the-problem"&gt;The problem&#10;&lt;/h2&gt;&lt;p&gt;&lt;img alt="A future smart home with high-capacity battery and smart appliances." class="gallery-image" data-flex-basis="320px" data-flex-grow="133" height="1125" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/Illustration_Smart_Home.jpg" srcset="https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/Illustration_Smart_Home_hu_969c1d29656018.jpg 800w, https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/Illustration_Smart_Home.jpg 1500w" width="1500"&gt;&lt;/p&gt;&#10;&lt;p&gt;Cuttlefish recommends a one-week, hourly schedule for a battery and four appliances (washer, dryer, dishwasher and electric vehicle) that satisfies user requirements while minimising cost under a dynamic tariff, such as Octopus Agile in the UK. We formalise this as a &lt;strong&gt;non-stationary finite-horizon planning problem&lt;/strong&gt;, in which actions, transitions and costs vary with the timestep. Because the battery and appliances share one energy bill, the cost of a joint plan makes this a &lt;strong&gt;multi-effector&lt;/strong&gt; problem.&lt;/p&gt;&#10;&lt;p&gt;Off-the-shelf PDDL planners cannot handle these features: few support timed initial fluents, and none support costs that depend on the affected state variables. We therefore built a &lt;strong&gt;domain-dependent A* planner&lt;/strong&gt; in Rust, served through a web interface.&lt;/p&gt;&#10;&lt;h2 id="contrastive-questions-as-model-restrictions"&gt;Contrastive questions as model restrictions&#10;&lt;/h2&gt;&lt;p&gt;Following &lt;a class="link" href="https://www.jair.org/index.php/jair/article/view/12813" target="_blank" rel="noopener"&#10; &gt;Krarup et al. (2021)&lt;/a&gt;, a contrastive question restricts the planning model. In Cuttlefish, a user adds appliance requirements $\Phi&amp;rsquo;$ (e.g., &amp;ldquo;run the dishwasher only after 20:00&amp;rdquo;), producing a restricted model $\Pi&amp;rsquo;$ whose plans are also plans of $\Pi$. The explanation is the pair $\langle \pi, \pi&amp;rsquo; \rangle$: the original and alternative schedules shown side by side, together with their cost difference:&lt;/p&gt;&#10;&#10; &lt;blockquote&gt;&#10; &lt;p&gt;&amp;ldquo;Your total bill increases by C(π′) − C(π) pence.&amp;rdquo;&lt;/p&gt;&#10;&#10; &lt;/blockquote&gt;&#10;&lt;h2 id="the-study"&gt;The study&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;128 lay participants&lt;/strong&gt; recruited via Prolific and randomly assigned to a treatment or a control group. Control group (CG) viewed the recommended schedule only. Treatment group (TG) could also ask contrastive questions (at least five per scenario).&lt;/li&gt;&#10;&lt;li&gt;Two personas with different scheduling demands: &lt;strong&gt;Alice&lt;/strong&gt;, an office worker, and &lt;strong&gt;Bob&lt;/strong&gt;, a night-shift worker with tighter time windows. Imagine, for instance, that you cannot run the washer at night without disturbing the neighbours.&lt;/li&gt;&#10;&lt;li&gt;Responses were collected on 7-point Likert scales and compared using one-tailed Welch&amp;rsquo;s t-tests.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="key-findings"&gt;Key findings&#10;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;1. Explanations significantly increase satisfaction in both scenarios.&lt;/strong&gt; Participants in the TG reported higher satisfaction with the recommended schedule for both Alice (p = .033) and Bob (p = .010).&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="Satisfaction by smart-home background on a 7-point Likert scale." class="gallery-image" data-flex-basis="756px" data-flex-grow="315" height="352" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/Background_satisfaction_smarthome.jpg" srcset="https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/Background_satisfaction_smarthome_hu_e78e498617b08054.jpg 800w, https://xwliu.com/p/why-this-schedule-contrastive-explanations-for-smart-home-planning/Background_satisfaction_smarthome.jpg 1110w" width="1110"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;2. Understanding and helpfulness trend upward.&lt;/strong&gt; TG means are higher on every measure, but only satisfaction is significant in both scenarios. Scores are lower for Bob, consistent with his more complex requirements.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Measure&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Scenario&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;TG&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;CG&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;p&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Satisfied?&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Alice&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.72&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.34&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;.033&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Satisfied?&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bob&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.63&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.02&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;.010&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Helpful?&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Alice&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.94&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.57&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;.029&lt;/strong&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Helpful?&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bob&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.58&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.20&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;.076&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Understood?&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Alice&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.58&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.22&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;.055&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Understood?&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bob&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.33&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5.08&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;.169&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;&lt;strong&gt;3. Background matters, but only with explanations.&lt;/strong&gt; Within the TG, participants with a STEM background rated the system higher (summated score 35.5 vs 32.4, p = .016). Smart-home experience had no significant effect.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;4. Comprehension shifts from doubt to detail with explanation.&lt;/strong&gt; CG participants often questioned individual tasks or claimed that cheaper schedules existed. TG participants more readily accepted the schedule&amp;rsquo;s optimality; their remaining concerns were mostly about details such as &lt;strong&gt;washer–dryer dependencies&lt;/strong&gt;, which the model deliberately omitted for simplicity.&lt;/p&gt;&#10;&lt;h2 id="takeaways"&gt;Takeaways&#10;&lt;/h2&gt;&lt;p&gt;Contrastive explanations formulated as model restrictions are a practical, interactive XAI mechanism for lay users of planning systems. Their benefit, however, comes from lessons of classic UX design: responsiveness, question forms that match user intent, and domain features users expect.&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Based on &amp;ldquo;A User Study on Contrastive Explanations for Multi-Effector Temporal Planning with Non-Stationary Costs&amp;rdquo; (ICTAI 2024), with Kevin McAreavey and Weiru Liu, and its extended version in my MScR thesis. Written with the help of our dear friend Claude.&lt;/em&gt;&lt;/p&gt;&#10;</description></item></channel></rss>