Computer Science
Beginner
200 mins
Teacher/Student led
What you need:
Chromebook/Laptop/PC

Identifying a Problem and Initial Modelling

In this lesson, you'll explore modelling and simulation by identifying a real-world problem to simulate. Learn about abstraction and agent-based modelling, break down issues systematically, sketch initial plans, and consider ethical aspects while collaborating in teams.
Learning Goals Learning Outcomes Teacher Notes

Teacher Class Feed

Load previous activity

    1 - Introduction

    In this lesson, you'll start to look at modelling and simulation by identifying a real-world problem suitable for simulation.

    You'll learn about abstraction and agent-based modelling, break down problems step-by-step, plan your model with sketches, and consider ethical aspects.

    By the end, you'll have an initial model plan, ready for algorithm development. Remember, you'll work in teams, assigning roles to collaborate effectively.

    2 - Brainstorm

    Begin by selecting a problem that can be modelled and simulated, such as traffic flow in a city, the spread of a rumour in a school, animal population dynamics in an ecosystem, or the impact of climate change on a forest. The problem should allow for testing different scenarios and observing emergent behaviours, like how individual actions lead to group patterns, such as traffic jams forming from simple driving rules or population booms from predator-prey interactions.

    Guided Steps:

    1. Brainstorm 3-5 ideas with your team, focusing on real-world issues that involve interactions, such as environmental changes, social dynamics, or economic systems. Consider problems where small changes can lead to big effects, making them ideal for simulation.
    2. Ensure it's feasible: Can you abstract key elements (like agents and rules) and simulate them computationally without needing overly complex data?
    3. Check relevance: Link it to abstraction by simplifying complex systems into manageable parts, ensuring the model captures essential behaviours while ignoring minor details.
    Discuss and choose one problem. Write a short description of it (100-200 words), explaining why it's suitable for modelling, including potential scenarios to test and expected emergent behaviours.

    3 - Understanding Abstraction

    Abstraction is a key concept in computational thinking that involves simplifying a complex system by focusing on the essential features while ignoring unnecessary details. This makes it easier to model and simulate real-world problems without getting overwhelmed by complexity. For example, in modelling traffic flow, you might abstract cars as simple agents with basic rules like maintaining speed and distance from the car ahead, without worrying about details like engine types, colours, or driver personalities.

    This simplification helps create efficient models that run quickly in simulations and allows you to focus on the core behaviours that lead to emergent patterns. In computing, abstraction also enables modular code design, such as using functions to represent repeated behaviours, making your programs easier to build, test, and modify.

    Another example: If simulating a forest ecosystem, you could abstract trees as agents that grow based on sunlight and water rules, ignoring specifics like leaf shapes or soil nutrients unless they're crucial.
    Activity: For your chosen problem, list 5 key elements to include in your model (e.g., agents, rules, environment) and 3 details to abstract away. Then, explain in 2-3 sentences how this simplification aids in developing a simulation that can test different scenarios effectively.

    4 - Exploring Agent-Based Modelling

    Agent-based modelling is a powerful way to simulate complex systems by focusing on individual 'agents' – these could be people, animals, vehicles, or even abstract entities like cells in a body. Each agent follows simple rules for behaviour and interaction with others and their environment. Over time, these interactions can lead to emergent behaviours, which are unexpected or complex patterns that arise from the collective actions, even though no single agent is programmed to create them. For example, in a simulation of birds flocking, each bird might follow basic rules like staying close to neighbours and avoiding collisions, resulting in the emergent behaviour of a coordinated flock formation.

    The benefits of agent-based modelling include the ability to test 'what-if' scenarios safely and efficiently, such as changing rules or environmental factors to see how outcomes shift. It also helps demonstrate how small, local changes can have large-scale effects on the entire system. Another example: In a model of rumour spreading in a school, agents (students) might interact with nearby agents with a certain probability of passing on the rumour, leading to emergent patterns like rapid spread in densely connected groups or fizzling out in isolated ones.

    This approach ties into abstraction by simplifying real-world complexities into key agents and rules, and it supports modelling and simulation goals by allowing you to test scenarios and observe emergent behaviours.
    Activity: For your chosen problem, describe in 150-250 words how agent-based modelling applies. Identify at least two types of agents, outline 2-3 simple rules they might follow, give an example of a potential emergent behaviour that could arise, and explain the benefits of using this method for understanding and predicting real-world dynamics. Consider how it links to testing different scenarios in your simulation.

    5 - Breaking Down the Problem Step-by-Step

    To solve your problem systematically, break it down into smaller units using computational thinking. This iterative approach helps in developing models by allowing you to tackle complex issues one part at a time, refining as you go. Breaking down problems like this is essential for creating effective simulations, as it ensures all key elements are considered without overwhelming you.

    Step-by-Step Guide:

    1. Define the overall goal: Clearly state what you want the simulation to achieve. For example, if modelling traffic flow, your goal might be to simulate how traffic jams form and test ways to reduce them.
    2. Deconstruct: Identify the main components of the problem, such as agents (e.g., cars or animals), the environment (e.g., roads or habitats), and rules (e.g., speed limits or feeding behaviours).
    3. Solve sub-problems: For each component, outline simple algorithms or rules. Think about how you might implement them in code – for instance, using a loop to update agent positions over time or the random() function to simulate unpredictable decisions.
    4. Iterate: Review your breakdown and refine it based on potential issues, like if a rule leads to unrealistic behaviours. Repeat this process to improve your plan.
    Remember, this process is iterative – you might go back to earlier steps as new ideas emerge.
    Apply this to your chosen problem: Create a detailed step-by-step breakdown in a list or flowchart format. Include examples of how Python elements, like loops for repeating actions or conditional statements for decision-making, could be used in your sub-problems. Feel free to use any tool, such as paper, digital drawing apps, or even pseudocode, to represent your breakdown.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more