A Simple PathSearching Agent

I’ve recently started working on Intelligent Agents. I chose to work with Java because I’m more confortable with object oriented approaches and there’s more AI literature based on Java than any other language.

As a beginning, I chose an exercise in AIMA and implemented it in Java. The framework of the Agent and its Environment is based on Ravi Mohan’s code. (I did have to make a few minor changes to make it work for me.)

The agent works in a dynamic environment and is not given full information regarding the environment. It has to keep track of known hurdles and update them based on the percepts passed to it as it moves around. It uses A* search strategy for calculating the path.

The architecture is capable of accomodating more than one agent but as of now, the environment has only one agent.

Download the JAR from here and the full source code from here. You need JDK/JRE 5.0+ to use both of these.

6 thoughts on “A Simple PathSearching Agent

  1. The changes I made were basically these:
    – I changed the Action in search to be an Object instead of a String. (And propagated the changes to relevant places)
    – I changed the equality testing in GraphSearch because it didn’t seem to be calling the child class’s “equals” function. (Polymorphic call wasn’t working.) I did a fairly adhoc fix. Just to get it running.

    These changes were made for my own needs, so I don’t think it’d be a good idea to submit the code to AIMA codebase.

  2. My pleasure. The code was very helpful and I’d be glad to help in any way possible. It’s just that the changes I made were for a specific purpose and thus won’t be very useful for general purposes.

Comments are closed.