Avanish Singh

Avanish Singh

Jan 11, 2025

Group 6 Copy 19
0


Bacterial Antibiotic Resistance Simulation

Here is an interactive bacterial antibiotic resistance simulation created using Python, with assistance from AI (Claude) later converted to React. The simulation serves as an educational tool to demonstrate how bacterial populations evolve and respond to antibiotic treatment over time, highlighting the importance of consistent medication adherence.

The script has been put on github for public access and simulation is hosted on a webpage. Link of the webpage: https://avanishutsav.github.io/AMr/

The simulation is inspired from an activity by Science Education for Public Understanding Program(SEPUP). 

Development Process

The simulation was developed using Python as the primary programming language, leveraging several key technologies:

- Tkinter for the graphical user interface

- Matplotlib for real-time population graphing

- Canvas widgets for bacterial and dice visualization

- Threading for smooth animations

Later the python script was converted to react using AI. AI assistance through Claude was instrumental in developing the core logic and implementing the visual components. The AI helped structure the code efficiently and implement complex features like the dynamic visualization system.

Simulation Mechanics

The simulation tracks three distinct bacterial populations:

1. Blue bacteria (least resistant to antibiotics)

2. Yellow bacteria (moderately resistant)

3. Red bacteria (highly resistant)

Each day in the simulation follows these steps:

- A dice roll (1-6) determines if antibiotics are administered

  - Rolls of 1, 3, 5, or 6: Remove 5 bacteria (starting with least resistant)

  - Rolls of 2 or 4: Skip dose (simulating missed medication)

- Surviving bacteria reproduce (population increases by 1 per type)

- Visual displays update to reflect population changes

Visual Components

The interface consists of three main elements:

1. Population Graph

   - Real-time line graph showing population trends

   - Color-coded lines for each bacteria type

   - Day-by-day progression tracking

2. Bacteria Visualization Panel

   - Visual representation of current populations

   - Color-coded circles representing individual bacteria

   - Organized display showing relative population sizes

3. Interactive Dice

   - Animated dice roll visualization

   - Visual feedback for antibiotic administration decisions

   - Enhanced user engagement through animation


Concepts addressed

The simulation effectively demonstrates several key concepts:

- Development of antibiotic resistance in bacterial populations

- Impact of inconsistent medication adherence

- Importance of completing prescribed antibiotic courses

The visual elements make complex concepts accessible to students and help illustrate the consequences of different treatment patterns. The interactive nature of the simulation engages users and reinforces learning through direct manipulation of variables.

The simulation allows users to:

- Set initial population numbers

- Progress through days at their own pace

- Observe immediate and long-term effects of treatment

- Track population changes through multiple visual representation

The project demonstrates how AI can be effectively utilized in educational simulation for complex concepts. Future enhancements could include additional bacterial types, more complex resistance mechanisms.

0 comments

Join the conversation!Sign In

About This Project

The overuse of antibiotics in agriculture, particularly in poultry farming, is a major contributor to the global threat of antibiotic resistance. This project aims to develop an affordable, accessible lateral flow assay (LFA) to detect tetracycline residue in poultry products and raise awareness about antibiotic resistance in the food web among students, teachers, farmers, and the general public.

Blast off!

Browse Other Projects on Experiment

Related Projects

Empowering coastal youth for enhanced coastal and mangrove monitoring amidst massive sargassum landings.

The Caribe Mexicano MPA, home to 50% of the western hemisphere's largest barrier reef, has faced massive...

Are Marine Protected Areas conserving species biodiversity across the tree of life?

Observational assessments are a common tool for evaluating biodiversity richness, but they are costly and...

An environmental DNA (eDNA) approach to discovering life in NYC Ponds

Various human impacts, such as pollution and buildings, can shape freshwater pond ecosystems in the urban...

Backer Badge Funded

Add a comment