Kevin Cecelski's AI Project
DOPE(Droids Occupy and Possess Earth)

Contents
Domain
Illustration
Methods
Conclusions

Domain

DOPE tries to emulate a human society and the struggles it takes to build its civilization. Yet, due to limitations that I did not see until later, DOPE, right now, attempts to build a specified building using a buddy that you dictate. The agents move around on a 6x6 map, that has certain obstacles(trees, lakes, etc). The agents must collect resources from specific structures and use those resources to build other structures.

The following is a diagram of the map as it stands now.(it can only
be altered inside the code right now):
 
   the agents are:
   pops
   charlie
   red
  
   the building needing construction:
   house
  
   places to collect resources:
   lumberyard - wood
   lake - water
   
      1     2     3     4     5     6
     -------------------------------------
     |lumbe|     |     |     |     |     |
   1 |ryard|tree2|     |tree3|house|     |
     -------------------------------------
     |     |     |charl|     |     |     |
   2 |     |     |ie   |     |     |     |
     -------------------------------------
     |     |     |     |     |     |     |
   3 |     |     |     |     |     |     |
     -------------------------------------
     |     |     |     |     |     |     | 
   4 |     |     |     |     |     |     |
     -------------------------------------
     |     |     |     |     |     |     |
   5 |tree1|     | red |     | lake|     |
     -------------------------------------
     |     |     |     |     |     |     |
   6 |     |     |     |     |     | pops|
     -------------------------------------


Illustration

Once you have loaded the program(project.pl) into the prolog interpreter, you can begin. (If you want to change aspects of the map, the code's documentation should make altering the aspects of the map easy.) Let's make charlie add some wood to the house(specified in the above section).

At the prolog query line type:

add_to_building(charlie, house, wood, w, S).
S will be the plan that charlie will use to bring the wood to the
house.
the output from this query is:

S = do(construct(charlie,house,wood,w),
    do(move(charlie,coord(4,2)),
    do(move(charlie,coord(3,1)),
    do(gather(charlie,wood),
    do(move(charlie,coord(2,2)),init))))) ? 
yes


If we want charlie to bring water to the house, we will query:
add_to_building(charlie, house, water, w, S).
 
with the output of:
S = do(construct(charlie,house,water,w),
    do(move(charlie,coord(5,2)),
    do(move(charlie,coord(4,3)),
    do(gather(charlie,water),
    do(move(charlie,coord(5,4)),
    do(move(charlie,coord(4,3)),init)))))) ? 

yes

To test other cases, we can use the other buddies nad change the map


Methods

The program itself uses situational calculus to find the buddies plans. This method allows us to keep track of where a buddy is and what he is doing in a particular time. The map is set up using a coordinate system. To avoid obstacles(such as trees and lakes), the agent is restricted from finding these coordinates as viable options to move. To bring a resource to a building, the agent must first be carrying the specified resource. Carrying a resource requires a buddy to move to a coordinate that is adjacent to the place where the resource is provided.(water at the lake, wood at the lumberyard). Once the agent is carrying the resource, it must move to a position that is adjacent to the destination building. The search for these solutions is depth-first(which provides for a horrible seek time), but I hope to refine this search in the future.


Conclusions

My goals at the beginning were lofty. I had hoped to have multiple agents working together to build a entire civilization. Yet I did not realize the depth of this domain. I had to restrict the domain, finally, to a single agent building a single building. Despite this restriction, I feel that I have a gained some understanding about the complexities of building a intelligent agent(Data).

This project was a very humbling
experience.