Artifical Intelligence vs. Machine Learning
This course is about programming and artificial intelligence. Depending on what school you're at, AI could mean robots, neural networks, game playing, etc.
Many equate AI with machine learning (ML). ML refers to a large number of approaches to finding patterns in input data. The goal may be to discover clusters of "similar" data together, where the definition of similarity is part of what's learned. Or it may be to take a large number of examples of classified data, and learn "rules", often in the form of weighted parameters, to do the classification.
Here are two toy ML-based apps. Both use the BrainJS library.
- Digit recognizer -- a handwritten digit recognizer (109 samples for 10 digits)
- UCI Zoo classifier -- a feature-based animal classifier (99 samples for 7 animal types)
Machine Learning has been very successful in the past decade for many tasks, such as image classification, speech processing, and motor control, thanks to new algorithms and a quantum leap in the amount of data available for training.
But these tasks are just a subset of the AI problem. Picking a response for an input does not provide a model for dialog, learning while reading, learning from one or two examples, or doing chains of inferences.
Course Topics
This course is about various approaches AI developers have created to handle those other AI tasks:
- designing and implementing intelligent components using symbolic knowledge representation
- using and sharing semantic knowledge over the web
- developing tools for authoring the knowledge needed by such systems
- doing it all with maintainable code
In particular, the main topic areas of this course are
- symbolic knowledge representation techniques using Common Lisp and JavaScript
- JSON-based methods for knowledge interchange
- solid general software engineering practices

Symbolic Knowledge Representations
This includes
- deductive logic to implement symbolic inference and problem solving
- frames to represent real world concepts
- Semantic Web knowledge exchange technologies such as RDF and OWL
The Intelligent Web
More and more software applications these days live on the web. Even most native mobile applications depend on back-end servers for persistent data storage and user to user communication.
As the cartoon says, on the Internet, nobody knows you're a dog. Or an AI. Machine translation services, chatbots (both helpful and nefarious), home assistants like Alexa, are all intelligence on the web.
Part of being on the web is increasing decentralization. Monolithic applications residing on one server are being broken down in microservices running separately somewhere "in the cloud". The Semantic Web is a long-standing effort to decentralize knowledge, the same way text, images, and data have been decentralized.
We'll explore building some simple examples of getting knowledge from the semantic web, and connecting intelligent clients and servers together.
Software Development
This is also a course on software development. The course is made up many exercises and challenges. Your solutions will be evaluated on three classic criteria:
- correctness-- does the code do what it's supposed to?
- efficiency -- does the code run fast enough?
- clarity -- is the code easy to understand?
Of these, clarity is more important than correctness or efficiency:
- Clear code can be corrected.
- Clear code can be optimized.
- Unclear code is hard to impossible to correct or optimize.
This is why the local Lisp Critic and online Code Critic are central to this course. They are all about learning to write clear code. The principles apply to coding in any language.
Programming vs AI Programming
AI Programming emphasizes concepts and coding techniques not usually encountered when doing common application development or systems programming.
Programming | AI Programming |
---|---|
numbers | units, measures |
strings | symbols, concept hierarchies |
arrays | trees, graphs |
key-value objects | frames, triples |
dates | events, temporal relations |
=, <, > | similarity, pattern matching |
loops | recursion, search (breadth-first, depth-first, best-first, ...) |
imperative programming | functional programming, declarative programming |
This list does not include the concepts and techniques relevant to machine learning. There are other courses for that.
Something I hope everyone will learn is that these ideas and techniques can be applied everywhere. What program couldn't be improved by a little intelligence?
Testing
Critical to correct code is testing -- lots of it. This has been known since programming began. Unfortunately the traditional development process was to get the requirements, design a solution, implement, and test. This meant that testing always occurred at the end, when the project was late, time was short, pressure was high to deliver, etc. As a result, most code has been delivered with little or no testing.
In a brilliant move, modern agile development turned this process on its head: tests are written -- and run! -- as part of the requirements development process. Test-driven development is a simple idea with major impact. It takes a while to get used to it but once you do, you'll never feel secure about writing code with no tests.
For this course, you will use the lisp-unit package to test your solutions to the Lisp exercises. You will use the CS325 JavaScript Tester to test your solutions to the JavaScript exercises. Virtually all the book and AI exercises have tests your code must pass before being submitted.