Topics › Python

Sugarscape revisited

Screenshot of my Sugarscape simulation

I can't believe it's over a year since I last wrote about creating a Sugarscape simulation in Python and Pygame. The page attracted a fair number of views, but I suspect several visitors were looking for the teen magazine. However, at least some of the visitors were genuinely interested and a couple of weeks ago I was contacted by someone interested in recreating Sugarscape in Python.

Hyphae simulation

I've started work on a simulation of fungus-like hyphae, based on project I saw called Mycelium.

Running multiple processes in Python

I've recently got a multi-core laptop, so was keen to try some parallel processing using Python. It's pretty simple; you just need to use:




Environment Simulation

A simulation of an environment and weather system in which cells might live.

Game of Life in one line of Python

This is my attempt at writing Conway's Game of Life in a single line of Python (an additional line is required to define the initial array, which is empty in my example, making the code even more pointless):


Python Tricks

Various 'tricks' I've learnt that have improved by ability to write Python code. 


Solar system evolution

After running my solar system simulation several times I was interested to see how robust the system was. By this I mean that despite the fact that the particles start off randomly distributed, the progress of the simulation is quite similar each time. The details weren't exactly the same each times, but in general, a star formed at the centre of the universe at about the same time and ended up with a few satellites, while several particles were sent flying off into space.

Adding ribosomes to my cell simulation

This is a description of some work I did on an older version of my cell simulation.

So far, the main adaptation that cells in my simulations have evolved has been an increase in of gene copy number. Such adaptations are unsurprising given that it's the only way cells can alter the relative amounts of each protein. In my final simulation I want to allow cells to alter gene expression using transcription factors to control rates of transcription (and thus translation).