Tuesday, March 24, 2015

Enigma Machine Week 1: Understanding Prolog, working with lists

(This was last week, but I was too busy to write a report)

So the work has began on my Prolog-based Enigma machine has began! Our programming language rotations in my course are roughly three weeks, so I'm doing my best to ration my time appropriately. Most importantly, I used the opportunity over spring break to get familiar with Prolog as a language, and I'm incredibly interested in its unique philosophy as well as its fascinating history.

You see, Prolog is what is considered a "fifth-generation language", a family of languages built around logic and placing constraints on a pre-programmed knowledge base. This can be an initially difficult concept to understand when comparing programming languages, but upon beginning Prolog, you'll see that the language is centered around the idea of "unification", or attempt to unify, or equate two values. This may seem simple, and even limiting, but it grants the programmer many possibilities and approaches that weren't possible with other languages. Unfortunately this comes at the cost of having to think in a completely new way, which will initially require a lot of your time. You'll find yourself 'creeping back' to your procedural ways, but you must resist the call, learning new techniques to satisfy any conditions you need to meet. While it was frustrating, it was such a brand new experience that I found it very satisfying, like some ethereal challenge set before you that you can only use your own wit to solve. I'm considering keeping this language around as a mental workout and for more logic-driven applications.

Prolog has an interesting history as well, being, in my opinion, brought into a world that was not yet ready for it in the 1980's. This was the time when computer technology was really beginning to explode, and we began to get really ambitious. Artificial Intelligence started becoming a mainstream source of fiction, and robot partners to help us fight crime seemed like the future reality, not unlike flying cars in the fifties. That being the situation, many started pumping all sorts of cash into technologies like Prolog. In particular, there was a fascinating 10 year long endeavor in Japan to build a powerful computer to take the throne from the west, known as Fifth Generation. It had a budget of over 400 million dollars and was constructed almost exclusively in Prolog. Sadly, the project was largely considered a failure, other than the fact that it helped foster a generation of Japanese computer scientists. The archives are still available, though the English translation leaves much to be desired.

While the future of Prolog is uncertain, I feel that the computational climate of today is much more hospitable to the Prolog philosophy than the 1980's. We live in an era where Artificial Intelligence courses are readily available, and staples of AI like neural networks are becoming more engrained in our curriculums and hobbies. I can't speak for everyone, but I would enjoy seeing the practical side of Prolog in the context of AI, and see where it could go with today's technology.

While this writing wasn't too helpful for approaching Prolog, I'll include my tips for the course, as well as insight into the predicates and rules I've developed. I apologize ahead of time for my misuse of Prolog terms!

No comments:

Post a Comment