What is Hank?
Contact us
Hank Cognitive Modelling Environment
The Open University

A Hank model: Is John cultured?

The model described here is not very cognitive but should help you to understand the main features of Hank. The link at the bottom of this page allows you to download the described model and try it for yourself. The main features we will describe are: fact cards, questions, instruction cards, variables and storyboards.

Fact cards are what we use in Hank to represent factual information (see figure 1). These adopt a familiar table structure, used in spreadsheets. The first row is the name of the table (shown in dark grey). The second row gives a label for each individual column (shown in light grey). The remaining rows (called data rows) each represent a related set of symbols. Two fact cards are shown in figure 1. The fact card on the left describes which people are liked, and by whom. For example, the first data row represents that John likes Pavarotti, and the second data row represents that Susan likes Bob Dylan. The fact on the right can be read as Pavarotti sings opera and Bob Dylan sings folk. Fact cards can have any number of columns and any number of data rows. To make a fact card within the Hank environment, select "New fact card" from the "Cards" menu.

Figure 1. Hank fact cards.

A question can be asked against a fact card. A question tries to match against one of the data rows. A question has dashed lines and no shading. Whenever we ask a question, Hank gives us a reply, which is either ‘Status = OK’ or ‘Status = Fail’. ‘Status = OK’ is Hank terminology for ‘yes I found it’, and ‘Status = Fail’ means ‘no I did not find it’. For example, if we ask the following question (in English 'Does Jenny like Peter?'):

the reply would be:

Status = OK

If we ask the following question (in English 'Does Bob Dylan sing opera?'):

the reply would be:

Status = Fail

You can create a question by selecting "New user query" from the "Cards" menu. You can ask the question either by double-clicking on it, or by selecting it and choosing "Ask briefly…" from the "Ask" menu.

Hank also provides instruction cards (see figure 2). An instruction card represents a procedure that can be used to work something out. The top part of the instruction card, above the double horizontal line, is called the wish box. The wish box defines the goal of the instruction card. In this case the goal is to find out whether a person is cultured. The instruction card defines a person as being cultured if they like someone who sings opera. The bulk of the instruction card, below the double line, is called the process box. The process by which the goal can be achieved is defined in this box.

Figure 2. Hank instruction card.

In Hank, variables start and end with a question mark. A variable is an empty slot that can acquire a value while the model is running. The wish box contains the variable ?Who?. This will match against the person fitting the definition of being cultured. The process by which someone is defined as being cultured is represented in the process box as a set of questions. The process begins from the top left hand corner of the box. The first step finds out who the person likes. The ?Who? variable as well as appearing in the matching box, also appears in the first column of the likes question in the process box. This means that the cultured person is the one who does the liking. The person who is liked is stored in another variable called ?Other?. The 'Likes' question is joined to the 'Sings' question by an OK arrow. If an answer is successfully found for the 'Likes' question then the next question can be tried. Other kinds of arrow can be used. For example, a Fail arrow is followed if an answer to the question cannot be found.

The second question determines whether the person who is liked does sing opera. The ?Other? variable is used in the first column to indicate that the singer must be the person who is liked, determined in the first question. The second column contains a value rather than a variable, as the person must be an opera singer.

A question can also be asked against the wish box of an instruction card. For example, the question (in English 'Is John cultured?'):

Would give the reply:

Status = OK

Instruction cards be created by selecting "New instruction card" from the "Cards" menu. Questions can be added to the process box of an instruction card by selecting the instruction card, and then choosing "New question box" from the "Cards" menu.

Storyboards are a form of comic strip notation used to indicate the serial order of processes and show their causal relationship. The storyboard representation of the execution is shown in the Workspace window (see figure 3). The storyboard below visualises the execution for the instruction card presented above. The storyboard unfolds both sideways and downwards, providing a scalable overall perspective on the execution. Using the storyboard, you can run through the program until something unexpected happens. You can then double-click on the storyboard cell to go to the related part of the model. You can see the storyboard representation of your model running by selecting the question and choosing "Ask in full…" from the cards menu.

Figure 3. A Hank storyboard.

Download the model cultured.hnk (you may need to right click on this link, and choose "Save Link As...")

To get a copy of Hank go to the Downloading Hank page.