Download Herbal Tutorial - Applied Cognitive Science Lab
Transcript
The “MoveBlockToBlock” operator checks the top state to see if there are two clear blocks, and that the first clear block is not on top of the second clear block. If these conditions are satisfied, the first block is put on top of the second block. Creating these two operators in Herbal consists of instantiating two “herbal:Operator” objects and assigning them to the top state. The following steps describe this process: 1. Make sure the “Instances” tab is selected and expand the “herbal:HerbalClass” node, and then the “herbal:Production” node in the instances tree. 2. Create a new “herbal:Operator” object and assign the following attributes: Herbal:Name: MoveBlockToTable Herbal:Definition: Moves a clear block onto a clear table Herbal:Preference: Indifferent 3. Once the operator object is created, the next step is to create and assign the conditions that will cause the operator to be proposed. This is done by instantiating “herbal:Condition” objects. Each “herbal:Operator” object can have one or more conditions assigned to it. If more than one condition is assigned to an operator, the conditions are combined using a logical AND. Because the “MoveBlockToTable” operator should be proposed when a clear block and a clear table exists, we need to create a condition object that matches this situation. To create a new condition object, click on the create button (shown below in Figure 17) next to the operators “Herbal:Conditions” attribute: Figure 17. Creating a new condition. 4. When the new condition dialog box is displayed you should assign the new condition the attributes shown in Figure 18. Protégé Tip: Once again, when filling in the attributes you may need to arrange the forms in Protégé using the Protégé Forms tab. Don’t forget, you may also have to change the data entry control type to TextAreaWidget for fields that allow for multi-line text entry 18 9 May 2005