![]() |
![]() |
![]() |
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.
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.
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.
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.
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:
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).
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:
The display of population evolution curves over time and configuration menus will complete your tool.
And finally, here are a few possible avenues for expansion:
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:
A REPONSES (french word for "answers") file responding point by point to the questions asked for the different stages of the project. These answers are of course not unique but depend on how you understand the question. They will help the graders to better understand your design.
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.
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
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:
Modeling of culture boxes and nutrients
Single-flagellated bacteria (locomotion)
Nutrient differentiation
Single-flagellated bacteria (mutation and division)
«Grappling» bacteria and bacteria with group movement
Statistics and settings
Free extensions
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 4 Reading of the statement | first utility class 5 Culture boxes and nutrients 6-7 Single-flagellated bacteria (locomation) 8-10 Single-flagellated bacteria (division and mutation) 11-12 Differentiated interactions with nutrients 13 Free extensions/finalization Here are a few tips to make your life easier during the project: Familiarize yourself with the subject now. Start the project quickly! Think
before you start programming! Take the time with your colleague to
think carefully about how to code, which data structures to use,
etc. This will make programming much easier. Use the series of exercises and their answers as inspiration to fully understand the basic concepts. Modularize your code. Comment
your code as you go along: it's a bit of a pain to have to
comment an “infinite” number of lines of code two days before the deadline when
you can't quite remember what you wanted to do. Compile
regularly. It's easier to correct 2 or 3 syntax errors
in a few new lines of code than 100 errors in 400 lines
of code! Test each small function in your code by writing small main
or commenting out the other lines. This may seem
unnecessary, but you will waste less time writing a test program
than searching for errors within numerous
functions. Use
meaningful identifiers in your code. They are generally longer to type,
but when you return to parts of the code
written several weeks ago, it will be easier to remember
what the variables rotationMatrix and quotient represent than r and q. Feel free to
ask questions during lab sessions, on the forum (preferably), or during
support sessions.
Please also feel free to discuss any difficulties you may have with your teaching assistant or instructor. [2] "Brock Biology of Microorganisms", Madigan M., Martinko J. et Parker J., (livre)
[3] "Type IV pili and twitching motility", Mattick JS, Annu. Rev. Microbiol, 2002
[4] "Swarming motility" (comportements de groupes, Wikipedia) [5] Agent-based model (Wikipedia)
Read the project description
End of project registration
differentiated nutrients
«Grappling» bacteria
Bacteria with group movement
Settings and statistics
5. Tips
6. References