<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Emin Mulaimović, Author at ShiftMag</title>
	<atom:link href="https://shiftmag.dev/author/emin-mulaimovic/feed/" rel="self" type="application/rss+xml" />
	<link>https://shiftmag.dev/author/emin-mulaimovic/</link>
	<description>Insightful engineering content &#38; community</description>
	<lastBuildDate>Tue, 07 Oct 2025 14:07:32 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://shiftmag.dev/wp-content/uploads/2024/08/cropped-ShiftMag-favicon-32x32.png</url>
	<title>Emin Mulaimović, Author at ShiftMag</title>
	<link>https://shiftmag.dev/author/emin-mulaimovic/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How &#8216;Guess Who?&#8217; Logic Shapes AI Decision Trees and Predictive ML</title>
		<link>https://shiftmag.dev/how-guess-who-logic-shapes-ai-decision-trees-and-predictive-ml-5874/</link>
		
		<dc:creator><![CDATA[Emin Mulaimović]]></dc:creator>
		<pubDate>Tue, 07 Oct 2025 14:06:40 +0000</pubDate>
				<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[Machine Learning]]></category>
		<guid isPermaLink="false">https://shiftmag.dev/?p=5874</guid>

					<description><![CDATA[<p>The logic behind a simple game of 'Guess Who?' is identical to how we code one of the most transparent AI algorithms. In Decision Trees, we don’t guess - we ask the question that gives the most information, and mastering that intuition teaches the core of predictive Machine Learning</p>
<p>The post <a href="https://shiftmag.dev/how-guess-who-logic-shapes-ai-decision-trees-and-predictive-ml-5874/">How &#8216;Guess Who?&#8217; Logic Shapes AI Decision Trees and Predictive ML</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>Guess Who?</em> might seem like a nostalgic board game full of quirky characters and clever yes-or-no questions. Yet beneath its playful surface lies a robust logical structure that <strong>reflects the decision-making processes of modern AI</strong>.</p>



<p class="wp-block-paragraph">In <em>Guess Who?</em>, players start with 24 possibilities. They ask a series of questions designed to eliminate as many options as possible with each answer, narrowing the field until only one character remains. This mirrors the core principle of decision trees in AI: <strong>strategically asking questions to split data into smaller, more organized groups</strong>, quickly reducing uncertainty.</p>



<p class="wp-block-paragraph">Just as a player might ask whether the character wears glasses or has blonde hair, an AI model might ask whether a patient’s blood pressure is high or whether a customer opened a previous email. </p>



<p class="wp-block-paragraph">Both processes aim to identify <strong>the most informative question at each step</strong>, resulting in an accurate decision with the fewest possible moves.</p>



<h2 class="wp-block-heading"><span id="what-makes-a-good-question">What makes a good question?</span></h2>



<p class="wp-block-paragraph">We want to gather as much information as possible when we ask a question. Ideally, each yes or no question cuts our choices in half.</p>



<p class="wp-block-paragraph">Since there are 24 characters, if we assume that each question eliminates half the characters, we will need 5 questions to determine who the opponent chose. This is because:</p>



<p class="wp-block-paragraph"><strong>24=16&lt;24&lt;25=322^4 = 16 &lt; 24 &lt; 2^5 = 32</strong><br><br>Using the same logic, we can see that<a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC5764584/" target="_blank" rel="noreferrer noopener"> 26,000 diseases can be diagnosed with just 15 questions</a>, since 215=32,7682^{15} = 32,768. Of course, this only works if perfectly balanced questions exist, which is rarely the case.</p>


<figure class="wp-block-post-featured-image"><img fetchpriority="high" decoding="async" width="1200" height="720" src="https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1.png?x32039" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" style="object-fit:cover;" srcset="https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1.png 1200w, https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1-768x461.png 768w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>


<h2 class="wp-block-heading">First questions in &#8216;Guess Who?&#8217;</h2>



<p class="wp-block-paragraph">Here are some typical questions and how many characters they eliminate:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<figure class="wp-block-image size-large"><img decoding="async" width="913" height="1024" src="https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.07.19-913x1024.png?x32039" alt="" class="wp-image-5882" srcset="https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.07.19-913x1024.png 913w, https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.07.19-267x300.png 267w, https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.07.19-768x861.png 768w, https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.07.19.png 1152w" sizes="(max-width: 913px) 100vw, 913px" /></figure>
</div></div>



<p class="wp-block-paragraph">Most of these splits are unbalanced. But if we combine conditions, we can do better.</p>



<h2 class="wp-block-heading"><span id="combining-questions-for-better-splits">Combining questions for better splits</span></h2>



<p class="wp-block-paragraph">For example, asking: </p>



<p class="wp-block-paragraph"><strong>&#8220;Does your character have black, brown, or orange hair?</strong>&#8220;</p>



<ul class="wp-block-list">
<li>Yes: 13 characters<br></li>



<li>No: 11 characters</li>
</ul>



<p class="wp-block-paragraph">This is much closer to an ideal 50/50 split. We could even create a perfect 12/12 split with a bizarre question like &#8220;Does your character have black, brown, or orange hair and is not a female with a hat?&#8221;. But that’s essentially the same as the previous one, just moving Maria (the only female with a hat) to the other group.</p>



<p class="wp-block-paragraph">Now, if the answer is <strong>yes</strong>, the remaining characters are:</p>



<p class="wp-block-paragraph">Alex, Alfred, Anne, Bernand, Bill, Frans, Herman, Maria, Max, Phillip, Richard, Robert, Tom</p>



<h2 class="wp-block-heading"><span id="narrowing-it-down-further">Narrowing it down further</span></h2>



<p class="wp-block-paragraph">On this reduced set of 13, the next possible splits are:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="973" height="1024" src="https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.09.49-973x1024.png?x32039" alt="" class="wp-image-5884" srcset="https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.09.49-973x1024.png 973w, https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.09.49-285x300.png 285w, https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.09.49-768x809.png 768w, https://shiftmag.dev/wp-content/uploads/2025/08/Screenshot-2025-08-20-at-13.09.49.png 1362w" sizes="(max-width: 973px) 100vw, 973px" /></figure>



<p class="wp-block-paragraph">Now we have questions that split characters the best they can like &#8220;Does your character have facial hair?&#8221; or &#8220;Is your character blond?&#8221;. We will use &#8220;Does your character have facial hair?&#8221; and continue this process. We can then arrive at this diagram bellow:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="614" src="https://shiftmag.dev/wp-content/uploads/2025/08/20-1024x614.png?x32039" alt="" class="wp-image-5932" srcset="https://shiftmag.dev/wp-content/uploads/2025/08/20-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/08/20-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2025/08/20-768x461.png 768w, https://shiftmag.dev/wp-content/uploads/2025/08/20.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">The technique we used to create this diagram can be generalized with a real-world example where we want to create an AI model to prescribe medicine. We will use <a href="https://sharathmanjunath.medium.com/decision-tree-8c33a0c17744" target="_blank" rel="noreferrer noopener">this simple dataset</a>.</p>



<h2 class="wp-block-heading"><span id="decision-trees-in-the-real-world"><strong>Decision Trees in the Real World</strong></span></h2>



<p class="wp-block-paragraph">The technique we used to create the <em>Guess Who?</em> diagram can be generalized with a real-world example where we want to create an <strong>AI model to prescribe medicine</strong>.</p>



<p class="wp-block-paragraph">We’ll use a simple dataset with 14 patients. Each has characteristics like age, gender, blood pressure, and cholesterol. A real dataset would be much larger, but this toy example illustrates the point.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="424" height="256" src="https://shiftmag.dev/wp-content/uploads/2025/08/perscription.png?x32039" alt="" class="wp-image-5876" style="width:840px;height:auto" srcset="https://shiftmag.dev/wp-content/uploads/2025/08/perscription.png 424w, https://shiftmag.dev/wp-content/uploads/2025/08/perscription-300x181.png 300w" sizes="auto, (max-width: 424px) 100vw, 424px" /></figure>



<p class="wp-block-paragraph">For instance, asking <strong>&#8220;What is the age of the patient?</strong>&#8221; gives us three groups:</p>



<ul class="wp-block-list">
<li>Young: 3 prescribed Drug A, 1 prescribed Drug B<br></li>



<li>Middle-aged: all prescribed Drug B<br></li>



<li>Senior: 3 prescribed Drug A, 2 prescribed Drug B<br></li>
</ul>



<p class="wp-block-paragraph">Other possible questions include:</p>



<ul class="wp-block-list">
<li>What is the gender of the patient?<br></li>



<li>What is the blood pressure of the patient?<br></li>



<li>What is the cholesterol of the patient?</li>
</ul>



<h2 class="wp-block-heading"><span id="entropy-in-action">Entropy in action</span></h2>



<p class="wp-block-paragraph">To determine the <em>best</em> question, we measure <strong>entropy</strong> &#8211; the amount of disorder in the data.</p>



<ul class="wp-block-list">
<li>High entropy = outcomes are evenly mixed (e.g., 5 patients with Drug A, 5 with Drug B)<br></li>



<li>Low entropy = outcomes are mostly one-sided (e.g., 9 patients with Drug A, 1 with Drug B)<br></li>
</ul>



<p class="wp-block-paragraph">When we ask &#8220;What is the age of the patient?&#8221;:</p>



<ul class="wp-block-list">
<li>Young group → medium entropy<br></li>



<li>Middle-aged group → low entropy (always Drug B)<br></li>



<li>Senior group → high entropy (mixed outcome)<br></li>
</ul>



<p class="wp-block-paragraph">By calculating <strong>information gain</strong>, we can rank each possible question and pick the one that reduces uncertainty the most. This is exactly what decision tree algorithms do.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1011" height="749" src="https://shiftmag.dev/wp-content/uploads/2025/08/1.png?x32039" alt="" class="wp-image-5890" srcset="https://shiftmag.dev/wp-content/uploads/2025/08/1.png 1011w, https://shiftmag.dev/wp-content/uploads/2025/08/1-300x222.png 300w, https://shiftmag.dev/wp-content/uploads/2025/08/1-768x569.png 768w" sizes="auto, (max-width: 1011px) 100vw, 1011px" /></figure>



<h2 class="wp-block-heading"><span id="decision-trees-in-ai-and-machine-learning">Decision trees in AI and Machine Learning</span></h2>



<p class="wp-block-paragraph">This process is called <strong>building a</strong> <strong>decision tree</strong>. Decision trees are widely used in machine learning for classification and prediction problems.</p>



<p class="wp-block-paragraph">In practice, companies like Infobip use ensembles of decision trees to <strong>predict outcomes</strong> &#8211; for example, the best time to send a message. These ensembles combine many decision trees for higher accuracy.</p>



<p class="wp-block-paragraph">Some of the most popular ensemble methods include:</p>



<ul class="wp-block-list">
<li><strong>RandomForest</strong><strong><br></strong></li>



<li><strong>XGBoost</strong><strong><br></strong></li>



<li><strong>CatBoost</strong><strong><br></strong></li>



<li><strong>HistBoost</strong><strong><br></strong></li>
</ul>



<p class="wp-block-paragraph">They work extremely well and require relatively little tuning compared to deep learning models.</p>



<h2 class="wp-block-heading"><span id="smarter-questions-lead-to-smarter-decisions">Smarter questions lead to smarter decisions</span></h2>



<p class="wp-block-paragraph">Whether you’re playing <em>Guess Who?</em>, diagnosing diseases, or building an AI system, the principle is the same: <strong>ask the right questions to reduce uncertainty as efficiently as possible</strong>.</p>



<p class="wp-block-paragraph">Decision trees make this systematic. They balance the dataset, calculate information gain, and split the problem space step by step until the answer becomes clear.</p>



<p class="wp-block-paragraph">From childhood board games to cutting-edge AI, the lesson is timeless: the smartest path forward begins with the right question.</p>


<figure class="wp-block-post-featured-image"><img fetchpriority="high" decoding="async" width="1200" height="720" src="https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1.png?x32039" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" style="object-fit:cover;" srcset="https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1.png 1200w, https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1-300x180.png 300w, https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1-1024x614.png 1024w, https://shiftmag.dev/wp-content/uploads/2025/10/1.1.1.1-768x461.png 768w" sizes="(max-width: 1200px) 100vw, 1200px" /></figure>


<p class="wp-block-paragraph"></p>
<p>The post <a href="https://shiftmag.dev/how-guess-who-logic-shapes-ai-decision-trees-and-predictive-ml-5874/">How &#8216;Guess Who?&#8217; Logic Shapes AI Decision Trees and Predictive ML</a> appeared first on <a href="https://shiftmag.dev">ShiftMag</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: shiftmag.dev @ 2026-09-17 08:30:07 by W3 Total Cache
-->