Development through gaming

Share this on social media:

Topic tags: 

Ray Girvan discovers that the race to create ever more real computer games is having a beneficial effect on scientific computing

Given the importance nowadays of cellular automata across a wide range of scientific computing disciplines, it's easy in hindsight to dismiss as short-sighted the 1974 Time magazine article that complained of the 'millions of dollars of valuable computer time wasted' by enthusiasts of the first popular CA, John Conway's Game of Life. Mainstream observers, however, commonly underestimate the role of fringe activities in propelling science and technology. Well-known examples are how wars have fostered innovation in areas such as communications, cryptography, medicine and aerospace; and how erotica has been a major factor in pioneering visual media, from the first printed books to photography, cinematography, videotape, or the latest online video streaming. This article aims to be a sampler of a less controversial, but still often underrated, symbiosis between scientific computing and computing for leisure and entertainment.

Cinema graphics are the most impressive example of cutting-edge computing applied to entertainment. It's not normally considered science, but a large and lucrative industry has developed around solving the essentially scientific problem of simulating the physical world, whatever the scale. At one extreme, the New Zealand company Weta Digital's crowd animation system, Massive, required terabytes of data to create the battle scenes in Lord of the Rings: this generates an 'artificial ecology' of autonomous agents that circumvent the need to animate the actions of every character on scene. At the other, the tiny computer-generated mouse in the Nestlé Aero advertisements achieved its realism through the use of FurShader, a graphics module developed over three years by London-based Glassworks for the notoriously difficult task of modelling fur.

Although these applications are proprietary, nevertheless many algorithms and techniques are shared through published papers, particular through SIGGRAPH (the Special Interest Group on Computer Graphics and Interactive Techniques) and its annual computer graphics conference. For instance, SIGGRAPH gave the first public viewing of Craig Reynolds' 'boid' model, which simulates the motion of a flock of 'birdoids' using only simple local interactions. Boids have been especially successful in straddling the divide between academia and entertainment: one of the most influential concepts in the academic study of emergent behaviour, yet one also used to generate the penguin flocks and bat swarms in the Tim Burton film, Batman Returns.

Computer gaming is another major leisure field that uses scientific computing techniques, where the programming challenges lie not merely in graphics but in providing strong opponents and a believable game environment in real time. With board games, the problem is purely algorithmic. Chess, for instance, has proved relatively straightforward to program with a 'brute force' approach of checking a tree of all possible moves. This has been unsuccessful with Go, which has 10 to the power of 700 possible games, as opposed to chess's 10 to the power of 120, and an order of magnitude more legal moves at any turn. Go programming draws instead on a variety of techniques such as pattern recognition, cellular automata and combinatorial game theory. Such approaches, both commercial and academic, have achieved sufficient success for the Japanese Go Association to move on from its 1972 statement that Go is unprogrammable, recently awarding a 2kyu diploma (a skill approaching expert dan level) to the North Korean program KCC Igo. However, the best Go programs are still beatable by strong amateur players.

Action games need to provide a richer environment than a gameboard, and here the computing effort is directed at providing good graphics, interesting non-player characters, and a believable environment. All of these impinge on scientific computing. Graphics share algorithmic requirements with scientific visualisation: for instance, fast real-time computation for texture and rendering. Some formats such as VRML (Virtual Reality Modelling Language) are equally applicable in 3D games and professional crystallography programs such as Crystallographica.

Computer-generated characters generally use 'intelligent agents' that draw on wider artificial intelligence techniques. Probably the most recognisably science-based approach to such agents is that of Cambridge-based Creature Labs Ltd. Its popular series of Creatures games are based on 'Norns', small humanoid animals whose behaviour is based on a complex fictional biology: a 10-lobed brain controlling thought processes; abiochemistry with 250 chemicals controlling mood, metabolism and physical behaviour; and the ability to mate and transfer an 800- gene genetic code.

As to game environment, recent advances in game system processing power have made possible extremely sophisticated physical modelling. Increasingly, games developers are turning to specialist 'middleware' companies to buy in authentic physics. One of the pioneers in this field, MathEngine (currently under negotiation for acquisition by Criterion Software) created a physics toolkit, Karma, for incorporating rigid-body dynamics into 3D games. A spin-off company, Critical Mass Labs, markets the same technology as Vortex, a constructor for training simulation and robotics applications. Modelling mass, velocity, friction, inertia, torque, rotation, gravity, jointed bodies, springs and damping, Vortex is particularly applicable to vehicles. Applications have included a training simulator for the Valmet 911 Harvester (a sixwheeled articulated vehicle that trims and slices felled trees into logs), and development of a prototype NASA Mars Rover.

pic

  • Commercial physics modelling: the Nestlé Aero mouse using Glassworks' FurShader; chain motion from CM Labs' Vortex; and elastic spheres by Havok.

A newer company, Havok, extends this approach to soft body physics. Based on research at Trinity College Dublin by its founders, Hugh Reynolds and Steven Collins, its Total Havok toolkit can also model computationally challenging behaviour such as natural movement of cloth, liquids and compressible solids. As with MathEngine, Havok applications span markets covering general media and simulation products from Adobe Systems, Autodesk and Macromedia, alongside games platforms such as the Sony Playstation, Microsoft XBox and Nintendo Gamecube.

Games hardware is of interest in itself as having a strong synergy with scientific computing. USA company Butterfly recently made the news with its plans for the 'Butterfly Grid', co-developed with IBM using crossplatform protocols developed for scientificsupercomputing, that will enable over a million simultaneous users to play high-bandwidth online games. Conversely, some believe that home use of powerful dedicated hardware will raise users' expectations in other areas of computing. For instance, Theresa-Marie Rhyne of the US EPA Scientific Visualization Center argues that consumer graphics development has made commodity graphics boards commonplace, and that benefits will filter back into scientific 3D visualisation. Hardware also covers control interfaces, human-computer interaction, biofeedback, and so on, which are equally topics of study inside and outside the games field.

Apart from hardware and software spinoffs, a traditional justification for computer recreation (when used in the right way) is education. Simple games are a staple of the educational software market, but their potential may be far greater. MIT's Games-to- Teach project, a collaboration with Microsoft, is currently examining the possibilities for teaching science and engineering at college level. Simulation games, argues the project director Henry Jenkins, are already able to model complex situations and processes such as running a model city or global ecology. This technology could equally be harnessed to teach electromagnetism or Newtonian physics.

Recreation is of course, not limited to games and even essentially serious packages present scope for creative play. Pedagoguery Software's GrafEQ, based on Jeff Tupper's thesis on interval arithmetic, and David Parker's DPGraph (Dynamic Photorealistic Graphing) both target the educational market as graphing programs. But the user galleries show that producing artwork is a major secondary use, and one obviously educational in requiring a strong knowledge of the behaviour of the underlying functions.

Scientific computing also grades into the far older pastime of recreational mathematics, a potential use of any mathematics package. A few technical companies have gone further in supporting recreational software alongside more conventional products. A decade or so ago, the major CAD company Autodesk released a cellular automata toolkit, Rudy Rucker's CA Lab, and a fractal and chaos theory toy, Chaos: The Software, based on James Gleick's best-selling book. Although no longer sold by Autodesk, these programs are still available as freeware at Rucker's web site.

Wolfram Research has similarly endorsed leisure computing by supporting Artlandia, a third-party Mathematica add-on for algorithmic art, and its recently launched The Mathematical Explorer, Stan Wagon's Mathematica- powered exploration of classic and modern recreational mathematics topics (reviewed in the May/June issue of Scientific Computing World).

As a teacher of mathematics and computer science at Macalester College, St. Paul, Minnesota, Professor Wagon's view of the value of such computing pursuits is clear: 'For me, it has always been educational. There are certain problems that are so compelling that anyone, whether a student, amateur or even a professional, would benefit from thinking about them. Good problems in recreational math show us how mathematics is involved in so much of our world, from the mundane to the fun to the important.'

Clifford Pickover, a Research Staff Member at the IBM T.J. Watson Research Center and author of nearly two dozen books on recreational mathematics and computing topics, argues beyond educational utility. He describes his primary interest as finding new ways to continually expand creativity by melding art, science, mathematics and other seemingly disparate areas of human endeavour.

'I believe recreational mathematics can be very important,' he says. 'Not just for its educational aspects but because significant discoveries can come from such play. Some topics may appear to be mere curiosities, but throughout history, experiments, ideas and conclusions originating in the play of the mind have found striking and unexpected practical applications.'

It may well be that some computing recreations are not directly productive. Conway's Life, for instance, has strong aesthetic and puzzle interest, yet is not a CA that corresponds to any physical reality. But I agree with Pickover that such recreations are a manifestation of a mindset that overall gives far more to scientific computing than it takes.