Tired of ads? Enjoy an ad-free experience by signing up.
Sau Sheong Chang · · 16 min read

Simulating complex systems using programming

One of the more fascinating new sciences that came up in recent decades (yes, science takes decades) is complexity science. Complexity science is the study of complex systems, systems where many different components interact with one another to produce behaviors that are not easily explained from observing the individual components. An example of this is the way fish swim in the same direction in a coordinated way (i.e. how fish school). From observation and mathematical modeling, fish were simulated to school from individual behaviors that are as simple as:

  1. Remain close to your neighbours
  2. Avoid collisions with your neighbours

These simple rules however don’t tell the story of the spectacular way of how ‘barracuda tornadoes’ form from thousands of fish as they circle round and round in a vortex to avoid being fixed up as prey in the eyes of the predator.

schooling_fish

Schooling fish is an obvious example of a complex system, but there are complex systems all around us. If you observe our daily lives, you’d realize that the everyday culture you’re used to is likely a hodge-podge mix of multiple cultures. What you identify as a national or local culture is probably an eclectic mixture of a number of other cultures, which in turn are also a mix of even more other cultures.

For example, take laksa, a popular spicy noodle soup dish in Singapore, Malaysia, Indonesia and southern Thailand.

Its origins are believed to have been from Chinese coastal settlements, which took on a local twist as Chinese immigrants introduced local ingredients and cooking methods. And as local ingredients go, this can be coconut milk (resulting in variants of curry laksa), tamarind (resulting in variants of assam laksa), sambal belacan, various species of fish and even lemongrass! This results in a delightful and dizzying variety of variants that are simply edible embodiment of the local cultural mix.

Photo credit: Your Coastal Bend.

Photo credit: Your Coastal Bend.

Similarly, we find linguistic equivalents in Singlish, an English-based creole language spoken in Singapore, containing words originating from English, Malay, various dialects of Chinese and Indian languages, and also in Bahasa Rojak, a Malaysian pidgin language formed by code-switching between English, Malay, various dialects of Chinese and Indian languages in Malaysia.

If we dig deeper, various things we take for granted as being iconic to a culture, often have origins in other cultures for e.g. English tea (which came from China) and Zen Buddhism (popularized in the West through Japanese Zen, which came from Chan Buddhism, which originated in China and was influenced by Taoism, but in turn is a school of Mahayana Buddhism which came from India).

As Stephen Hawkings wrote in the opening to A Brief History of Time — it’s turtles all the way down.

turtles

Modeling cultural interactions

The simulation in Ruby

The simulation as a web service

Visualizing the simulation

) elements, and because of the 36-column limit, a 36×36 grid is created.

Running the simulation

Summary

Stay ahead in Asia’s tech landscape

You've reached your 2 free content limit for the month. Sign up for free to read the full story.

🏄 For casual readers / 👶 Free

Basic

US$0

Free forever

Get instant access to this article and more every month

0 premium content

Unlimited news briefs

5

5 articles

Ad-free reading experience

Just US$0 per day

⌛Sign up in 20s. No payment details needed.

📖 For learners / 👍 Starter

Lite

US$4.92/month

Billed annually at US$59/year

Get instant access to this article and more every month

4

4 premium content

Unlimited news briefs & articles

Ad-free reading experience

Just US$0.17 per day

Cancel anytime

Our subscriber community includes professionals from these companies:

Stay updated on the go with our mobile app.

Get latest insights with smoother, more personalized experience through TIA mobile app.

Community Writer

Sau Sheong Chang

I write, code.