Jerry encounters some powerful machines and embarks on some programming projects.
Jerry Pournelle
Last week, I was the featured speaker at ComputerFest in Springfield, Illinois.
As part of my visit, we drove over to the National Center for Supercomputing Applications (NCSA) at the University of Illinois. It was only my second trip to Urbana-Champaign. The first time was in 1953, when I went there to see ILLIAC, which was at that time the world's most powerful computer. Today, a good pocket calculator is more powerful than ILLIAC was.
Larry Smarr, the director at NCSA, showed us marvels, suc
h as the Cave for doing 3-D editing and directing. You can stand in the Cave and watch galaxies
collide, moving your viewpoint as you like. It's an astonishing experience.
NCSA was established in 1985 with a Cray X-MP vector supercomputer operating at 8.5 nanoseconds. NCSA was directed to make supercomputing available to a wide range of people. One of their goals is to teach students what supercomputers are and how to use them, since what you'll work on after you graduate is likely to be a great deal more powerful than what you have now.
It's surprisingly easy to get an account with NCSA for your project. Time is available for high schools and colleges, and they have classes for teachers at various levels. You can find out more at NCSA's Web site (
http://dilbert.ncsa.ui
uc.edu
). Incidentally, Mosaic, the Web browser, was developed at NCSA; people who were formerly on the NCSA staff later developed the most successful commercial Web browser.
NCSA has come a long way since the Cray X-MP. They now have a number of Silicon Graphics machines as well as massively parallel systems. There's support for languages other than FORTRAN, although most supercomputing models are done in FORTRAN.
There's extensive work on graphics and displays, pioneered by art and design professor Donna Cox working with the supercomputer gurus. NCSA's early work in display design brought about a virtual revolution in scientific data display, and NCSA collaborated on a documentary on colliding universes that won an Academy Award nomination for best documentary.
You can find out much more about the uses of supercomputers in
Supercomputing and Science
by William Kaufmann and Larry Smarr (Scientific American Books, ISBN 0-7167-5038). Kaufmann is a well-known astronomical writer. B
etween them, they've done a great introduction to why you need supercomputers. The graphics are stunning.
The desktop world and the supercomputer world are nearly unaware of each other at the moment; but that will change. Meanwhile, the Compaq workstation with dual Pentium Pro processors on my desk is more powerful than the Cray X-MP supercomputer of 1985. You may recall that a Hollywood consortium got a Cray to do
The Last Starfighter
. Now I've got a desktop system I could do that with. By 2000, I may have a machine that could do
Jurassic Park.
I'd forgotten just how much fun programming can really be.
I have two large projects, and I'm using two languages, Microsoft Visual Basic 4.0 and Borland Delphi 2. Delphi is enhanced Object Turbo Pascal. So far, I've done more with VB than Delphi, mainly because I have so many VB books, but this is going to be a great opportunity to compare the two languages.
They're similar in concept and in the mechanics of programmin
g, sharing such features as hiding local variables from the rest of the program and a top-down structure. The major difference is that Delphi is compiled, while there are more third-party enhancements to VB. Both are powerful and fun to work with. Of course, Microsoft recently released VB 5.0, and one day I may move one or both of my projects to that environment.
In both cases, the book to start with is the
Teach Yourself in 21 Days
volume.
Teach Yourself Delphi 2 in 21 Days
by Dan Osier (Sams, ISBN 0-672-30863-0) comes with the introductory version of Delphi, and with good reason.
Teach Yourself Visual Basic 4 in 21 Days
by Nathan and Ori Gurewich (Sams, ISBN 0-672-30620-4) is similar, well organized and laid out in a series of logical lessons, each with plenty of examples.
Neither book is sufficient. For some reason, all programming books overlap but aren't congruent. I don't know what to recommend as supplemental reading for Delphi. For VB, I have found Peter Aitken's
Visual Basic 4 Programming Explorer
(Coriolis Group, ISBN 1-883577-21-7) to be well done. In addition to the 21-day program described by the Gurewiches, it's worth doing a parallel effort in Aitken's projects. Finally, Mark Steven Heyman's
Essential Visual Basic 4
(Sams, ISBN 0-672-30771-5) cleared up several problems and isn't a bad reference. Heyman's book has the subtitle
All You Really Need to Know
, but that's not quite true, or at least it wasn't for me.
The problem with all these books is that the authors are so familiar with their subject that they leave out things they think obvious, but certainly weren't to me. Fortunately, what one thought too obvious to mention was generally covered by one of the others. Given VB, these three books, a reasonably good Windows 95 (Win 95) or NT computer, and some determination, I think anyone can learn to do quite sophisticated programs. The resulting code may not be either elegant or efficient, but that's not as important as it used
to be.
My first project is to take Roberta's reading instruction program
and move it from the Mac to Win 95. That's harder than it sounds, partly because the Mac version is written in SuperCard and the transformation to either VB or Delphi isn't all that straightforward. Mostly, though, it's because unlike Macs, Windows systems don't have acceptable text-to-speech programs. Macs come with a speech synthesizer that's spectacularly better than anything you can get for Windows. It's good enough to teach reading.
Since there's no acceptable text-to-speech synthesizer for Wintel systems, we'll have to record all the sounds using the Win 95 Sound Recorder. Roberta's phonics program uses the 1000 most common words in English (as well as quite a few others); this means Roberta will have to record each of those words as well as about a thousand sentences and blends. There's probably a better way to do it, but for the moment, we're making each of them a separate WAV file. I'm devising a nome
nclature scheme to make it easier to find the sound file we want when it's needed.
Including some 2000 wave-table recordings means the program will be on a CD-ROM and can be run only on a Win 95 machine with a CD-ROM reader and a Sound Blaster-equivalent sound card. The Mac version is distributed on floppy disks and is designed to run on the kind of low-end machines you're likely to find in classrooms.
One implication is I'll have to learn how to make CD-ROMs; given that we have two different read/write CD-ROM drives, I suppose that's no bad thing. Of course, once we bite the bullet and make all those recordings, we'll port it back to the Mac. While the Mac speech synthesizer is very good, it doesn't always get all the inflections right, and we've had several people object to using "talking computers." It will be interesting to see if there's a difference in results.
Most software publishers say that wave-table recordings of real speech work better for education than synthesized speech. I've
always questioned that assumption. Certainly voices count. Our tests show that using the harsher "Agnes" Mac voice gets better results than the far more pleasant and human-sounding "Victoria" voice.
However, when we use Agnes, we get such spectacular results from the synthesized Mac version -- an average of 1.5-year's growth in reading capability from three months of using the program -- that there's not much room for a wave-table-recorded program to make improvements. It would be wonderful if it did.
I generally go to the annual meetings of the American Association for the Advancement of Science.
It's where I find out what's going on in medicine, physics, astronomy, biology, climatology, and so forth. Of course, it's also a convenient way to learn the latest about using computers in the sciences, and generally there's at least one good session on the future of computing. However, I really go to find out the latest developments in those other fields.
This year, there were paper
s on everything from life on Mars, to theories of how the immune system works, to really good epidemiological evidence that if you don't smoke and you do eat lots of fruits and vegetables, you are unlikely to get cancer. (I asked about vitamins, and Dr. Bruce Ames of the University of California, Berkeley, pointed out that the same people who take vitamins are likely to eat lots of fruits and vegetables, so epidemiological studies aren't going to help with that one.)
The real conclusion is that we would be better off spending our money on diet than annually spending almost $2000 per American family taking the last carcinogens out of the air we breathe. In fact, spending half that on fruits and vegetables (and eating them) would reduce cancer by orders of magnitude over the effect of getting those last carcinogens out of the atmosphere. Ames told of the coffee-drinking scientist smoking a cigarette as he exposes a rat to megadoses of smog....
My second computer project, Sugarscape, comes from
a paper
given by Robert Axtell of the Brookings Institution. His presentation was largely a summary of
Growing Artificial Societies: Social Science from the Bottom Up
by Joshua M. Epstein and Robert L. Axtell (Brookings Institution Press/MIT Press, ISBN 0-262-05053-6). It's a report on using computers in "bottom-up" social sciences to simulate quite complex behavior with very simple rules. There's a CD-ROM version available with QuickTime movies of test runs.
Sugarscape starts simply. Consider a grid of 50 by 50 squares. Each square contains from zero to four units of "sugar." The grid is inhabited by 400 creatures represented by dots. The creatures live on sugar (and nothing else), consuming from one to three units per turn. These creatures can see from two to four squares in all directions, and they can move as far as they can see.
Each "year," the creatures are considered in random order, and when its turn comes, a creature looks in all directions, finds the uninhabited square
it can see that has the most sugar, goes there, and collects all the sugar in the square. It consumes what's needed to keep it alive; if it hasn't got enough, it dies. If it got more than it consumes, it keeps the surplus.
We need one more rule: sugar replacement. That can be either full replacement (four unit squares are instantly restored to four units, etc.) or partial replacement, such as one unit per year up to the square's starting level.
That's it. Fire it up and watch the dots move. With those simple rules, you get some pretty complex behavior. As you'd expect, the creatures with long vision and low metabolism do the best. You can simulate evolution by keeping the number of creatures constant: if one dies, it is replaced by another with random metabolism and vision. If you correlate vision with metabolic activity, you get a different result. Mostly, what you end up with is a hunter/gatherer society of immortals.
Now you can add combat. One rule might be that the creature with the mos
t sugar wins and takes the loser's supplies. You can add sexes with mating and inheritance, including the computer equivalent of chromosomes and genes. You can let them age and die. You can add a second substance so that commerce can develop. You can add cultures and education; and so on. Before you know it, with very simple rules you get very complicated "societies." I was fascinated when I heard the paper, even more intrigued when I got the book, and couldn't wait to start building my own Sugarscape experimental landscape.
The program isn't complicated. I have not used the actual Brookings program. I'm designing mine to make it easy to add rules I've thought of that Epstein and Axtell don't seem to have tried. Besides, it's fun to plan the program.
They did most of their work on a Mac. What I'm planning is a bit more complicated. It would probably be easier to do this on a Mac, but it will run faster on my Compaq workstation with dual Pentium Pro processors; besides, I have to learn VB and Delph
i to get Roberta's program running in Win 95. Both projects are taking longer than I like, but that's mostly because I'm also writing these columns, finishing two novels, and making several out-of-town speeches. It's a great life if you don't weaken.
I often find myself playing intellectual honeybee.
Sometimes it does some good. I'm getting Larry Smarr of NCSA together with Axtell with the notion that given supercomputers, they can build even more complicated societies with parallel movement rather than serialized random movement. They can also add many more creatures: NCSA is accustomed to keeping track of thousands to millions of stars in colliding galaxies, with stellar explosions, collapses to pulsars and black holes, and suchlike. You haven't lived until you've watched galaxies collide at a million years a second. But the real point is that with supercomputers, it's possible to go far beyond Sugarscape.
The social sciences haven't been very good at using computers. When Einstein
was asked why we knew so much more about physics than sociology, he said it was because sociology was much harder than physics. Physics thrived under analytical methods, reducing things to their simplest elements: a ball rolling down an inclined plane, a pendulum swinging in a vacuum; that sort of thing. When the same methods were applied to social sciences, they didn't work well if at all.
This was true at a certain level in physics. When you get down to the atomic level, the classic reductionisms don't work well. The best way to simulate some systems is to program and track every single element: millions of stars or molecules of fluid.
One of the NCSA models is a picture of Chesapeake Bay chopped up into thousands of small "cells" not all the same size. The Bay is a shallow layer of water over a thick layer of mud; mud flows, but not in the same way that water does. It's not hard to simulate what happens with each cell, but that cell will affect the ones around it. To watch the Bay as a whole, y
ou need a computer capable of keeping track of all those cells and their interactions; but with that model, you can look at the effect of big storms or taking all the water out of one of the feed rivers. They display all this in 3-D in the Cave.
Epstein and Axtell are taking the same approach to studying societies: build them up from individuals following relatively simple rules, let them interact, and see what happens. They have intriguing results from small models of a few hundred individuals, but computational limits make it more difficult to compute the interactions you'd get from simultaneous movement. (They get around this by letting the players act serially, but each "year" randomly chooses the order in which they act.)
With supercomputers, the "players" can act simultaneously. You can keep track of vastly many more of them. Finally, with the wonderful display techniques developed at NCSA, you'll have a better chance of spotting results. I can't wait for Smarr and Axtell to get together.
Having said that, there's still a lot of room for ingenious use of desktops here. Not only is playing with Sugarscape a fun thing to do with a computer, but who knows, you might make a real contribution to understanding human economics. If this intrigues you, get the Epstein/Axtell book. You'll love it.
David Em is our artist associate who works on high-end graphics.
He has our large test-bed Compaq workstation with dual Elsa video boards I described last month, as well as our new Mac. His report is too long for the column, but you can find it on the BYTE Web site. It's well worth reading. What David is working with would have been called a supercomputer a couple of years ago, but you can buy the whole system for $30,000 or less right now, and it will be half that within two years.
We now have two Compaq workstations. When it became obvious I'd never get David to give up the big Compaq, I wangled a second one. The big one is still in David's studio because he can actually make use
of its power.
Meanwhile, I have the Compaq Professional Workstation 5000, with dual 200-MHz Pentium Pro processors, 64 MB of main memory, a Matrox Millennium video board, and built-in Sound Blaster-compatible stereo sound. It can boot up in NT 4.0 or Win 95. Needless to say, it is wickedly fast in either.
I've been accused of being overly fond of my machines, and I suppose it's true. I've never had a computer without a name, even before networking required computer names. This one is Princess, and she's pretty wonderful. At the moment, she's set up next to Cyrus the Cyrix P166; love may be blind, but I have a rule against changing main machines without a lot of routine use of the new one. I'm writing this on Cyrus, but my program development is all done on Princess.
In Win 95 mode, Princess runs all the Win 95 games I know and the DOS games that run on anything else. Games are a good way to test driver compatibilities. In NT mode, I can run anything advertised as NT-compatible; in particula
r, VB works just fine, including calls to play WAV files. Some VB books don't cover sound at all, and it's not well described in the rest. In particular, although the
21 Days
book has a long discussion on wave-table sound, I don't believe I'd ever have learned how to include sound in a program from that book. Fortunately, it's easy enough when you learn how.
VB has no sound capability as such. Instead, you make calls to the Windows media control interface (MCI) by sending it messages telling it to open a wave-table file, play it, and close it again. There are at least two ways to do this. The method I used is described in Aitken's book. It's complicated enough that I won't describe it here; look under sound in the index. It works well, but one caution: this particular operation is extremely case-sensitive.
I continue to be in love with the Olympus D-300L digital camera.
It takes 1024- by 768-pixel pictures that look just gorgeous blown up full-screen on a good ViewSonic or
NEC monitor. They make huge BMP files, but JPEG compression cuts them down to size (about half a megabyte each), and they still look great. The lens is good, with good depth of field, and I get good pictures in far lower light levels than I thought I would.
I'm going to talk about the problems with this camera, but keep in mind that I love the thing.
First, there's no PC Card slot, meaning that you can't change "rolls" of film. Those who take a lot of pictures may find this important, particularly since it takes over 30 seconds to transmit each picture to your computer. You can squirt the pictures onto a laptop, but that takes time. On the other hand, you can erase any given picture right on the camera, so you're keeping only the ones you want. I never get a full 30 good pictures I want to keep before I have a chance to move them. On trips, I often carry a regular film camera just in case, but so far I haven't had to use it.
Second, it's fairly easy to run down the batteries. The D-300L is act
ivated by opening a slide that uncovers the lens. That feels very natural, and I don't often forget to close that slide; but sometimes when I put the D-300L away in my briefcase or shoulder bag, I accidentally slide the lens cover and thus activate it. At least once, I've found I had insufficient battery power to take pictures. The D-300L uses standard AA batteries you can find all over the world. After I replaced the batteries, I was pleased to see that the low battery warning comes on in plenty of time, and the camera disables itself before the power gets so low it loses any pictures already taken.
The D-300L comes with Adobe PhotoDeluxe software. It's all right, but if you're used to Photoshop, you'll hate PhotoDeluxe. On the other hand, it works, and it will output your picture in most standard formats, including JPEG. It's also a lot cheaper than Photoshop.
The neat thing about the D-300L is that once your pictures are saved on the computer, they're available as wallpaper, or you can put them
up on the Web.
You can also print your digital picture on the Alps MD-2010 Photo-Realistic Color Printer I've described in previous columns. The result probably won't be as stable as an actual photographic print, but it will be considerably cheaper (per copy, that is; you can get a lot of photos printed for the cost of the printer). The MD-2010 output is remarkably good, and so far we haven't noticed any fading despite being hung in normal light.
It's pretty clear that digital cameras are the wave of the future.
I'm also experimenting with Franklin Quest's Ascend coupled with the PalmPilot PDA.
It works quite well. The PalmPilot has a dock you attach to a serial port, and when you put it into the dock, everything synchronizes automagically. It's pretty neat. The real question with the PalmPilot, as with any PDA, is, will I carry it? I must have a peach crate full of neat PDAs. They all work, I got excited about each and every one of them, and then one day I noticed I hadn't c
arried it in weeks, and into the crate it went. We'll see if the PalmPilot escapes that fate. Meanwhile, I can't live without Ascend, which I use as my calendar, appointment book, task manager, scheduler, and diary.
The
book of the month
is Epstein and Axtell's
Growing Artificial Societies
. The
game of the month
is Blizzard Entertainment's Diablo, which is great fun for a single player, but it also comes with a way to hook up with others over the Internet to have multiple heroes in one dungeon. Next month, I'll try to get a running start on the piles of stuff that accumulate here. Wish me luck. Tomorrow, Niven and I go to the beach to blitz
The Burning City
, and our agent just called to say United Artists is buying
The Legacy of Heorot
for a movie. Hollywood money is like fairie gold, but we'll see.
Product Information
Ascend 97..................................
.$100.00
Franklin Quest Co.
Salt Lake City, UT
Phone: 800-877-1814
Phone: 801-975-9992
Fax: 801-975-9995
Circle 1026 on Inquiry Card.
Delphi 2....................................$ 99.95
Developer...................................$799.95
Borland International, Inc.
Scotts Valley, CA
Phone: 800-233-2444
Phone: 408-431-1000
Fax: 408-431-4122
Internet:
http://www.borland.com
Circle 1027 on Inquiry Card.
Diablo......................................$ 54.95
Blizzard Entertainment
Irvine, CA
Phone: 800-953-7669
Phone: 714-955-1380
Fax: 714-955-1381
Internet:
http://www.blizzard.com
Circle 1028 on Inquiry Card.
D-300L......................................$899.00
Olympus America, Inc.
Melville, NY
Phone: 800-347-4027
Phone: 516-844-5000
Fax: 516-844-5339
Internet:
http://www.olympusamerica.com
Circle 1029 on Inquiry Card.
PalmPilot Personal..........................$299.00
PalmPilot Professional......................$399.00
Palm Computing
Mountain View, CA
Phone: 800-881-7256
Phone: 408-848-5604
Fax: 415-968-9822
Internet:
http://www.usr.com/palm
Circle 1030 on Inquiry Card.
Professional Workstation 5000...............Call Compaq dealer for price
Compaq Computer Corp.
Houston, TX
Phone: 800-345-1518
Call local Compaq dealer
Fax: 713-518-1442
Internet:
http://www.compaq.com
Circle 1031 on Inquiry Card.
Visual Basic 4.0............................$ 99.00
Professional................................$499.00
Microsoft Corp.
Redmond, WA
Phone: 800-429-9400
Phone: 206-882-8080
Fax: 206-883-8101
Internet:
http://www.microsoft.com
Circle 1032 on Inquiry Card.
HotBYTEs
- information on products covered or advertised in BYTE
Jerry Pournelle is a science fiction writer and BYTE's senior contributing editor. You can write to Jerry c/o BYTE, 24 Hartwell Ave., Lexington, MA 02173. Please include a self-addressed, stamped envelope and put your address on the letter as well as on the envelope. Due to the high volume of letters, Jerry cannot guarantee a personal reply. You can also contact him on the Internet or BIX at
jerryp@bix.com
.