CAT Manual

 

1.     The CAT Interface

This is the CAT interface. It is located to the right of the 3D window. It contains the following sections:

 

1.6 Target Control

 

1.5 Behavior Control

 

1.4 Weapon Control

 

1.3 Entity Control

 

1.2 Entity Information

 

1.1 Network Management

 

 

1.1.  Network Management

This section manages the playing, pausing, stopping, recoding, and playing of behavior networks. ItÕs exact behavior changes depending on whether you are recording a network or playing on back.

 

1.2.  Entity Information

The section shows the current entity that is being controlled as well as its position, damage, heading, and speed. Through this interface, you can also lock the camera into position behind the entity or let the camera roam free. Also, you can select a different entity to control.

1.3.  Entity Control

These two controls allow you to change the entities desired heading and speed. When changed, the entity will slowly move to match the values entered here. When a controller is playing or a behavior is active (see below), these controls will instead show the entities desired heading and speed and cannot be changed.

1.4.  Weapon Control

This allows you to select what weapon to fire with and to turn firing on and off for your select entity. As of right now, each entity only has the default selection of weapons, but in the future will be expanded to include more.

1.5.  Behavior Control

This is a sequence of panels accesses through two drop down choice lists. The selected behavior can be activated and will start to control the boat. Some behaviors can be active at the same time as others, while some behaviors are mutually exclusive. See the Section 3 for more information.

1.6.  Target Information

The sections shows the heading and distance the selected target. Also, you can change the target of the selected entity through this as well.

2.     Manual Control

Manual control only works as long as there are no active behaviors and there is no playing network. If there are active behaviors, switch to the active behaviors and turn them off. If there is a playing network, press the stop button at the top of the GUI.

At any time, whether you are in manual control or not, you can switch entities and turn on or off camera watching.

2.1.  Selecting an Entity to Control

First press the select button. It will turn blue to indicate that you are now in selection mode. The next entity you click on in the 3D windows will be come the selected entity.



When an entity is highlighted in the 3D window, make sure that it is the ship that you want to select down below in the SP interface. The fields listed are from top to bottom are its unique simulation ID (this is what is displayed in CAT), the type of the entity, itÕs current damage, and entityÕs name.

         

When you click, that entity is now the controller entity and the blue highlighting goes away.



2.2.  Selecting a Target

First press the select button. It will turn blue to indicate that you are now in selection mode. The next entity you click on in the 3D windows will be come the new target.



When an entity is highlighted in the 3D window, make sure that it is the ship that you want to select down below in the SP interface. The fields listed are from top to bottom are its unique simulation ID (this is what is displayed in CAT), the type of the entity, itÕs current damage, and entityÕs name.

         

When you click, that entity is now the controllerÕs target and the blue highlighting goes away.



2.3.  Controlling the Entity

Controlling is a simple process. To change the desired heading, turn the knob to until the direction points where you want to go. To change the desired speed, move the slider to the speed you want. When you make your change, the entity will slowly change to match those settings.



2.4.  Watch an Entity

When the watch button is pressed (the binocular button), the camera will switch to behind the entity CAT is controller. If you select a different entity, the camera will move to the new entity. If you click the free camera button (the binocular with red X button), then the camera can move freely.



3.     Behavior Control

Using behaviors is a very simple process. There are two drop down lists. The top drop list are the top level behaviors. Of interest in this list is the Movement choice and the Avoid Choice.



In this drop down, you can see the current status of the different top level behaviors. If you activate a behavior, it will show as such here. ÒMovementÓ is special because will show which movement behavior is currently active, if any. Avoid is also unique because it currently will no show the status of itÕs behaviors.

If you select the ÒMovementÓ choice, a new drop down list will appear. This will allow you to select whichever movement behavior you wish. Take note that only one movement behavior can be active at a time. This is because it is impossible to both approach and retreat at the same time. If you activate a behavior with another one on, that other on will turn off.



If you select the ÒAvoidÓ choice, a different drop down list will appear. Right now only Avoid Entity will work as there is no land in Lagoon yet. When Avoid Land becomes active, these can be on at the same time.



After you have chosen a behavior to activate, activation is a simple matter of pushing the ÒActivateÓ button. The interface will change to reflect your choice. Afterwards, press ÒDeactivateÓ to turn the behavior off. Each behavior has a set of control to fine tune how it acts. See below for detailed information on how each one works and its controls.

3.1.  Working Behaviors

Only certain behaviors are implemented right now. These are discussed below.

3.1.1.     Maintain

The Maintain behavior will try to keep a certain bearing and/or distance to the selected target. This exact bearing and distance is determined when you activate the behavior. Bearing and range each have a check box and a slider.

The checkbox will tell the behavior if it should maintain that value. For example, turning off the bearing checkbox will let the entity move in a circle around target.

The slider determines the tolerance in keeping the value. For bearing, the slider is in degrees and the range is in meters. In the picture below, the slider value 100 for range means that behavior will keep entity within 100 meters of the distance when you turned the behavior on. If you turned the behavior on 5000 meters from the target, the behavior will stay between 4900 and 5100 meters.

If the target starts moving, the behavior will try to keep the same relative position to the best of its ability.



3.1.2.     Approach

The Approach behavior will steadily move towards the target until its inevitable collision with the target. ItÕs usually wise to choose another behavior before this point or turn on Avoid Entity before this point unless a ramming attack is what is desired. By default, Approach will work at any bearing, but if certain bearing is desired, check the checkbox and choose the angle with the slider beneath it. The last slider sets how fast the behavior will approach the target.



3.1.3.     Retreat

Retreat works much the same way as Approach except in the opposite direction. The sliders and checkbox have the same functionality. The world in Lagoon is quite large and it is best to turn off this behavior before the entity drives to far out. The only way to move that entity back into the central area is by driving it and even with accelerated time that can take quite a while.



3.1.4.     MoveTo

The MoveTo behavior will move the entity to a desired point in the world. When you activate the behavior, the point will default to the point the entity is currently located. To choose a new point, simply type it in the two text fields. The slider will adjust how close it needs to get to that point for success. The slider value is in meters.

The Random checkbox makes the behavior choose a random point when the behavior is activated. Also, if this behavior is used in training a new Behavior Network (see Section 5), when this behavior is played back a different random point will be chosen each time the behavior is run. The Random Point button will cause a new random point to be selected right then and the entity will start moving towards it.



3.1.5.     AvoidEntities

The AvoidEntities behavior has two stages of operation based on how close an entity is to it. If an entity is with in the panic range, AvoidEntities will push away at the speed given on a line directly away from that entity. If the entity is outside the panic range but inside the effective range, it will still push away, but at a lesser degree and will keep more to it desired heading. Both of these ranges can be selected through the top two sliders. The speed slider will set the speed at which the entity will try to move away.


3.1.6.     Stop

The Stop behavior is unique in that it is just a button and will pause all the behaviors except the avoid behaviors and the fire behavior. Those three behaviors have to manually be turned off. When the button is pressed again, those behaviors that were paused will be started again. While the Stop behavior is running, it keeps a timer. If used in a Behavior Network (see section 5), this behavior will stop for the length of time it was used while recording. If the time rate is increased, this will be reflected in the Behavior Network.



3.1.7.     Fire

The fire behavior turns firing of the entities weapon on and off. The drop down box allows you to choose that weapon. As of right now, each entity only has a default set of weaponry and this drop down only has one choice. In the future, there will be options such as choosing between an RPG and a Machine Gun. The Fire button is what actually turns firing on and off.



3.2.  Non-working Behaviors

As of right now, some behaviors have not been implemented but are in place for future expansion. This section briefly describes these behaviors.

3.2.1.     Formate

The Formate behavior will be in charge of keeping entities in formation. The nature and rigidness of these formations will be specified here.

3.2.2.     Wander

The wander behavior will be to add a random factor to other active behaviors. By itself, it will dart around randomly. With Approach, for example, it will move from side to side and slow down and speed up while getting closer to the target.

3.2.3.     AvoidLand

When Lagoon has land, this behavior will be in charge of avoiding it it much the same fashion as AvoidEntities.

4.     Behavior Network Management

There are two ways a network can get started, either manually through CAT or through using SP. Whichever way that it gets started, there a few things that you can then do with that running network. Whenever a network is running, the drop down box is locked onto the currently running network.

4.1.  Running a Network

If the entity doesnÕt currently have a Behavior Network attached to it, then you can select one from the drop down list and press the play button. The Behavior Network will then be attached and allowed to run and you will lose manual control of the entity.



4.2.  Pausing a Network

When a Behavior Network is running, you can press the pause button, and the network will be paused. You can then manually control the boat.



When you are done, you can press the Play button to resume the network where it left off. Additionally, you can press the Stop button to stop the network (see below)

4.3.  Stopping a Network

Whenever a Behavior Network is running and you push the stop button, that network is halted and is removed permanently from the entity. If you push play, that network will then start fresh from the beginning.



5.     Training Behavior Networks

To Record or Train a Behavior Network is an easy process over all but due to the occasional bug or design issue, it can be a challenge to get just what you want. While training, CAT records the state of all active behaviors and pieces them together in a form that allows those behaviors to be played back dynamically. This means that if entities are in different positions or obstacles are different, the goals and general plan of meeting those goals will still be met.

5.1.  Recording

Recording a new network is simple. In the drop down menu, choose Ò< new >Ó and the press the record behavior.



At this stage it is recording. When recording, be sure to only use behaviors to control the boat. Any manual control will be lost. Also, if you need to stop the boat, donÕt deactivate all the behaviors, instead press the ÒStop AllÓ button and when you are done press the button again, renamed ÒResumeÓ. Using this button puts and explicit stop instruction in the network. Without it, you would immediately transition from the previous behavior to whatever next behavior was activated. When you are finished, you can either save the network or discard (stop) the current network.

5.2.  Extending

Extending a network is the process recording an additional path onto an existing network.  For example, say that you want a network that attacks a entity unless the target queries the attacker. You would first record the network without the query and then extend the network by recording a new one where the target queries and the attacker retreats. To extend a network, select the desired network from the drop down list and press record. Like recording, you can either save or discard (stop) the network.



5.3.  Saving

What happens when you press save depends on whether you are creating a new network or extending and existing one. If it is a new network, a dialog box will appear asking for a name and a filename for that network. If you specify a filename of an existing network, it will ask if you want to overwrite it.



If you are a extending a network, it will simply pop a dialog box informing you that the existing network was extended with the recorded data.

5.4.  Stopping

Stopping the network will cause the recording to be stopped and whatever data that was recorded to be discarded. There is no warning when this is done, so use this button with caution.

6.     Appendix: Behavior Network Master File

This file is located at date/cat/networks/master.xml. There shouldnÕt even be any need to edit this file manually, but at times this might be necessary if you desire to remove a network from CAT or change itÕs color in SP. The file is simple example would look like this:

<networks>
      <network name=ÓAttackÓ file=Óattack.bnÓ colour=Ó#0000FFÓ />
<networks>

Each network in CAT is a single tag. The name attribute is simply for human readability and can be anything. The file attribute is the actual file describing that network and should be in the same directory as master.xml. The colour attribute is the color used for display in SP. The British spelling of colour is important. The attribute can either be a color name or a hexadecimal formatted string describing the color.