Mark Kollasch's Incomparable Game-Making Weblog

Words about the design and creation of interactive entertainment of all types.

12 May 2008

Classical Computer Science

It occurred to me, of late, that there is some considerable overlap between concepts in modern computer science and classical philosophy, in particular the ontological models of ancient Greek philosophers. There is a fairly obvious relationship between class inheritance and Aristotelian taxonomy. The abstract data type is nothing if not a practical example of Plato's concept of ideals (and, although this is more likely to be a coincidence, Plato regarded ideals as the ultimate truth, while in Lisp-derived languages and others, all types inherit from T or True).

And never you mind that any programming language is a formalized system of symbolic logic built upon a set of axioms. You already know that Zeno and Euclid invented those. Mathematical similarities don't count; there's nothing particularly insightful in pointing out that Pythagoras suggested everything could be represented numerically. There are plenty of other pertinent examples. Thales' explanation of change and substance (the fundamental substance of a thing remains the same although its attributes change) is preserved in mutable objects; Democritus' description of the atom is closely related to the discrete mathematics upon which all computer science relies; when Empodocles proposed the four classical elements, he was in fact suggesting the first-order primitives of the universe.

Naïve, low-detail models of the physical world are another common element in classical writing, with pre-Galilean science being what it was. The Greeks maintained such viewpoints because they made intuitive sense and were not subjected to particular scrutiny; modern software engineers do so by stripping away all the data not important to their current undertaking, for purposes of specialization and optimization. Even so, there is noteworthy similarity between classical physics and computing idioms. Of particularly striking interest is classical optics: the notion that vision and light is based on plain rays, rather than the modern model of photons and whatnot. A supposed debate among early students of optics was whether vision functioned by casting rays from the eyes to the objects being seen, or light sources casting rays which entered the eyes. Need I even point out the parallel to different ray tracing methods? In that light (ha!), John Carmack's fascinating work of late rather portrays him as a modern-day... I'm not entirely certain there is a suitable historic analogy for what he's doing right now, but it's nevertheless exciting.

Presumably, all of this mimicry of classical philosophy emerged unintentionally. People perhaps followed a similar thought process to the ancient sages, or, having been exposed at some point to the logical structure of their teachings, repeated them unawares. What might happen if we were to deliberately combine structured classical philosophy and computer science? What about other, later types of philosophy that build upon them? There are millennia of profound thought in human history, attempting to identify the true nature of the world. Since software simulation can present a model of the world which does not need to be accurate, so long as it is mathematically consistent, adopting their efforts to our craft may well introduce equally profound new models with distinct advantages, so that a little knowledge of history may elevate our craft beyond even what our own luminaries and sages have done.

Labels: , ,

24 January 2008

Rock-Paper-Scissors: an Analysis

It's the simplest game in the world, or at least the simplest competition. It goes by many names across the world. I will analyze it according to the concepts that I have presented earlier.

Number of players: two, competitively.

Symmetry: perfectly symmetrical, balanced.

Timescale: simultaneous.

Information: imperfect, inductive.

Mechanics: two players choose from one of three throws, and simultaneously reveal them with an unambiguous gesture. Each gesture draws against itself, defeats one, and is defeated by the other. Each throw results either in a draw, or in a win for one player and a loss for the other.

Metaphor: varies by culture, local flavor, or player eccentricity, but is commonly explained: rock blunts scissors; scissors cut paper; paper covers rock.

Theme: a full thematic interpretation of this game is beyond the scope of this article. It may be summarized as "Nothing is appropriate for every situation" or "All things have strengths and weaknesses," though more philosophical players may examine it in far greater depth.

Rock-paper-scissors is a very pure example of a certain game archetype, which is why "cyclical" balance of the type that it displays is often called "rock-paper-scissors balance" when employed in other games.

Now, consider this: a game as simple and basic as rock-paper-scissors has all these concepts associated with it. Since RPS represents the bare minimum necessary to be a competitive game, an analysis of this sort (though I wouldn't dare claim that my criteria are definitive, complete, or even any good) represents the bare minimum that a designer needs to understand about his game. Understanding your game's relation to rock-paper-scissors is like an engineer understanding a bicycle's relation to the lever.

Labels: