Thursday, 9 April 2015

Bringing magic back to technology

Back in 2011, I was one of the discoverers of "Bytebeat", a type of very short computer programs that generate music. These programs received quite a lot of attention because they seem to be far too short for the complex musical structures they output. I wrote several technical articles about Bytebeat (arxiv, countercomplex 1, countercomplex 2) as well as a Finnish-language academic article about the social dynamics of the phenomenon. Those who just need a quick glance may want to check out one of the Youtube videos.

The popularity of Bytebeat can be partially explained with the concept of "hack value", especially in the context of Hakmem-style hacks -- very short programs that seem to outgrow their size. The Jargon File gives the following formal definition for "hack value" in the context of very short visual programs, display hacks:
"The hack value of a display hack is proportional to the esthetic value of the images times the cleverness of the algorithm divided by the size of the code."
Bytebeat programs apparently have a high hack value in this sense. The demoscene, being distinct from the MIT hacker lineage, does not really use the term "hack value". Still, its own ultra-compact artifacts (executables of 4096 bytes and less) are judged in a very similar manner. I might just replace "cleverness of the algorithm" with something like "freshness of the output compared to earlier work".
Another related hacker concept is "magic", which the Jargon File defines as follows:
1. adj. As yet unexplained, or too complicated to explain; compare automagically and (Arthur C.) Clarke's Third Law: "Any sufficiently advanced technology is indistinguishable from magic." "TTY echoing is controlled by a large number of magic bits." "This routine magically computes the parity of an 8-bit byte in three instructions." 
2. adj. Characteristic of something that works although no one really understands why (this is especially called black magic). 
3. n. [Stanford] A feature not generally publicized that allows something otherwise impossible, or a feature formerly in that category but now unveiled. 
4. n. The ultimate goal of all engineering & development, elegance in the extreme; from the first corollary to Clarke's Third Law: "Any technology distinguishable from magic is insufficiently advanced".
Short programs with a high hack value are magical especially in the first two senses. How and why Bytebeat programs work was often a mystery even to their discoverers. Even when some theory about them was devised, it was often quite difficult to understand or apply. Especially bitwise arithmetic tends to have very esoteric uses in Bytebeat.

The hacker definition of magic indirectly suggests that highly advanced and elegant engineering should be difficult to understand. Indecipherable program code has even been celebrated in contests such as IOCCC. This idea is highly countercultural. In mainstream software industry, clever hacks are despised: all code should be as easy as possible to understand and maintain. The mystical aspects of hacker subcultures are there to compensate for the dumb, odorless and dehumanizing qualities of the industrial chores.

Magic appears in the Jargon File in two ways. Terms such as "black magic", "voodoo programming" and "cargo cult programming" represent cases where the user doesn't know what they are doing or may not even strive to. Another aspect is exemplified by terms such as "deep magic" and "heavy wizardry": there, the technology may be difficult to understand or chaotic to control, but at least there are some talented individuals who have managed to. These aspects could be called "wild" and "domesticated", respectively, or alternatively "superstition" and "esoterica".

Most technology used to be magical in the wild/superstitious way. Cultural evolution does not require individual innovators to understand how their innovations work. Fermentation, for example, had been used for thousands of years without anyone having seen a micro-organism. Despite this, cultural evolution can find very good solutions if enough time is given: traditional craft designs often have a kind of optimality that is very difficult to attain from scratch even with the help of modern science. (See e.g. Robert Boyd et al.'s articles about cultural evolution of technology)

Science and technology have countless examples of "wild magic" getting "domesticated". An example from computer music is the Karplus-Strong string model. Earlier models of acoustic simulation had been constructed via rational analysis alone, so they were prohibitively expensive for real-time synthesis. Then, Karplus and Strong accidentally discovered a very resource-efficient model due to a software bug, and nowadays it is pretty standard textbook material without much magical glamor at all.

Magic and rationality support each other. In good technology, they would coexist in symbiosis. Industrialization, however, brought a cult of obsolescence that prevented this kind of relationship. Traditions, time-proven designs, intuitive understanding and irreducible wisdom started to get obsoleted by one-dimensional reductive analysis. Nowadays, "magic" is only tolerated as bursts of inspiration that must be captured within reductivist frameworks before they break something.

In the 20th century, utilitarian industrial engineering started to get obsoleted by its bastard offspring, tumorous engineering. This is what I discussed in my earlier essay "The resource leak bug of our civilization". Accumulation of bloat and complexity for their own sake is making technology increasingly difficult to rationally understand and control. In computing, where tumourous engineering dominates, designers are already longing back to utilitarian industry where simplicity, controllability, resource-efficiency and expertise were still valued.

When advocating the reintroduction of magic, one must be careful not to endorse the kind of superstitious thinking that already has a good hold on how people relate to technology. Devices that hide their internal logic and instead base their interfaces on guessing what the user wants are kind of Aladdin's lamps to most. You don't really understand how they work, but at least their spirits fulfill your wishes as long as you don't make them angry.

The way how magic manifests itself in traditional technology is diagonally opposite to this. The basic functional principles of a bow, a canoe or a violin can be learned via simple observation and experimentation. The mystery lies elsewhere: in the evolutionary design details that are difficult to rationally explain, in the outworldish talent and wisdom of the master crafter, in the superhuman excellence of the skilled user. If the design has been improved over generations, even minor improvements are difficult to do anymore, which gives it an aura of perfection.

The magic we need more in today's technological world is of the latter kind. We should strive to increase deepness rather than outward complexity, human virtuosity rather than consumerism, flexibility rather than effortlessness. The mysteries should invite attempts at understanding and exploitation rather than blind reliance or worship; this is also the key difference between esoterica and superstition.

One definition of magic, compatible with that in the Jargon File, is that it breaks people's preconceptions of what is possible. In order to challenge and ridicule today's technological bloat, we should particularly aim at discoveries that are "far too simple and random to work but still do". New ways to use and combine the available grassroots-level elements, for instance.

A Bytebeat formula is a simple arrangement of digital-arithmetic operations that have been elementary to computers since the very beginning. It is apparently something that should have been discovered decades ago, but it wasn't. Hakmem contains a few "sound hacks" that could have evolved into Bytebeat if a wide enough counter had been introduced into them, but there are no indications that this ever took place. It is mind-boggling to think about that the space of very short programs remains so uncharted that random excursions there can churn out new interesting structures even after seventy years.

Now consider that we are surrounded by millions of different natural "building blocks" such as plants, micro-organisms and geological materials. I honestly believe that, despite hundreds of thousands of years of cultural evolution, their combinatory space is nowhere near fully charted. For instance, it could be possible to find a rather simple and rudimentary technique that would make micro-organisms transform sand into a building material superior to everything we know today. A favorite fantasy scenario of mine is a small self-sufficient town that builds advanced spacecraft from scratch with "grassroots-level" techniques that seem magical to our eyes.

How to develop this kind of magic? Rational analysis and deterministic engineering will help us to some extent, but we are dealing with systems so chaotic and multidimensional that decades of random experimentation would be needed for many crucial leaps-forward. And we don't really have those decades if we want to beat our technological cancer.

Fortunately, the same Moore's law that empowers tumorous engineering also provides a way out. Computers make it possible to manage chaotic systems in ways other than neurotic modularization. Today's vast computational capacities can be used to simulate the technological trial-and-error of cultural evolution with various level of accuracy. Of course, simulations often fail, but at least they can give us a compass for real-world experimentation. Another important compass is "hack value" or "scientific intuition" -- the modern manifestations of the good old human sense of wonder that has been providing fitness estimations for cultural evolution since time immemorial.

Thursday, 2 April 2015

My first twenty years on the demoscene

Since I have been somewhat inactive in computer art for a while, I felt it might be a good idea to sum up the first twenty years of my demoscene career. Besides, my previous summary is already a decade old.

Back in 1994, I got involved in some heated BBS discussions. I thought the computer culture of the time had been infected by a horrible disease. IBM PC compatible software was getting slow and bloated, and no one seemed to even question the need for regular hardware upgrades. I totally despised the way how PC hardware was being marketed to middle-class idiots and even declared the 486 PC as the computer of choice for dumb and spoiled kids. I was using an 8088 PC at the time and promised to myself not to buy any computing hardware that wasn't considered obsolete by consumption-oriented people. This decision has held quite well to these days. Nowadays, it is rather easy to get even "non-obsolete" hardware for free, so there has been very little need to actually buy anything but minor spare parts.


In the autumn of 1994, I released a couple of silly textmode games to spread my counterpropaganda. "Gamer Lamer" was about a kid who gathered "lamer points" by buying computers and games with his father's money. "Micro$oft Simulator", on the other hand, was a very simple economic simulator oriented on releasing new Windows versions and suing someone. I released these games under the group title PWP ("Pers-Wastaiset Produktiot" or "anti-arse productions") which was a kind of insider joke to begin with. The Finnish computer magazines of the time had been using the word "perusmikro" ("baseline microcomputer") for new and shiny 486 PCs, and this had inspired me to call them "persmikro" ("arse microcomputer").

At that time, Finnish BBSes were full of people who visited demoparties even without being involved with the demoscene. I wanted to meet users of my favorite boards more often, so I started visiting the events as well. In order to not being just another hang-around loser, I always entered a production to the PC 64k intro competition starting from 1996.

(The demo screenshots are Youtube links, by the way.)


Of course, I wanted to rebel against the demoscene status quo. I saw PC demos as "persmikro" software (after all, they were bloated to download with 2400 bps and didn't work in my 8088) and I was also annoyed by their conceptual emptiness. I decided that all PWP demos should run on 8088 in textmode or CGA, be under 32 kilobytes big and have some meaningful content. The afore-mentioned "Gamer Lamer" or "Pelulamu" character became the main hero in these productions. PWP demos have always been mostly my own solo productions, but sometimes other people contributed material as well – mostly graphics but sometimes music too.

The first three demos I released (the "Demulamu" trilogy) were disqualified from their respective competitions. Once I had developed some skill and style, I actually became quite succesful. In 1997, I came second in the 64k competition of the Abduction demoparty with "Isi", and in 1998, I won the competition with "Final Isi".

My demos were often seen as "cheap", pleasing crowds with "jokes" instead of talent. I wanted to prove to the naysayers that I had technical skills as well. In 1997, I had managed to get myself an "obsolete" 386 motherboard and VGA and started to work on a "technically decent" four-kilobyte demo for that year's Assembly party. The principle of meaningful content held: I wanted to tell a story instead of just showing rotating 3D objects. "Helium" eventually came first in the competition. Notably, it had optional Adlib FM music (eating up about 300 bytes of code and data) at a time when music was generally disallowed in the 4k size class.


My subsequent PC 4k demos were not as succesful, so I abandoned the category. Nevertheless, squeezing off individual bytes in size-optimized productions made me realize that profound discoveries and challenges might be waiting within tight constraints. Since Unix/Linux I was starting to get into wasn't a very grateful demo platform, I decided to go 8-bit.

In 1998, there was a new event called Alternative Party which wanted to promote alternative demoscene platforms and competitions. The main leading demoscene platforms of the time (386+ PC and AGA Amiga) were not allowed but anything else was. I sympathized the idea from the beginning and decided to try my hands on some VIC-20 demo code. "Bouncing Ball 2" won the competition and started a kind of curse: every time I ever participated in the demo competition at Alternative Party, I ended up first (1998, 2002, 2003 and 2010).

Alternative Party was influential in removing platform restrictions from other Finnish demoparties as well, which allowed me to use the unxepanded VIC-20 as my primary target platform just about anywhere. I felt quite good with this. There hadn't been many VIC-20 demos before, so there was still a lot of untapped potential in the hardware. I liked the raw and dirty esthetics the platform, the hard-core memory constraints of the unexpanded machine, as well as the fact that the platform itself could be regarded as a political statement. I often won competitions with the VIC-20 against much more powerful machines which kind of asserted that I was on the right track.

In around 2001-2003, there were several people who actively released VIC-20 demos, so there was some technical competition within the platform as well. New technical tricks were found all the time, and emulators often lagged behind the development. In 2003, I won the Alternative Party with a demo, "Robotic Warrior", that used a singing software speech synthesizer. The synth later became a kind of trademark for my demo productions. Later that year, I made my greatest hardware-level discovery ever – that the square-wave audio channels of the VIC-I chip actually use shift registers instead of mere flip-flops. Both the speech synth and "Viznut waveforms" can be heard in "Robotic Liberation" (2003) which I still regard as a kind of "magnum opus" for my VIC-20 work.


Although I released some "purely technical" demos (like the "Impossiblator" series), most of my VIC-20 productions have political or philosophical commentary of some kind. For example, "Robotic Warrior" and "Robotic Liberation", despite being primarily technical show-offs, are dystopian tales on the classic theme of machines rising against people.

I made demos for some other 8-bit platforms as well. "Progress Without Progress" (2006) is a simple Commodore 64 production that criticizes economic growth and consumption-oriented society (with a SID-enhanced version of my speech synthesizer). I also released a total of three 4k demos for the C-64 for the German parties Breakpoint and Revision. I never cared very much about technical excellence or "clean esthetics" when working on the C-64, as other sceners were concentrating on these aspects. For example, "Dramatic Pixels" (2010) is above all an experiment in minimalistic storytelling.

A version of my speech synth can also be heard on Wamma's Atari 2600 demo "(core)", and some of my VCS code can be seen in Trilobit's "Doctor" as well. I found the Atari 2600 platform very inspiring, having many similar characteristics and constraints I appreciate in the VIC 20 but sometimes in a more extreme form.


When I was bored with new technical effects for the VIC-20, I created tools that would allow me to emphasize art over technology. "The Next Level" (2007) was the first example of this, combining "Brickshop32" animation with my trusted speech synth. I also wrote a blog post about its development. The dystopian demo "Future 1999" (2009) combines streamed character-cell graphics with sampled speech. "Large Unified Theory" (2010), a story about enlightenment and revolution, was the last production where I used BS32.


Perhaps the hurried 128-kilobyte MS-DOS demo "Human Resistance" (2011) should be mentioned here as well. In the vein of my earlier dystopian demos, it tells about a resistance group that has achieved victory against a supposedly superior artificial intelligence by using the most human aspects of human mind. I find these themes very relevant to what kind of thoughts I am processing right now.


In around 2009-2011, I spent a lot of time contemplating on** the nature of the demoscene and computing platforms, as seen in many of my blog posts from that period. See e.g. "Putting the demoscene in a context", "Defining Computationally Minimal Art" and "The Future of Demo Art" (which are also available on academia.edu). I got quoted in the first ever doctoral dissertation about demos (Daniel Botz: Kunst, Code und Maschine), which also gave me some new food for thought. This started to form basis on my philosophical ideas about technology which I am refining right now.

Extreme minimalism in code and data size had fascinated me since my first 4k demos. I felt there was a lot of untapped potential in extremely simple and chaotic systems (as hinted by Stephen Wolfram's work). The C-64 4k demo "False Dimension" (2012) is a collection of Rorschach-like "landscape photographs" generated from 16-bit pseudorandom seeds. I also wanted to push the limits of sub-256-byte size classes, but since real-world platforms tend to be quite problematic with tiny program sizes, I wanted a clean virtual machine for this purpose. "IBNIZ" (2011) was born out of this desire.

When designing IBNIZ, I wanted to have a grasp on how much math would be actually needed for all-inclusive music synthesis. Experimentation with this gave birth to "Bytebeat", an extremely minimalistic approach to code-based music. It became quite a big thing, with more than 100000 watchers for the related Youtube videos. I even wrote an academic article about the thing.


After Bytebeat, I had begun to consciously distance myself from the demoscene in order to have more room for different kinds of social and creative endeavours. The focus on non-interactive works seemed limited to me especially when I was pondering about the "Tetris effects" of social media mechanisms or technology in general. However, my only step toward interactive works has been a single participation in Ludum Dare. I had founded an oldschool computer magazine called "Skrolli" in autumn 2012 and a lot of my resources went there.

Now that I have improved my self-management skills, I feel I might be ready for some vaguely demoscene-related software projects once again. One of the projects I have been thinking about is "CUGS" (Computer Underground Simulator) which would attempt to create a game-like social environment that would encourage creative and skill-oriented computer subcultures to thrive (basically replicating some of the conditions that allowed the demoscene to form and prosper). However, my head is full of other kinds of ideas as well, so what will happen in the next few months remains to be seen.