Last Modified 18 July 2005, except Overview corrected 23 March 2008

BOD Sheep & Dog Demo

Note:  This demo is being rewritten, but this page hasn't been much yet.  Apologies.  The Overview just below is correct though.  (March 2008).

Overview

This demo is intended to give you a feel for using Behavior Oriented Design (BOD).  Its created on top of the MASON agent-based modelling platform.  We have provided a sheep agent and a dog agent, and also the files to get a bunch of sheep and one dog to start up.  You can try to make the sheep and / or the dog smarter, or you can set out to create new agents by modifying the old ones, for example turning the dogs into wolves, or the sheep into deer.

First you need to have or install a copy of  BOD MASON, which will automatically come with this demo.  If you've done this, to run the demo:
Note that if you kept all the default versions of the files in, your dogs will be pretty dumb!  (So will your sheep, but sheep are dumb.)

Looking at what you have.

The first thing you need to do is have a look at the files you are going to be modifying.  BOD programs have two types of files:
The BOD specification strategy tells you that you should start from a high-level description of what  the agent does, then derive these.  That high-level description for our agents (note there are two types of agents!) can be found at the bottom of this page.

In your jyPOSH directory, you should see a directory called modules These are actually your behavior libraries -- there is a directory called "mason" that contains all of the behaviors that can be used in MASON simulations.

There are two java files, FlockingBehavior.java and HerdingBehavior.java, which provide the basic behaviors for Flocking and Herding, respectively. DogBehavior.py inherits from HerdingBehavior and defines the behavior for the sheep dog in the Simulation. PanicFlocking.py inherits from FlockingBehavior and adds panicking to the standard flocking behavior.
There are two POSH scripts to start you off. Sheep.lap and Dog.lap in the plans directory. You can edit these scripts, but it would be better to make your own copies and change those so that you can later see how your sheep or dogs compare to the original ones.

The format for the POSH plans is explained on the POSH web page.  There are also more examples there.

For a very elaborate POSH plan, have a look at the one in the bodbot directory -- this is for running under unreal tournament.

Suggestions for what to do

If you have watched the demo run for a while, then you probably already have a bunch of ideas for how to improve it!  But just in case, here are a few suggestions:


The Initial Decomposition

Sheep

Behaviors 

Dog

Behaviors

Wolf

Deer



page author: Joanna Bryson