<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Muneeb Ul Hassan on Medium]]></title>
        <description><![CDATA[Stories by Muneeb Ul Hassan on Medium]]></description>
        <link>https://medium.com/@muneebable?source=rss-1f2ee7876bbc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ehWmIAayi5OaIwh58D0tkA.png</url>
            <title>Stories by Muneeb Ul Hassan on Medium</title>
            <link>https://medium.com/@muneebable?source=rss-1f2ee7876bbc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:46:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muneebable/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Demystifying World Models: How to Train a Simple Atari Agent]]></title>
            <link>https://muneebable.medium.com/demystifying-world-models-how-to-train-a-simple-atari-agent-7da4e0d31baf?source=rss-1f2ee7876bbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7da4e0d31baf</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Muneeb Ul Hassan]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 15:58:59 GMT</pubDate>
            <atom:updated>2026-10-16T15:58:59.302Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Have you ever wondered how AI can learn to “dream” about a video game and use those dreams to master it? Let’s break down the magic of World Models and train one on an Atari game, keeping things incredibly simple.</em></p><p>When humans play a video game, we don’t just blindly react to the pixels on the screen. We build a mental model of the game’s physics, rules, and environment. We can literally close our eyes and imagine what will happen if our character jumps, shoots, or ducks.</p><p>In Artificial Intelligence, teaching an agent to build this kind of predictive mental simulation is called training a <strong>World Model</strong>. While state-of-the-art models (like DreamerV2 or MuZero) are incredibly powerful, they are also mathematically complex and require massive computing power.</p><p>But what if you just want to learn the basics?</p><p>If you are looking to get your hands dirty without needing a supercomputer, a great place to start is the <a href="https://github.com/muneebable/atari-world-model">muneebable/atari-world-model</a> repository. It focuses on taking the heavy, complex architectures of modern RL and distilling them into a lightweight, easy-to-understand codebase.</p><p>In this article, we will explore the core concepts behind this repository and walk through how to train a simple Atari world model step-by-step.</p><h3>The Architecture: 3 Simple Pieces</h3><p>To keep things simple, a basic World Model (inspired by David Ha and Jürgen Schmidhuber’s foundational paper) is broken down into three distinct neural networks. Think of them as the agent’s <strong>Eyes</strong>, <strong>Memory</strong>, and <strong>Reflexes</strong>.</p><h4>1. The Vision Model (V) — The Eyes</h4><p>An Atari screen has thousands of pixels. Processing that raw image every single millisecond is slow. The Vision Model is usually a <strong>Variational Autoencoder (VAE)</strong>. Its only job is to look at a raw game frame and compress it into a tiny, dense mathematical array called a <em>latent vector</em>. It filters out the useless noise and keeps only the essential information (like where the player and the enemies are).</p><h4>2. The Memory Model (M) — The Brain/Memory</h4><p>The Memory Model is a <strong>Recurrent Neural Network (RNN)</strong> or an LSTM. It takes the compressed “vision” vectors from the VAE, looks at the action the agent just took, and tries to predict what the <em>next</em> compressed vision vector will be. Because it predicts the future, this model is effectively learning the “physics” and rules of the Atari game.</p><h4>3. The Controller © — The Reflexes</h4><p>The Controller is the simplest part. It is a tiny, lightweight neural network that takes what the Vision Model is seeing right now, combines it with what the Memory Model remembers about the past, and decides which button to press (Up, Down, Jump, etc.).</p><h3>How to Train It: A Step-by-Step Guide</h3><p>The beauty of the simple World Model approach is that you don’t have to train everything at once. You train them one by one. Here is how you do it using a simplified pipeline:</p><h4>Step 1: Collect Random Dreams (Data Gathering)</h4><p>Before the AI can learn the game, it needs to see the game. You start by letting a completely random agent play the Atari game (like <em>Pong</em> or <em>Breakout</em>) for a few thousand episodes. The agent will play terribly, but that’s okay! We simply record the screens and the random actions it took. We save this massive dataset of frames to our hard drive.</p><h4>Step 2: Train the Vision Model (V)</h4><p>Now, we take all those recorded images and feed them into our VAE. We train the VAE to compress the image down to a small vector, and then decompress it back into the original image. Once the VAE can successfully reconstruct the Atari frames, we freeze its weights. Our agent now knows how to “see.”</p><h4>Step 3: Train the Memory Model (M)</h4><p>Next, we pass our entire dataset of recorded images through our trained Vision model to convert them into compressed vectors. We then train our RNN. We say: <em>“Here is the current compressed frame, and here is the action I pressed. Predict the next compressed frame.”</em> Once the RNN gets good at predicting the future, it has successfully learned the rules of the Atari game.</p><h4>Step 4: Train the Controller inside the “Dream”</h4><p>Here is where the magic happens. Because our Memory Model (RNN) can predict the future based on actions, <strong>we no longer need the actual Atari emulator.</strong> We can detach our AI from the real game entirely.</p><p>We connect the Controller to the Memory Model. The Controller makes a move, the Memory Model hallucinates what the next frame will look like, and passes that hallucination back to the Controller. The agent learns to play the game entirely inside its own “dreams.” Because the dream is just a tiny mathematical simulation (not a heavy graphical emulator), the Controller can train millions of times faster than it could in real life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*LKum6sbsvb4e8unbxyrI-Q.gif" /><figcaption>Dynamics Counterfactual</figcaption></figure><h3>Why this approach matters</h3><p>The traditional way of training Reinforcement Learning agents requires the AI to stumble around in the actual game for millions of frames, updating a massive network all at once. It is slow, unstable, and hard to debug.</p><p>By using a decoupled approach like the one highlighted in <a href="https://github.com/muneebable/atari-world-model">muneebable/atari-world-model</a>, we break the problem down:</p><ol><li><strong>Learn to see.</strong></li><li><strong>Learn the physics.</strong></li><li><strong>Learn to win.</strong></li></ol><p>If you are a student, researcher, or hobbyist trying to get into Model-Based Reinforcement Learning, don’t start with the most complex papers. Start simple. Clone a lightweight repository, pick a simple Atari game like <em>Pong</em>, and watch your AI learn to dream.</p><p><em>Happy coding! If you found this guide helpful, check out the </em><a href="https://github.com/muneebable/atari-world-model"><em>GitHub repository</em></a><em> to dive into the code and start training your own dreaming AI today.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7da4e0d31baf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swarm Intelligence]]></title>
            <link>https://muneebable.medium.com/swarm-intelligence-bb1d2a83a6b5?source=rss-1f2ee7876bbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb1d2a83a6b5</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[swarm-intelligence]]></category>
            <category><![CDATA[birds]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Muneeb Ul Hassan]]></dc:creator>
            <pubDate>Tue, 24 Jan 2017 14:30:39 GMT</pubDate>
            <atom:updated>2017-01-24T14:30:39.404Z</atom:updated>
            <content:encoded><![CDATA[<p>Swarm intelligence is a branch of artificial intelligence. It is the collective behavior of system. In this type of system, there is not a single entity but group of entities work together to perform some task intelligently and exhibits intelligent behavior. The term swarm intelligence is coined by Gerardo Beni in 1989. To understand the concept of swarm intelligence, we take an example from nature. The flock of birds always move in certain shape; they do not move in messy way. There is a reason for that they move in that way because if one of the bird(agent) saw food on the ground, it can pass the information to all the other birds(agents) and then they all can move in that direction. These flock of bird are interacting with each other and they are so tightly connected that they think as one. It’s not only birds that exhibits this behavior but wild animals also move in the form of herds, fishes also move in formation and ant colonies.</p><p>Swarm intelligence is exhibits the same behavior as birds, fishes or animals. In swarm intelligence, single entity called an agent and if single agent can’t be able to do some tasks, they inform the other agents and these agents collectively perform the task. In this system, there is no centralized system to control all the agents but every agent interacts with each other and the environment. It is mostly used in multi robot system and computer program mostly to solve optimization problem.</p><p>There is one classic experiment conducted in 1990 in which <em>Deneubourg </em>showed that, when given two different paths to ants in which one is short and one is relatively long path toward food. The ants choose the relatively short path as they move from source to destination and vice versa.</p><p>There are many applications of swarm intelligence e.g. ant colony optimization, particle swarm optimization, swarm based network management etc. Ant colony optimization is a technique for solving the problem of finding the good path in graph. Here, good path means the path which is short and took less amount time to go from source to destination and vice versa. It can be used to solve travelling salesman problem and in the previous years, it produces near optimal solution of travelling salesman problem. It can also be used to solve vehicle routing problems.</p><p>Particle swarm optimization is another population based optimization technique in which each agent keep track of its best fir progress it achieved so far. It optimizes a problem and trying to iteratively improve the solution or in other words it iteratively trying to find the global minimum. Particle swarm intelligence simulates the behavior of flock of birds.</p><p>There are still many unknown areas in PSO research such as the mathematical validation of particle swarm theory.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb1d2a83a6b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In general terms we can say that data science is the extraction of useful information from massive…]]></title>
            <link>https://muneebable.medium.com/in-general-terms-we-can-say-that-data-science-is-the-extraction-of-useful-information-from-massive-7e389fc6fe09?source=rss-1f2ee7876bbc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e389fc6fe09</guid>
            <dc:creator><![CDATA[Muneeb Ul Hassan]]></dc:creator>
            <pubDate>Wed, 20 May 2015 19:09:54 GMT</pubDate>
            <atom:updated>2015-05-20T19:09:54.072Z</atom:updated>
            <content:encoded><![CDATA[<p>In general terms we can say that data science is the extraction of useful information from massive amount of data, but this field is still in debate that does it deal with only big data and how it is different from analytics and statistics. Data science is the combination of multiple field’s i.e. mathematics, statistics and computer science. The data science growing very rapidly. Data science is the branch of artificial intelligence as it used predictive models to predict future, and it also involves automated methods to analyze massive amount of data to extract knowledge from them and present something useful to non-data experts. We can now find patterns and regularities in data which helps us to improve our human condition, social and economic value.</p><p>The leading IT company EMC quoted that “In 2020 world will generate 50 times the amount of data than in 2011.” At each second we generate data by using cellular phones, social media, internet of things etc. So, as the data is growing rapidly the demand for data scientist also growing.</p><p><strong>This hot new field promises to revolutionize industries from business to government, health care to academia.</strong></p><p>— <em>The New York Times</em></p><p>Data is big business, with companies like Google, Facebook and LinkedIn — and possibly every other corporate body you’ve heard of — creating huge profits out of the way they use data. This is the ‘big data’ everyone’s talking about — the 2.5 quintillion bytes of information created every day from our internet searches, purchases, mobile phone calls and social networking. (If you’re interested, a quintillion is 1,000 times a quadrillion, which is 1,000 times a trillion, which is 1,000 times a billion).</p><p>Everybody loves a data scientist: ever since <em>Google’s Hal Varian</em> told the world that</p><p><strong><em>The sexy job in the next ten years will be statisticians. People think I’m joking, but who would’ve guessed that computer engineers would’ve been the sexy job of the 1990s?</em></strong></p><p>Data Science is more than just statistics, it’s the thing that encapsulate some programming skills, some statistical readiness, some visualization technique and a lot of business senses. It involves the use of various tools of data cleaning, structuring, querying, analyzing and visualization.</p><p>A data scientist is a rare hybrid, a computer scientist with the programming abilities to build software to scrape, combine, and manage data from a variety of sources and a statistician who knows how to derive insights from the information within. S/he combines the skills to create new prototypes with the creativity and thoroughness to ask and answer the deepest questions about the data and what secrets it holds.</p><p><em>Jeremy Howard, President &amp; Chief Scientist, Kaggle</em></p><p><strong><em>The four qualities of a great data scientist are creativity, tenacity, curiosity, and deep technical skills. They use skills in data gathering and data munging, visualization, machine learning, and computer programming to make data driven decisions and data driven products. They prefer to let the data do the talking.</em></strong></p><p>Data science is the emerging field of the decade and more and more individuals are required as the time passes. As there are more jobs than the people of this domain.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e389fc6fe09" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>