?

Log in

No account? Create an account

t3knomanser's Fustian Deposits

Homework

How Random Babbling Becomes Corporate Policy

run the fuck away

Mad science gone horribly, horribly wrong(or right).

Homework

Previous Entry Share Next Entry
IOCCC Original Winner
Part of my interest in Prolog has come about because I've decided to learn a bit about AI programming. Prolog is popular for that, although the book I'm using to learn from has more of an OOP bias. That book, by the way, is Artificial Intelligence: A Modern Approach. Good book, so far. The topics are broad primers for all the major areas of AI work, which is exactly what I was looking for.

In any case, this is my first major programming "assignment" out of the book. A basic environment simulator to house a simple reflex agent. A simple reflex agent is the simplest approach to AI one can take- look at the world around me and decide on an action to take. Simple reflex, because it doesn't have any memory, or take any steps to model the world. It just looks around and does something. It doesn't have any ability to formulate goals or even find an optimal path to its desired goal.

It's an interesting bit of Prolog code, and it really shows off many of the major features of the language. Heavy use of recursion, tail-call optimizations, and even a prolog-esque approach to making it vaguely object oriented. Lists, some basic IO calls. The whole kit-n-kaboodle.

I'm kinda proud of it, largely because this lays a decent enough framework for a lot of the future exercises from my AI book.
Powered by LiveJournal.com