Skip to main content Skip to navigation

Empirical Modelling for the Single Agent

Lecture 2: Empirical Modelling for the Single Agent

[Formerly lecture M5 on the MSc Module EM for Concurrent Systems]

The aim of this lecture is to elaborate on two ideas introduced previously (see A Perspective on Concurrent Systems ):

  • concurrent systems are created in the mind of the external observer;
  • we can construct models to animate the view of the external observer.
  • The main emphasis will be upon a particular illustrative example: the use of Empirical Modelling techniques to construct a model for OXO-like games (cf. [1] and consult ~wmb/public/projects/games/OXO/PPIG/, ~empublic/projects/oxoJoy1994 and ~empublic/projects/oxoGardner1999). To complement this practical exercise, there will be some philosophical discussion intended to clarify the significant shift in perspective on human-computer interaction that Empirical Modelling entails. An appendix comprising quotations from the American philosopher William James (1842-1910) is included, as this reinforces some of the ideas to be introduced in both this and subsequent lectures. Several references to these quotations will be made, but it is not essential to assimilate them immediately.

    1. Empirical Modelling as a Private Affair

    The first step in developing a fuller understanding of concurrent systems from an Empirical Modelling perspective is to examine the nature of the experience of the external observer in more detail. In some ways, the external observer's view of a system is most easily understood by thinking about everyday concurrency: the sense of living in the present, with knowledge of the past to inform expectation, but always with a high degree of uncertainty about many aspects of the future. Such a frame of mind is not commonly associated with successful interaction with a computer, which more often than not is a closely circumscribed goal-directed activity that reliably leads to a result, and very often to a predictable result. Empirical Modelling can be interpreted as an approach to constructing computer-based models with which we can interact in a manner that more closely resembles everyday interaction with the world.

    Developing and using a spreadsheet has something of the right quality. The construction of a spreadsheet is often intertwined with its use: it occurs to us to introduce new information, to develop a formula to save tiresome computation, to improve the presentation of results of interest, to correct anomalies in the data or the dependencies; all this can be done on-the-fly without having to reinitialise or temporarily discard existing data. Though spreadsheets can become very closely customised to a particular function, they typically reach this state of maturity only after a period of evolution; even the routine entry of data into the spreadsheet is usually incremental and subject to revision. Very often the purpose of data entry is itself to consider the potential implications of an action or change of context. The key point is that a spreadsheet represents a state of mind for the external observer, and interaction with it is associated with the contemplation of a particular family of real-world entities and relationships.

    As our case-study will illustrate, the use of definitive scripts in modelling states of mind is in many respects similar to intertwined customisation and use of a spreadsheet. An important issue is that both a definitive script and a spreadsheet determine a state and a virtual family of interactions, rather than a circumscribed pattern of behaviour. The family of interactions is virtual in that the significance of the spreadsheet cannot be fully appreciated without interacting with its state, but the boundaries that should be set on meaningful interactions is yet to be decided. In some sense, the external observer is ignorant of their status as an agent: they have a View 2 rather than a View 3 perspective on their own agency.

    The focus in this session is on Empirical Modelling as a private matter. In constructing OXO-models, the modeller pays attention to two experiences: knowledge of what is involved in playing OXO-like games, and the pattern of interaction and response that emerges as the computer model evolves. The development of the model occurs in parallel with the identification of viewpoints, observables, dependencies and agency, and involves the metaphorical representation of these. In principle, the correlation of these two experiences is personal and potentially subjective. Certainly, the merits of the exercise are most fully appreciated when you bring your imagination most fully to bear on possible variations in the perception and organisation of OXO-like games (cf [1]), and this is a subjective creative individual activity.

    The character of this modelling process is consonant with a number of ideas developed in [2]. Quote A3: The "truth" of our mental operations must always be an interexperiential affair. The view of knowledge as made by a relation between two experiences is particularly relevant [Quote C5]. Equally significant is the observation that the process each of us goes through individually when considering whether the computer model is faithful to our knowledge of OXO-like games has a quality that has no counterpart in the communication between us. Quote B2: discontinuity in experience unavoidable when I seek to make a transition from an experience of my own to one of yours ... passing from the thing lived to the thing only conceived.

    2. The Nature of Empirical Modelling

    A common concern amongst connoiseurs of programming styles is whether there is any essential novelty in our computer-based modelling technique. A related concern is whether our use of linguistic constructs in definitive notations can possibly be anything other than a disguised use of formal language. Such critics will acknowledge a shift of perspective and concede the convenience of the modelling method, but resist any more pretentious and fundamental claims to interest.

    The broad issues of whether we can give a principled account of experience without using formal language is a pervasive theme in the debates in which James' participates in [2]. James' critics might ask "how else can we possibly give a principled account if not by using formal language?", whereas James emphatically asks "how can we possibly give a principled account using formal language?". Quote B3 expresses James' fundamental objection to conventional linguistic representations: it leads to the separation of what is in our intuition and direct apprehension conjoined. This is in accord with our claim that the spreadsheet variable is not a logical mathematical variable: its meaning is to be derived from interaction with the spreadsheet and that part of the world to which the spreadsheet refers, and in particular with interaction that has yet to take place. A spreadsheet variable identifies an observable, but does not constrain us to view this observable from the View 3 perspective. In this respect, as discussed in [4], our variables are much more akin to the variable as understood by Newton in the 17th century than to the variables of the 20th century logician Tarski.

    A programmer's concern about the status of our modelling technique has a more direct down-to-earth formulation. An OXO-like model is a program on a conventional computer, and all programs are formal objects at some level according to the classical theory of computation. There can be no magic in a program. A defence against this argument has to centre around a number of observations:

    • the formal theory of computation in no sense constrains our experience of executing computer programs. Consider for example the major difficulties faced by declarative languages in dealing with input-output aspects of human-computer interaction.
    • more generally formal theories of computation necessarily can't account for the interaction between an executing program and its environment. For instance, real-time is not a formal concept - it is a fact of life.
    • Turing computability is a notion that has very specific relevance to computations that compute an input-output relation. It is quite obscure in what sense a spreadsheet, or an OXO model can be viewed as such a computation.
    • two recipes may be abstractly equivalent as computations, but this doesn't mean that they stand in the same relation to a human interpreter. Machine code is not as intelligible as high-level code; one representation of a program may be far superior to another in respect of potential modifiability; changing the interface to a program may make it useful in new practical and social contexts.

    These arguments address only one aspect of the programmer's challenge. They can justify the view that computer models are more than formal models, but don't explain why they might nevertheless be based on fundamental principles. The appropriate response to this challenge is that Empirical Modelling builds models that (according to our previous account of commonsense concurrency) reflect the explanatory framework that surrounds our interaction with a system. It is certainly arguable that one explanatory framework can be objectively better than another ("is tuberculosis caused by a bacterium or is it retribution for sin?"). In any event, whether our explanation for system behaviour is a good or a bad one, it is at any rate the one that should guide our construction of a model that best serves our needs as personal explorers and seekers after truth (if not necessarily as medical patients). The pragmatic perspective on causality and enquiry into truth expressed here is endorsed by James (cf. Quotes D2, A3).

    3.The Empirical Modelling Laboratory

    It is not appropriate to view our OXO-like models as a collection of small conventional programs with fixed input-output relations. It is more like a laboratory in which different kinds of OXO-like games can be conceived and developed. There is in no sense a clear discrete set of focal points in the space of OXO-like models corresponding to the models we have constructed. Each model is an arbitrary point in a continuum of models where the association between one model and its neighbours is established on the basis of how we understand the model to work. Making a change to the script within a model can be a means of enriching or revising it; it can also be engaging with our explanatory conception of it, either in order to test our explanation (experiment), to confirm our explanation, or to exploit the predictive power of our explanation in a practical way.

    The peculiar quality of our OXO-like models is best appreciated by gaining practical experience of Empirical Modelling, and being fully aware of the open and empirical nature of the process at every stage. Even in conceptually simple tasks, such as constructing a line-drawing visualisation for OXO, it is possible to appreciate the distinctive systematic experimentation, correction and confirmation that surrounds the process. Experience of interaction with the model discloses anomalies that point to errors in the entry of definitions or the conception of values and dependencies.

    In this connection, openness is associated with View 1 and View 2 varieties of agency. When we ascribe relationships and values to observables, it is not in such a way as to express a universal truth, but rather a provisional hypothesis or voluntarily accepted commitment (cf. Quote A4). Whether we are asserting or simply experimenting is a matter of perspective only (cf. Quote B5). The representations that are best suited to articulating agency of the View 3 variety are qualititatively different. Quote B4: Following the strict intellectualist method ... What [sensations] were not expressly defined as including they must exclude. The disconcerting feature of Empirical Modelling is that has no necessary goal or point of arrival; it does not oblige us to review and draw together our experience retrospectively in order to represent it (cf. Quote D1). Central to the debate in [2] is the concern expressed by James' critics that there is no experience apart from experience rationalised (cf. Quotes C3, D4). From an Empirical Modelling perspective, a more appropriate claim is that there is no representable experience apart from experience rationalised - a contention that must be conceded in respect of logical formal representations (cf. Quote D4), but does not eliminate the possibility of knowledge representation via artefacts such as is clearly apprehended by James (Quote C5). For other discussion of this theme, see Naur [5].

    The relationship between OXO-like models in tkeden and conventional programs to play OXO is illuminated in a more practical way by the high-level packaging provided by an interface developed by Mike Joy that can be found in the public directory ~wmb/public/projects/games/OXO/EDEN/MSJ. This uses a shellscript to supply what is essentially a higher-order definition of OXO games: a part of the definitive script is generated from a macro specification when a shell command is invoked with the appropriate argument. This interface encourages the user to interpret the OXO-like models as merely family-related implementations of several games, and obscures (though it does not suppress) the extent to which the user can indulge in fanciful experimental interaction with them. For another way to derive conventional programs consult ~wmb/public/projects/games/OXO/PASCAL, where there are Pascal implementations of OXO derived from a tkeden model by a semi-automatic process of translation. These two different directions of retreat from open models echo two familiar commonsense ways of dealing with agency (cf Quote D3): by accounting for behaviour at a high-level ("it looks messy down here, but it's really all part of a higher plan"), and by interpreting it at a low-level ("this is all that's happening really - it's just down to these neurons"). Empirical Modelling itself is situated in the frame of reference of the external observer, who doesn't know the higher plan (if there is one), and sees themself as exercising free will.

    4. Modelling States of Mind

    The development of the OXO-like models, as described in [1], involves a process of analysis of perception and action in human play. This takes account of the many levels of abstraction at which it is possible to view an OXO grid (or 'board' as it is referred to in the general framework considered in [1]): in particular, as a set of squares, as a geometric pattern of lines, as pattern of O's and X's disposed on squares, as an abstract OXO position, as a position that arises in a game, as the subject of a survey of squares designed to disclose the best move. The construction of the model can be (and indeed was) based around a layered development in which each of these views is accommodated one by one. It illustrates in a simple and direct manner what is meant by using definitive scripts to model states of mind.

    The open-ended character of the modelling process raises interesting issues regarding the status of the model. At what point (if any) does the model become a program to play OXO? What is the significance of the partial fragments that are devised during the modelling process? From one perspective, it seems that the model has no integrity - it is never completed, or precisely specified. From another perspective, it is remarkably easy to extend without subverting its identity, and readily appropriates new views that occur to the modeller. For instance, if we wish to examine and improve the aesthetic appearance of the board, or realise the model in a VR environment, then in principle it is enough to continue to elaborate the existing script. A useful parallel can be drawn with the collection of artefacts and experimental paraphernalia that is developed by engineers in the process of design.

    A helpful perspective on this modelling activity can be gained from James' account of 'pure experience', and the associated 'philosophic attitude' for which he devised the term Radical Empiricism (Quote A4, A5). In James' outlook, there is a place for experiences that represent incomplete knowledge (cf. Quotes C5, D1), and a fundamental role for the relation that binds together observables within a state of mind. The integrity of the OXO-models has precisely this character: it is a collection of scripts belonging to one and the same focus of attention ("I'm thinking about an OXO-like game"). The novelty in James' philosophical stance is his insistence that what has traditionally been seen as the domain of the empirical is too narrow a basis on which to account for the relationship between experience and knowledge. Rather than basic experience being "solely defined by discrete sensory particulars" (see extract A2), he regards it as including "the relations between things, conjunctive as well as disjunctive" (cf. Quote A5). These conjunctive relations, of which belonging to the same state of mind is the most intimate (Quote B1), are a primary concern for Empirical Modelling.

    5. Empirical Modelling meets Radical Empiricism

    It is instructive to compare our use of the term empirical, as in Empirical Modelling, with James's use of the term. It seems clear that James has in mind experience of the world that can be directly apprehended in a sense that traditional empiricists would consider inappropriate. For instance, to apprehend the identity of a complex object is a sophisticated cognitive process. Identification typically requires learning, and is also vulnerable to error ("a case of mistaken identity").

    The observables and dependencies considered in Empirical Modelling are likewise much more sophisticated than "mere sense" data. Deciding whether an OXO position is won or lost, and whether it is my turn to play, involves some complex learned patterns of behaviour and knowledge of conventions. James' concern for the constituents of experience as "directly lived" (Quote D1), and our concern for what aspects of its environment directly impinge on the actions of an agent in a concurrent system both have what can be directly apprehended? as a principal focus of interest. Common experience of skill acquisition shows that direct apprehension is very subjective and subject to develop with experience. (The relevance of speed of apprehension is not immediately apparent in the OXO modelling exercise, since the speed of response is not constrained, but it's clear that in time-limited variants of the game, there would come a point at which the computer would outperform the human in line recognition.) Modern research on the brain and on neural networks has done much to enhance our understanding of the possible mechanisms by which such skills might be developed, but it is not essential to consider these explicitly in Empirical Modelling. Our first concern is not with how experience presents itself to us, and not with how experiences ever get themselves made (cf. Quote C4).

    The influence of the traditional rational-empiricist framework on computing and cognitive sciences, as expressed for instance in the "empirical facts + rational inferences" model of the logic programming paradigm, is to reinforce prejudices towards facile classification of experience. The empirical ("that which is directly experienced") is associated with sensory data, with low-level perception, with physical observations and - by extension - with objective ingredients of experience. The rational is associated with interpretation of data, with higher-level cognition and reasoning, and with abstractions from the physical world. Conventional treatments of agent-oriented modelling reflect this duality, acknowledging a sharp distinction between cognitive and reactive approaches.

    Our empiricism has a different character: it acknowledges that direct experience draws from both what is conventionally seen as the rational and the empirical spheres. This subverts the idea of a clear distinction between primitive and more sophisticated experience, and in particular undermines the orthodox idea that experience can be factored into a primitive consciousness and an associated content (cf. Quote C1). The systematic construction of the OXO-model, as described in [1], is a practical demonstration of the process described by James: "the addition, to a given concrete piece of it [viz. the perception of the OXO board], of other sets of experiences [e.g. the interpretation of an OXO position], in connection with which severally its use or function may be of two different kinds ["what's the board look like?" "how's the OXO game going?"]. In the script that results from this conglomeration of views, the chaotic resonances with many different kinds of experience echo James' characterisation of The World of Pure Experience (Quote C2).

    If this is not presuming too much about James' philosophical position (cf. Quote D5), it seems that Empirical Modelling is associated with Radical Empiricism rather than traditional empiricism. In James' philosophic attitude, as in the Empirical Modelling process, there is no sharp division of experience into two categories: the subjective and the objective: subjectivity and objectivity are affairs not of what an experience is aboriginally made of, but of its classification (Quote B5). In commonsense terms, Empirical Modelling engages with the issue of squaring "what we believe to be true" with "what we observe to be true" (cf. [6]). In the first instance, taking the private perspective on experience of a model and its referent, Empirical Modelling is concerned with justifying personal conviction. As later lectures will discuss, extensions of this process can lead us towards models that address intersubjectivity and consensus. It is only at that point that we return to the more familiar territory that can be so well-represented using formal language.


    1. W M Beynon, M S Joy Computer Programming for Noughts-and-Crosses: New Frontiers Proc. PPIG'94

    2. William James, Essays in Radical Empiricism, Bison Books 1996

    3. Graham Bird, William James, in The Arguments of the Philosophers, Routledge and Kegan Paul 1985

    4. W M Beynon and S B Russ, The Development and Use of Variables in Mathematics and Computer Science, in The Mathematical Revolution Inspired by Computing, ed Johnson and Loomes, OUP 1991

    5. Peter Naur, Knowing and the Mystique of Logic and Rules, Kluwer Academic Publishers

    6. V D Adzhiev, W M Beynon, A J Cartwright, Y P Yung A New Computer-Based Tool for Conceptual Design ProcWorkshop Computer Tools for Conceptual design, Univ. of Lancaster 1994, 171-188

    Principles of OXO model development

    Modelling proceeds by contemplating states drawn from different perspectives, and doesn't aim to address the circumscribed behaviour over whole game from the outset.

    You should try to trace the construction of the OXO model by exercising your imagination about the range of possible answers to the following questions, then studying the associated eden script:

    1. What is the geometry of the board? geometry.e

    what is the board like?

    where are the lines on the board?

    what happens if we discount or perturb lines?

    2. How does what I can see conform to what is abstractly on the board? display.e

    Is my view obstructed / distorted? Do the symbols persist?

    Is the display aesthetically pleasing?

    [Can illustrate by comparing visualisation using donald with tty display]

    3. Can I interpret the current position in OXO terms? status.e

    Does a particular pattern of O's and X's represent
    a valid position? a terminal won / lost / drawn position?

    4. What considerations guide me in contemplating my next move? sqvals.e

    what is value of a square? which square has the highest value?

    [ideally, there should be a much more sophisticated state structure here]

    5. Whose turn is it to play? gamestate.e

    What is my criterion based on?
    state of board and who made first move

    who moved last

    Why are these different? (look into what happens when you cheat)

    Having followed through these steps, you can add an action for an automatic player

    Devise a suitable triggered action to take a turn at OXO control.e


    a. implement some variants of OXO rules and playing conditions (cf. web OXO)

    b. (donald or scout) add some visualisation

    c. (scout) add some constraint on input via button interface, cf jugs
    Issues to reflect upon in connection with the exercises:

    • identity and state
    • at what point are we specifically discussing OXO?
    • when in playing the game is it the same game?
    • state of mind
    • at what point is it a game?
    • chaos of experience / consciousness / many perspectives
    • what possibilities are excluded in respect of change?
    • richness of empirical elements (identities, high-level cognitve apprehensions)
    • subjective / objective