Tag Archives: Simulation

Algorithm analysis – Big O notation

Continuing from my previous post on performance analysis of algoritms, I decided to plot the CPU-time over the size of the problem, that is, the number of cells. The two graphs above, both plotted ‘log-log’, demonstrate a straight line.  A straight … Continue reading

Posted in development, software | Tagged , , , | Leave a comment

Single simulation run consuming 230 h (!) of cpu-time – root cause analysis of performance

I think I’ve broken some kind of record of CPU-time consumption for a single simulation run… for a fairly trivial application… As my frequent readers know, I’ve been playing lately with a simulation of Shelling’s segration model (see previous posts … Continue reading

Posted in Big Data, development, software | Tagged , , , , | Leave a comment

Animation of Thomas Shelling’s Segregation model

Programmed in Python, NumPy, SciPy and Prof. John Zelle’s Graphics Library

Video | Posted on by | Tagged , | Leave a comment

Graphics programming with Python

For reasons unknown to me, probably psychological, I’ve always hated graphics programming…. Never touched it, if I could avoid it…  Over the past 40 years that I’ve been programming,professionally as well as privately,  most of the time making ‘the pedal … Continue reading

Posted in development, software | Tagged , | Leave a comment

Schelling’s segration model: evolution

The image above shows the evolution, per iteration, for a run of the Schelling simulation. The upper left grid shows the initial condition, which is a randomly arranged state. The seven remaining grids show the state of the board after … Continue reading

Posted in development, software | Tagged , | Leave a comment

There’s a bug in my program: The enormous difference between < and <=

I’ve found a bug in my program! A bug, in my program…! And I’m a pro hacker, how shameful…! 🙂 Scary, isn’t it… a simple bug, a single character among the thousands of characters in my program… that single character … Continue reading

Posted in Complex Systems, development | Tagged , , | Leave a comment

Segregation – technical details

Just a few details to the more technically inclined readers of this blog: The image below has three sections: the leftmost showing the results in terms of where the agents prefer to be, the middle image showing a heatmap over … Continue reading

Posted in Complex Systems, development | Tagged , , | Leave a comment

Segration demo by computational agent simulation

For the fun of it, (and to learn more about Numpy’s multidimensional arrays) I decided to repeat Thomas Shelling’s famous experiment which demonstrates that segregation based on any real or imagined divider, such as gender, income, language,age, ethnicity, race, social status, … Continue reading

Posted in Complex Systems | Tagged , | Leave a comment

Surrounded by average people… what’s the likely IQ of your neighbour…?

IQ, the intelligence quotient, is defined as a normal distribution with mean of 100, and a standard deviation of 15. According to James Flynn, people with IQ 70 or less, are mentally retarded, while those with IQ 130 or more, … Continue reading

Posted in development, Math | Tagged , , , | Leave a comment

Probability Distributions for Dummies – Drunken walks and blindfolded archers

After having spent a few evenings exploring Python’s various math & science modules, specifically those dealing with probability, simulation and statistics, perhaps it’s time for a brief summary. In my previous recent posts, I’ve gone thru concepts such as mild … Continue reading

Posted in Math | Tagged , , , , , | Leave a comment