You are a bird on a two dimensional plane. You control your bearing and speed, and there are just three rules you have to observe: (1) try to fly roughly the same direction that anyone in your sight, (2) try to fly roughly at the same speed that anyone in your sight and, finally, (3) slow down if you are about to bump into anyone.

The rules were dead simple to implement and so the code was mere 200 lines – a small but sufficient length in the programming world. With just a tiny bit of peeking in geometry articles online, the hobbyist programmer was done in two hours and those were her personal humble beginnings in the agent-based artificial intelligence. She seeded the program with a dozen of these birds and started it up.

The flying was abstracted, as the program ran on a screen. Birds were purely symbolical, too – triangles with two sides slightly longer than the third, so that anyone could see where each bird was heading. “In your sight” was a matter of mere geometry – anything, in 100 pixel distance from the bird’s perspective was good enough. And checking with others? – Think of it as playing chess with yourself.

The computer went through the perspectives of each bird to calculate its next move and, once everyone had had their turn, drew the results on the screen and proceeded to calculate the next frame. Each turn on its own would look like a state on a chessboard, but when the program ran it at 60 frames per second, it became a moving picture.

Oh, and she also made it so that if a bird would move out of screen, it would appear back on the other side, so that the birds would always stay in sight.

The birds took flight, moving in ones at first but soon enough falling in line with others (as the rules dictated) and quickly found themselves in small groups that then merged into bigger ones but, having gained enough mass, split up again.

The motion uncannily resembled natural flocking, and she had created it in a mere evening while sipping margarita mix with a dash of cheap tequila. She was hooked and, admittedly, a tiny bit drunk. Before logging off, she moved the program to a cloud where it would run all the time, and made a webpage that talked to the cloud to draw the birds on the page. This way the birds were flying around even if she wasn’t observing them. The agent games had begun.

In the next days she started adding new kinds of birds.

While the ones that were already flying around kept their rules, each day she introduced a new bird that had extra or different rules, the sophistication of the rules growing with time. She made shy birds that respected the three rules but also tried to steer away from crowds bigger than 3, and jerk birds that did not care about bumping into others and did not think much of sticking with the crowd. She made birds with lazy wings that always steered a tiny little bit to one side, and she made greener grass birds that wanted to fly towards a specific spot on the screen that most certainly wasn’t where they were, but once they would reach it – a different spot would beckon them once again.

Every single of the introduced birds changed the whole system – that was the beauty of it – a simple and singular addition affected the eddies and flows, causing the population fly in circles or go into a state of chaos till they found their equilibrium again, the patterns rarely repeating. And if she watched them for long enough, she could understand why the things had changed the way they did, but it was hard to ever predict how a new addition would act in advance.

Over the next few years, her virtual birdcage doubled in size many times. She added zoom and search to the page, and she added bookmarks so that she could jump straight to her favourite locations – so big the map had become. And new birds kept cropping up each single day till, finally, she added the thinking bird.

It stood still, observing everyone, looking this way and the other. When it got curious, it approached its subject and followed it for a while. The thinking bird made notes in his deep learning memory but not in any language we would understand. And now and then, it created birds of his own – a tiny piece of code that it had written itself and then added to the program.

The thinking bird’s creations affected the whole picture same way the programmer’s ones did, and the thinking bird closely watched those unravel, then seemingly thought on it, seemingly made more observations, and then a few days later another creation would appear – very similar to the previous one but still a little bit different.

The programmer wondered if the thinking bird ever thought about itself, and if it would ever conceive a thinking bird of its own.