Well, really it isn't, but I felt inclined to begin this "write-up" on the other foot, as it were. After all, since this is merely a write-up (as opposed to a "paper", "term paper", or (heaven forbid) a "thesis"), it should be acceptable to undergo a reasonable amount of silliness over the course of this document.
Finally, what I have implemented: a Prolog backward-chaining expert system that will help backyard stargazers (of the naked-eye and binocular calibre) to identify (classify) exactly what type of astronomical object they're looking at. For instance, it could help answer the question, "Hey! What's that fuzzy thing in Sagittarius?" by going through a list of questions that will help it understand the situation. (Ideally, my expert system would reply, in a Mr. T voice, "It's the Trifid Nebula, Fool!" but it has yet to progress that far.)
It is my hope that my rule-based system will become self-aware after a certain number of runs, but this is not demonstrated in this paper. (Or rather, "in this write-up".)
About 13 billion years ago (probably), the universe may or may not have been created in an event that many people like to believe was something which has come to be generally known as the "big bang". This scattered all kinds of crap everywhere which eventually turned into people, slugs, birds, trees, automobiles, and David Hasselhoff. In addition, it created all kinds of nifty matter that condensed into stars, planets, galaxies (sponsored by the Force of Gravity), nebulae, comets, and Cary Grant.
Gazing around the sky, you can see many of these objects using your naked-eye or binoculars while engaging in an activity commonly known as "backyard astronomy" to us amateurs. Often times you will come across a fuzzy speck and your heart will miss a beat as you think to yourself, "I have discovered Comet Beej!" until you check your star chart and realize that you're simply looking at a globular star cluster in Hercules.
With this in mind, I've written an expert system that will help narrow
down the possibilities of what you're looking at so that I get a
good grade in this class people, um, get a better understanding
of what stargazing is all about and don't waste any of the good peoples'
time at the International Comet Registry with false discoveries.
There are a couple things that I ought to define before you see the source so you don't sit there thinking, "Beej just made all this up to look cool--I wonder what it means?" One is the magnitude of an object. In a nutshell, it's the brightness. Except it's not a nice normal scale that you'd hope for; see, the brighter the object, the lower its magnitude. Stars in Ursa Major are about magnitude 2, and the dimmest stars you can see with your naked-eye are magnitude 6 (or 8 if you hyperventilate pure oxygen for 10 minutes). Venus can be magnitude -4 at times, the moon -10, and the sun -22. The expert system considers "bright" to be brighter than magnitude -8.
The expert system also has a concept of "large". This means that the object appears to cover more than two degrees of sky. The moon covers 2.5 degrees. (You can cover the entire disk of the full moon with your thumb held at arms' distance--that's how small it really is.)
As an astronomical reference, I offer myself, as I have been stargazing since I was about 13 years old. But that's not all! Order now, and I'll also offer "Stargazing" by David Levy as a reference. Yes, from the guy who put the "Levy" in "Comet Shoemaker-Levy" (the one that crashed into Jupiter) comes a wonderful book with plenty of knowledge for my petite expert system.
Well, there are rather a lot, actually. (In the immortal words of Graham Chapman, "When I say 'none', I mean a certain amount.") There are none that I have found that cater to the amateur astronomer, as such, but there are plenty that have to do with data processing (http://www.stsci.edu/~miller/draco/draco-aldb.html). This is understandable, since astronomers must regularly deal with countless reams of data of all sorts: catalogs of 16 million stars, millions of galaxies, ephemerides of comets, planets, and asteroids, etc., etc. It could be said that astronomical information exists as an open universe in its own right, since it will continue to expand forever.
Not all such programs are so dull, however. There are expert systems that deal with scheduling Hubble observations (http://www.stsci.edu/apsb/doc/papers-and-meetings/93-Intelligent-Scheduling/spike/spike-chapter3.html). There's another that helps telescopes at SEASU Observatory align on target stars (http://www.math-science.sfasu.edu/mapserve/schoolscimath/physics/obs.htm). In a nutshell, there are tons of systems out there. None are as simplistic, however, as mine is.
The classes and subclasses of objects defined for the system are:
Each of the above objects has a set of basic attributes that uniquely identify it. These attributes (such as "fuzzy", "bright", or "moving") are what the user is queried on. By adding these user observations of the object as facts in the system, it can narrow the possibility of what an object might actually be.
?- itsa('spiral galaxy').
or could ask the program to hunt through everything it knows by querying:
?- itsa(X).
The itsa/1 predicate simply maps nice human readable strings to other predicated defined in the next section of code.
Welcome to SWI-Prolog (Version 2.7.20)
Copyright (c) 1993-1996 University of Amsterdam. All rights
reserved.
For help, use ?- help(Topic). or ?- apropos(Word).
1 ?- consult(astro2).
astro2 compiled, 0.02 sec, 13,376 bytes.
Yes
2 ?- itsa('inner planet').
Does the object appear to move against the stars? yes.
Does the object appear as a disk? yes.
Does the object ever appear as a crescent? yes.
Yes
3 ?- itsa('planetoid').
Yes
4 ?-
Notice that the results of the "inner planet" query have now determined that the object is a planetoid. Asking itsa('planetoid') now returns "true" no questions asked.
This next run demonstrates what might happen if a user were trying to identify the Beehive Cluster (Messier object 44--I told you they like to catalog everything), an open cluster in Cancer. (An open cluster is a loose gravitationally bound collection of a few stars within the plane of the galaxy.)
2 ?- itsa(X).
Does the object have a fuzzy appearance? yes.
Does the object appear to move against the stars? no.
Can you resolve individual stars in the object? yes.
Is the object a single point of light? no.
X = cluster ;
Is the object larger than 2 degrees across? no.
Does the object consist of more than 40 stars? no.
X = 'open cluster' ;
No
3 ?-
The final "No" is an artifact of the ask/asked relationship and how it is used to determine an attribute status. It would certainly be an improvement to get this to say "Yes" when it makes a possible identification.
The code can be optimized somewhat, as well. The questions are duplicated in the ask/1 and asked/1 predicates, and this could be removed. The itsa/1 predicate is in its entirety a redundancy which could be commutatively removed.
Finally, I believe that a more "proper" design (as only experience can teach) observed from the beginning could have eliminated the need for the asked/1 predicate all together, but that's probably destined to be remain more of a gut-feeling than a reality.
So, is the program really "good"? Well, let's not beat around the bush: it's pretty useless as it stands. It's more of a toy to examine expert systems than an expert system in its own right. I'd have to add a lot of rules and questions, and really describe each object type in detail. A special case to handle the Beehive Cluster would not be out of the question. As a teaching tool, well, maybe, but the type of amateur astronomer who already takes his computer out back to gather CCD deep sky images through his 6" Schmidt-Cassegrain has no need for this kind of program to begin with.
On this other hand, if the program were coupled with some kind of image analyzing software, it might be able to identify objects in a photograph, for instance. Of course, this would take some seriously tricky code to handle things like comets moving across the sky. I'll bet there are already systems out there to do this kind of thing (a supernova hunter comes to mind) but I can't locate any references.
In lieu of a conclusion, I'd like to add the following bit of logic from Douglas Adams' "Hitchhikers Guide to the Galaxy", as it is somewhat analogous to my mental processes while I was trying to wrap my head around this whole expert systems thing:
Now it is such a bizarrely improbable coincidence that anything so mind-bogglingly useful could have evolved purely by chance that some thinkers have chosen to see it as a final and clinching proof of the nonexistence of God.
The argument goes something like this: "I refuse to prove I exist," says God, "for proof denies faith, and without faith I am nothing."
"But," says Man, "the Babel fish is a dead giveaway, isn't it? It could not have evolved by chance. It proves you exist, and so therefore, by your own arguments, you don't. QED."
"Oh dear," says God, "I hadn't thought of that," and promptly vanishes in a puff of logic.
"Oh, that was easy," says Man, and for an encore goes on to prove that black is white and gets himself killed on the next zebra crossing.
Most leading theologians claim that this argument is a load of dingo's kidneys, but that didn't stop Oolon Colluphid making a small fortune when he used it as the central theme of his best-selling book, Well, That about Wraps It Up for God.
Meanwhile, the poor Babel fish, be effectively removing all barriers to communication between different races and cultures, has caused more and bloodier wars than anything else in the history of creation.