Step 2: Entering observations and occurrences of actions


After the setup has been completed, the control windows are visualized.


The next step is to specify the initial state of the domain. We do this by entering observations. The domain file that we loaded in the previous section, 3bulbs-plan-diag.dmn, describes an electrical circuit consisting of 3 switches and 3 bulbs. Switches and bulbs are numbered from 1 to 3, so sw(1) denotes switch 1, b(1) denotes bulb 1, etc. Each switch controls one bulb, as shown in the circuit schematic.

Click to enlarge

Clicking "Set Observations", in the History Window, will bring up the Enter Observations Dialog.


The left column lists all the fluents defined in this domain. Each fluent describes a relevant property of the domain. For example: if on(b(1)) is true, bulb 1 is on; if up(sw(1)) is true (resp., false), then switch 1 is up (resp., down); finally, if ab(b(1)) is true, bulb 1 is malfunctioning.

The right column shows the observed value for each fluent. Initially all entries are empty, which means that no observations have been entered. Let us add the observation that ob(b(1)) is false by clicking on the row containing ob(b(1)) and then clicking on "Set False". The right column now contains "false" on the row where on(b(1)) is.

Typically, one specifies only those observations which are true, and then makes the system apply the Closed World Assumption (CWA), which says that whatever is not explicitly stated should be assumed to be false. You can click "Apply CWA" to apply the Closed World Assumption. The dialog should now look like this:


This tells the APLAgent Manager that, initially, all switches are down and all bulbs are off and intact. Clicking on "Close" will take us back to the History Window.


The contents of the History Window is read as follows:

Clicking now on "Set Occurrences", in the History Window, will bring up the Enter Observed Occurrences of Actions Dialog. This dialog is similar to the one we used to enter observations. The left column lists all possible actions. For example: brk(b(1)) is the action that occurs when bulb 1 breaks; flip(sw(1)) is performed by the agent to invert the position of switch 1; repair(b(1)) is performed by the agent to repair bulb 1. The right column is empty because no actions have been observed to occur so far. "Set True" can be used to enter observations on the occurrence of actions. For the time being, though, we will not specify any occurrence of actions. Just click "Close" to close the dialog and go back to the main window.



You completed this section. Click here to move to the next section. You can also go back to the main page.