Scenario Editor

The Scenario Editor is a graphical interface that allows a user to create objects in categories, and to assign values to those objects' attributes, in a dynamic web form interface.

The Scenario Editor is perfect for testing your encoding by quickly generating fact scenarios and seeing if they behave as expected.

Controlling Access to Scenario Editor

If your project is not published, only the owner of the project will be able to run the Scenario Editor from inside the test interface. If your project is set to published in the Rule Editor screen, the scenario editor for all of your tests will be available to unauthenticated users.

To allow users other than yourself to use Scenario Editor with your encoding and tests, you must set the Project to "Published".

Starting Scenario Editor

Scenario Editor Button

To start the Scenario Editor, click on the "Scenario Editor" button in the test editor screen.

You will be taken to a user interface with a button bar across the top, followed by a set of tabs for "Facts", "Answers", "View" and "Devel".

Scenario Editor Interface

Buttons

Scenario Editor Buttons

The buttons available in the Scenario Editor interface are:

  • Run - this runs the test with the currently defined fact scenario, and displays the answers.
  • Help - opens the Blawx documentation in a different window
  • Exit - Closes the Scenario Editor and returns you to the test editor for the same test.

Fact Scenario Editor

Fact Scenario Editor Interface

The main interface in the scenario editor page is the fact scenario editor form, which can be accessed by clicking on the "Facts" tab at the top of the interface.

The form consists of a list of facts, an "Add Fact" button, and a "Save Default Fact Scenario" button. Facts are displayed in a bulleted list, followed by a lock icon if they were provided by the code, or an "X" icon if they were provided by the user and can be deleted. Clicking on the "X" next a fact deletes it.

All facts and displayed using the natural language representation that was specified in the category and attribute declaration blocks.

Adding Facts

When you click on the Add Fact button, you are given a list of statement types that are available to make.

Add Fact Menu

When you click on a statement type, a form for creating a statement of that type is displayed.

New Value Form

When you choose to create a new value, you will be allowed to choose the object from a dropdown list. In this list you can also choose "any". If the attribute type is a data type like duration, you will be shown a form for entering the duration. If the attribute type is a category, you will be shown another dropdown.

The new statement form also has a "type" field, which allows you to choose "true", "false", or "unknown."

This combination allows you to specify a wide variety of certainties and uncertainties about your fact scenario.

If you choose to create a new object, you will be given a field in which to type the name of the object. Beside that field there will be a checkbox, which can be used to instead use "any object" in place of the name.

Unground Object Statement

Relevance

If you have "unknown" statements, and click Run, the scenario editor will display all the answers that the reasoner can derive using the facts and assumptions about unknown statements. It will also use that information to figure out what additional data would result in an answer to the test question that does not require additional facts or assumptions.

Those additionally relevant statements will be listed in the Fact screen after you click "Run".

If a statement is "unknown" in your facts, and it does not appear in the "Relevant Statements" list, adding information about that statement cannot help find a non-contingent answer to the question.

Note that relevance is only calculated for statements that are listed as "unknown".

Answers

The answers tab of the scenario editor will display answers that Blawx can find, with all the explanations for those answers. Unlike the Test Editor, answers in the Scenario Editor are formatted in paragraph style. If there are reasons for a conclusion, they are listed as bullet points. You can open up a paragraph explaining each reason by clicking on the "How do we know?" link, which looks like this:

How do we know? Link

The answers tab will be displayed automatically when you click the "Run" button, or when you click on the "Answers" tab at the top of the interface.

Note that if answer can be found by making assumptions that you allowed for by "unlocking" categories and attributes, all those contingent answers will be included, also. You can see which answers are contingent by looking to see whether there are parts of the explanations that indicate the reason was assumed.

ChatGPT-Generated Summaries

If you followed the instructions for providing Blawx with your OpenAI API Key, Scenario Editor will attempt to obtain AI-generated summaries of the details inside each explanation for an answer, and display that summary at the top of the explanation and provide the standard tree-structured explanation in a collapsable area beneath the summary. The summary will be prefaced with a warning that it was generated by a generative AI.

View

The View tab of the scenario editor gives you the ability to customize the Facts tab by hiding various elements from the display. You can hide categories and attributes. They will be hidden from both the fact list and the Add Fact menu.

View Tab

If you are the owner of a test, you will have the option of clicking "Save View" in the View tab, which will make the current view the default for the scenario editor interface for that test. This can be used to simplify the Scenario Editor interface and display only the fields that are relevant to a test.

Tips

Having a large number of unknown fact statements can cause your questions to be answered more slowly. If you find that questions are taking too long, try reducing the number of unknown fact statements you include in your scenario.

Known Problems

  • The Blawx reasoner cannot hypothesize with unknown objects if you are using object disequality blocks. Answers will not display and relevance will not be calculated unless you create concrete objects, and set their attributes to unknown.

Selecting From Categories

When setting the value of an attribute that has a category as it's type (for example, "friend" might be an attribute of a person, and also refer to other persons), the interface will allow you to choose from the objects that already exist in the target category. To refer to an object, it must be included in the category first. So for example, if you want to say that jason and june are friends, you must first create both jason and june in the category "person", and then in the "friend" attribute of june, add jason as a value.

Duplicate Values

The Scenario Editor will allow you to add as many values as you like to an attribute, including duplicate and contradictory values. Duplicate values do not have any meaning to the Blawx reasoner. It treats your fact scenario as if each value occurred only once. Contradictory values may cause no answers to be found.