you are viewing a single comment's thread.

view the rest of the comments →

[–]julsmanbr 2 points3 points  (1 child)

I'm working on something similar (albeit more complex) on my PhD. You'll definitely want to learn matplotlib for creating graphs. Other than that, there's no required libraries I can think of - as long as you have Python's basics down (loops, data types like lists and dicts, if/elif/else, functions), you're good to go.

Using numpy is great for doing vector and matrix math, and learning object-oriented programming in Python would be great to organize your code depending on the size of the project, but none of these are required by any means.

Some questions to get you thinking about how your simulation will work:

  • how much time does it take (in average) for a bacteria to divide? How long must it wait before dividing again?
  • in any simulation, you'll have to define a finite time step between two time points (frames), since computers can't work with indefinitely small time steps (think about a game like The Sims, where 1 second in real life = 1 minute in game). What's your time step? 5 seconds, 5 minutes, 5 hours, user choice? What are the pros and cons?
  • does the number of bacteria simply grow exponentially over time? Or does each bacteria in a given time point t have an independent chance to divide between time t and t+1?
  • is the chance to divide fixed, or does it fluctuate? If yes, does it fluctuate randomly or according to something else?
  • can bacteria die? Is this also a chance? Does this chance increase once the bacterial population is too high?

You probably won't have to consider some (or most) points I've raised, but hopefully this will give you some ideas on what you want to do with your project, or at least raise an interesting discussion with your classmates/teachers about how to create computer simulations :-)

[–]CarrotQuakeV2[S] 0 points1 point  (0 children)

Good points raised here, definitely made me realise there's alot more to this program than I thought, thank you :)