Project 2025-2026: “Microbial Cultures”
General overview


Disclaimer: the automatically generated English translation is provided only for convenience and it may contain wording flaws. The original French document must be taken as reference!

Goal

Through this project, you will learn how to create a complete program that is larger in scale than those you have worked with up to now. Your program will also include a graphical component. In terms of computer science, the goal of this project is to consolidate your programming knowledge and give you practice with the essential concepts of object-oriented programming: abstraction and encapsulation, inheritance, virtual methods, and polymorphism.

item item item

1. Introduction

The aim of this project is to give you a modest introduction to the field of biological phenomenon simulation using computer techniques.

The goal is to simulate, in a simplified way, the culture of bacteria in Petri dishes. These bacteria will move around in the dishes in search of nutrients. They will be able to divide and will die under certain conditions. They will also have characteristics, such as their speed of movement, which may mutate over time. The mutation of certain characteristics may affect their ability to survive and develop. Movement and division have an energy cost for bacteria. They die when they reach zero energy levels.

The simulated behavioral aspects are inspired by bibliographic references cited at the bottom of the page.

The basic model will consider a single variety of bacteria, single-flagellated bacteria, with no direct interactions between them and whose only link with the environment will be the consumption of nutrients, which will increase their energy levels. These bacteria will be able to perceive nutrient gradients, facilitating their access to these resources.

Then, various extensions will be added, such as:

The tool you will build will start from a simplified model in which the system to be simulated is viewed as a collection of bacteria (of different types) moving in a specific environment and interacting with external components such as nutrients, potential obstacles, etc. You will use computer simulation techniques (step-by-step evolution of the system) to obtain a plausible visual representation of the overall process. A more detailed description of the elements to be simulated and the techniques used is provided below.

Learning objectives:

Beyond its practical application, this project will allow you to explore many interesting aspects of programming:

Below you will find a description of the assumptions and simulation techniques that will be implemented as part of this project, information about how the work will be organized, and a number of references on the subject.

2. Assumptions and simulation techniques

The aim is therefore to create a program that uses simulation techniques to visualize the evolution of different types of bacteria populations in different culture dishes. This growth will depend on various parameters such as the quantity and placement of nutrients or certain characteristics of the bacteria.

The simulation tool should allow users to interactively “play” with the different parameters to try to identify the optimal conditions for survival and growth.

The bacteria will move around in a (fluid) environment and interact with elements of that environment (nutrients, possibly obstacles).

Nutrient sources will be considered fixed in the basic version of the project, but may become mobile. They may grow depending on the temperature of the culture dish.

Competing bacteria

To enable several species of bacteria to compete for survival in a culture dish, we will introduce bacteria with special mobility abilities. For example, «grappling» bacteria [3] that differ from single-flagellated bacteria in their ability to:

Bacteria with group behaviors [4] will also be introduced.

Simulation

The two most fundamental aspects of simulating such a system are: calculating the movement of bacteria and managing their interactions with their environment.

With regard to movement, we will adopt a classic model in which the movement (of a bacterium) is governed by a differential equation of the type:

item

where v is the speed of movement and f represents a force exerted on the bacterium when it occupies the position x(t) and has the speed v(t): for example, the attraction exerted by substances emitted by other bacteria.

One of the classic approaches (see mathematical supplement [6]) consists of numerically integrating the differential equation of motion. This allows us to calculate the change in position and velocity of each bacterium after a time interval dt. Once a new position has been calculated, we must then simulate the interactions that this change in position induces on the bacterium and its environment (for example, when a bacterium gets close enough to a source of nutrients, it will be able to consume them).

In the case of single-flagellated bacteria, the force governing movement is considered to be zero: they will therefore move at a constant speed (uniform rectilinear motion).

The evolution of the system over time will therefore be simulated by calculating the evolution of the different entities (bacteria, nutrient sources, etc.) step by step. Each time step dt corresponds to a simulation cycle.

To summarize, a natural model of the world to be simulated consists of viewing it as:

A simulation cycle will then consist of:

  1. simulating the evolution of nutrients (growth as a function of temperature) after a time step dt has elapsed;
  2. simulating the movement of each bacterium using the technique described above over the same time step;
  3. once their new positions have been calculated, seeing how they interact with the components (and possibly bacteria) in their vicinity;

The display of population evolution curves over time and configuration menus will complete your tool.

Possible extensions

And finally, here are a few possible avenues for expansion:

3. Project submission

The project is to be carried out in groups of no more than two people. 

No report (document) is required for the project. However, we ask that you comment extensively and intelligently on the source code you submit to us (the comments will replace the report and will therefore be taken into account in the project grading). In addition, the cleanliness of the code (indentation, spaces, variable names, braces, class member variables, etc.) will also be taken into account in the grading (the code provided is considered acceptable).

We will also ask you to provide three additional files:

In particular, in addition to the usual comments on the code itself, you are free to take a critical look at the modeling of the problem, identify the weaknesses and shortcomings of this model, and naturally propose solutions to overcome these weaknesses. 

The deadline for the final submission is Monday, May 25 at 2 p.m. 

The practical session on Tuesday, May 26 will be devoted to the defense of projects. 

4. Implementation

4.1. Working directory

Create a subdirectory projet (french word for "project") in the directory ~/Desktop/myfiles/Programming/cpp.

All files related to this project must be located in the directory ~/Desktop/myfiles/Programming/cpp/projet

4.2. Organization of work

Since the complete programming of our project, however simplified it may be, is not feasible in the time allotted to you, you will not have to complete the entire program. The parts relating to graphic programming will be provided. Over the course of the weeks, we will also provide you with a number of utility files in the project statement. These files will enable you to test each stage of your project.

The practical sessions will be mainly dedicated to the project (the answer key for the exercises can be used as a source of additional information for the course). Your work during the practical sessions will be supplemented by a personal contribution outside of these sessions. This will mainly involve working with your partner to reflect on the decisions to be made regarding the design of your program and the resulting code (what to code? how to code? which data structures to use? etc.).

We ask that you carefully save your work at each stage, even if incomplete, so that you can regularly show your progress.

The course team is of course available to help you throughout this project: during practical sessions, during support sessions (catch-up sessions) and via the forum.

Coaches : A responsible assistant (“coach”) will be appointed for each pair. Their role will be to provide you with more dedicated support. In particular, you will need to show them your JOURNAL approximately every two weeks. You should discuss any difficulties you encounter with your coach first. However, you will give the final presentation of your project to another assistant.

The implementation of the project involves the following main stages: 

4.3. Schedule

A detailed description of the entire project will be provided, along with the graphics library, allowing you to work at your own pace. The work plan proposed in the table below coincides with the course schedule and gives you an indication of the time you should devote to each task.

Very important: Do not fall too far behind this plan so that you are not overwhelmed at the end of the semester.

Week(s)

Recommended tasks

3

Start of project registration
Read the project description

4

Reading of the statement | first utility class
End of project registration

5

Culture boxes and nutrients

6-7

Single-flagellated bacteria (locomation)
differentiated nutrients

8-10

Single-flagellated bacteria (division and mutation)
«Grappling» bacteria
Bacteria with group movement

11-12

Differentiated interactions with nutrients
Settings and statistics

13

Free extensions/finalization

5. Tips

Here are a few tips to make your life easier during the project:

6. References