SIM_AGENT (SimAgent) Demo Movies (original) (raw)

NB: Some of the movies use old formats and may not work on your machine without conversion. All are also now available in the WEBM format, which should work, and should be tried first.

All the videos are downloadable, under creative commons 3.0 licences.

**Note on Pre-SimAgent demos:**Items 10 and 12 below include demos using our pop11 tools before SimAgent was developed. Experience with those projects helped to show the need for the SimAgent tools and theRCLIB graphical interface. If you would like to explore some pre-cursors to SimAgent take a look at the demos near the end of this file. (Code for both still works.)

The first few movies were produced using techniques and scripts suggested byMike Lees at Nottingham University where he used SimAgent on a project directed by Brian Logan. (Mike's program, added to his SimAgent code, repeatedly paused and generated a screendump of the current display. At the end of a run the image files were merged to form a movie.)

Later movies were produced using the excellent Xvidcaptool -- a far more convenient method. All were generated using Poplog + the SimAgent toolkit running on either a Sun computer or a PC with the linux operating system.

However, the .mpg movies produced originally don't seem to work with all modern players, so webm versions have been added, all tested using the VLC player.

When SimAgent is running on your machine you can move things in a demo with the mouse. Most of the movies below were made from such runs, but you cannot interact with the movie demos in the same way.

In some of the movies the mouse-movements produced by interacting with the running program produce movements of picture objects without the mouse pointer being visible. So the resulting movements may look mysterious.

Some of the later movies recorded with the xvidcap tool do show the mouse pointer as well as the objects moved.

When the demos (apart from the first two, and the minder movies, produced before RCLIB had been produced) are running "live", objects can be moved with the mouse and their new locations in the simulated scenario (virtual world) will immediately be sensed either by those objects or by others, or both, and some behaviours may be changed as a result. All of this happens in a running virtual machine, though the effects can be seen on a physical display that records what happens in the virtual machine.

E.g. in the sheepdog demos, virtual sheep that have been put in the virtual pen can be moved out using the mouse, and the virtual sheepdog will then notice and try to get them back. The 'hybrid sheepdog' movies also include trees and sheep moved with the mouse. Likewise some of the other movies.

However, since these are recordings, not 'live' demos, you will not be able to use your own mouse to change anything!

All the graphical interaction depends on the use of the core SimAgent toolkit augmented with the RCLIB graphical toolkit implemented as an extension to Pop11 in Poplog. This handles not only the display of scenarios on the screen, but also the interaction using mouse and keyboard.


A succession of sheepdog projects

Peter Waudby's "passive" sheepdog (not demonstrated here)
The third and fourth videos below, include a simulated sheepdog that makes use of an earlier simulation, not shown here, in which the sheepdog was mouse-controlled.
The earlier sheepdog was designed by Peter Waudby, a Physics graduate, for his Cognitive Science MSc project, in 1996. The sheep are autonomous, and partly unpredictable, unlike the dog. They react to the presence of the dog by trying to move away from it. If they detect something in their path (another sheep, a tree, or part of the pen) they tend to swerve to avoid it, a strategy that can sometimes lead to a sheep getting jammed between two or three other things. The sheep behaviours are mostly unchanged in all the later demonstrations, except for one of the sheep in Dean Petters' program, described below. That sheep has to "learn" to move away from the dog, as explained later.
The program remains available (slightly modified by Aaron Sloman) as a demo included in the Poplog Simagent toolkit:Pop11 SimAgent code and comments.
(Peter later went on to work for a (then) well known computer game company.)
Tom Carter's (mostly) "autonomous" sheepdog * Sheepdog demonstration 340 frames (WEBM about 0.5MB) (June 2003)
Sheepdog demonstration 340 frames (MPG about 0.9MB) (June 2003) * Sheepdog demonstration 640 frames (WEBM about 1.5MB) (June 2003)
Sheepdog demonstration 640 frames (MPG about 1.5MB) (June 2003)
The third and fourth demos use an extended version of Peter Waudby's sheepdog scenario designed and implemented by Tom Carter, a philosophy graduate with no programming experience prior to starting the Birmingham MSc in Cognitive Science.
His project extended Peter Waudby's program by making the sheepdog autonomous, but only able to herd one (randomly selected) sheep at a time, though a human could use the mouse to move the dog, the sheep and the trees (obstacles) so as to frustrate or help the dog in its task.
Tom's sheepdog has several sub-strategies, that get turned on an off automatically according to the situation. It first selects a sheep, then, if not already close to that sheep, moves until it is close to it, possibly avoiding trees, the pen, or other sheep on the way -- or failing to avoid them!
When close to its chosen sheep it attempts to steer that sheep until it is within the 'cone' of space emerging from the pen. It then changes strategy and attempts to move the sheep into the pen. But if the sheep is moved out of the cone, or the dog is moved away from the sheep, or a tree is moved to block the path, the dog can (in many cases) change its behaviour, reverting to an earlier stage if needed. The code for Tom Carter's sheepdog, slightly modified by Aaron Sloman, is availablehere, as part of the poplog teaching materials for SimAgent.
Tom's report on his project is onlinehere (PDF).
Reactive and Deliberative sheepdogs
The above sheepdog is purely reactive. Although it appears to be making plans and carrying them out, it has no notion of any future state. Its behaviour at any time is merely the result of following a rule that is triggered by (a) what it perceives in the environment (b) what its current internal state is. Sometimes what it perceives causes a switch to a new state, e.g. switching from a state in which its actions move it towards a distant sheep to a new state in which it steers a nearby sheep towards the pen. Tom's report gives more details. The next sheepdog sometimes behaves reactively, sometimes deliberatively, making a (possibly complex) plan to get to a new location. When carrying out the plan it behaves reactively.
There is no learning in that sheepdog or in any of the others below. One student attempted to use evolutionary computation to develop a successful sheepdog, but the resulting animal was able only to heard one sheep if the gate of the pen, the sheep and the dog lay on the same line in that order, initially.
The next sheepdog includes the reactive capabilities of the previous versions, but adds deliberative capabilities that allow plans to be made several steps ahead, even in a maze-like configuration of trees.
Marek Kopicki's Autonomous Hybrid Deliberative/Reactive Sheepdog * Hybrid Deliberative/Reactive Sheepdog
(Original version November 2003, updated 8 May 2004)
The fifth example, the hybrid deliberative/reactive sheepdog was an introductory mini-project by Marek Kopicki done in November-December 2003, during his MSc course building on the earlier sheepdog programs. Marek had done a degree in physics and began a PhD in physics, funded by part time programming work. When he decided to switch to computing he came to Birmingham to do our MSc. Although this was a degree in computer science, not cognitive science, he was interested in learning some AI, so I supervised his first term mini-project. This was the result.
Marek's program demonstrates a 'hybrid' deliberative/reactive version of Tom Carter's sheepdog presented earlier. The new sheepdog is able to find its way round far more complex barriers than the purely reactive one can. It does this by sometimes pausing to 'think' about where to go: i.e. it makes a plan, using the "probabilistic roadmap" technique described below. Having embarked on a plan, it does not blindly follow it: instead it can tell that something has changed since the plan was made and there is a new better option (e.g. a short cut) or a new obstacle. It sometimes proceeds by making a small adjustment to the existing plan, and sometimes by making an entirely new plan.
So it alternates between simply reacting to what it senses while following an existing plan and making a new plan: one of its internal reactive behaviours is to switch to local plan-repair mode.
The lines shown on the display indicate the sheepdog's current plan, and while it is moving it also displays its 'line of sight' to a later plan location. This is used for smoothing the plan, and for detecting new short-cuts.
So the dog combines interleaved local re-planning and reactive plan execution with minor (smoothing) adjustments, occasionally having to switch to global re-planning because the current plan has met an obstacle.
NOTE:
This illustrates a type of deliberative competence. There are several different types of deliberative competence some of them more sophisticated than the behaviour shown here. For more information on the possible varieties see:
There are three movies. The first two were produced using the Xvidcap tool.
The third movie was produced earlier using a different technique and does not show movements of the mouse.
(5.1)
(a) Hybrid sheepdog demo, with no way-points shown.(WEBM About 6.5MB)
(b) Hybrid sheepdog demo, with no way-points shown.(MPG About 3.5MB)
This shows the sheepdog fetching the sheep one at a time and steering them to the pen. It repeatedly plans a route, displayed on the screen, then follows the route, reactively adjusting its plan as new obstacles and opportunities are discovered, resulting from objects (trees, sheep, dog) being moved with the mouse. Sometimes a new obstacle turns up that requires global re-planning.
You can see the mouse moving things in the display. (The mouse pointer is a black arrow.)
The dog may have to create a new plan when something changes, or modify its existing plan, or modify how it executes the plan, e.g. taking a short cut that either did not exist when the plan was created or was not noticed when the plan was created, because the plan-creation process does not aim for an optimal plan, just a reasonable one.
Searching for an optimal plan would take very much longer. Notice that in some sense the dog is conscious of where the sheep are, where the trees are, whether it has been moved, whether a short cut is available. Its range of visibility extends over the whole terrain (as if it could see through trees), but that does not mean it notices every relationship between things it sees.
(5.2)
(a)Hybrid sheepdog demo, with waypoints shown.(WEBM About 7MB)
(b)Hybrid sheepdog demo, with waypoints shown.(MPG About 5.5MB)
Another demonstration of the same program, this time showing the 'probabilistic waypoints' used by the sheepdog to make its plans: their use hugely reduces the space of possible plans. As a result the dog can find a plan very quickly by searching the graph of non-obstructed connections between the waypoints. However the plans thus found are often non-optimal and the sheepdog reactively discovers opportunities for improving them by smoothing them as it acts on the plans.
The plan construction is very fast, using the technique of 'probabilistic waypoints'[*],(also known as 'Probabilistic Road Maps').
The potential search space for paths is astronomically large because the sheepdog has a location and heading expressed in 'real' numbers (i.e. decimals -- the exact precision depending on the machine architecture used). The image displayed is about 660x660, but the possible x and y coordinate values along a horizontal or vertical line will be very much larger than that, resulting in a truly huge space of possible paths.
But instead of searching in that huge space of all complete paths in the terrain, the dog randomly generates a collection of 'waypoints' rejecting all except those that are close to but not too close to other objects, and searches for paths from the current location to the goal location going only through the waypoints, using non-obstructed straight lines joining the waypoints. (The number of waypoints selected is a parameter set by the programmer. So the program randomly generates a pair of coordinates in the permitted range, and discards the pair if the location is too close to one of the objects in the scene, or too far from the nearest one. So it might do that until it has found 250 points, a parameter set by the programmer. It then considers paths linking all pairs of points and rejects those that pass through or too close to obstacles. The remaining set of points determines a not very large graph of possible motion paths in which a planning program an search for an optimal route.
This dramatically reduces the search space for the planner, compared with considering all possible routes in the terrain. As a result, on a 1Ghz PC running linux poplog most of the plans shown are found almost instantaneously -- though it is not guaranteed to find the shortest plan and may miss some narrow gaps.
The movie shows the waypoints generated just before each plan is formed, in addition to showing the selected plan. The plan may be somewhat jagged because the waypoints are not necessarily optimal because they are randomly generated. These detours are smoothed as the plans are followed. The movie shows how, while executing a plan the sheepdog can reactively detect an unexpected obstacle or problem produced by the sheep moving in an unexpected way. It can also detect a new opportunity for short cuts e.g. because a tree has been moved out of the way.
In 5.3 the mouse movements are not visible, though the effects are.
(5.3)
(a)Demo with mouse moving objects in the scene(WEBM About 6.6Mb)
(b)Demo with mouse moving objects in the scene(MPG About 7.7Mb)
In this movie some of the objects were moved using the mouse, sometimes making things worse for the sheepdog, sometimes allowing new short-cuts. However, the mouse is not shown.
As before, some of the newly detected problems and opportunities require only local modifications to the current plan, whereas in some cases an unexpected obstacle (in one case another sheep!) causes global re-planning.
Program code for the hybrid sheepdog
The code for the hybrid sheepdog, used to produce the video, is now included as a demonstration library in the SimAgent package.
The program file is browsable separately here.
The toolkit, and the hybrid-sheepdog should work in any version of poplog running on a linux/unix machine with the X window system, and also on a windows PC withVmware,, or using Poplog in combination with Slackware7 on a bootable USB stick.
A report on the mini-project is availablehere.
Are any of these simulated sheepdogs conscious?
(Added 25 Jul 2018)
I have argued that our ordinary concept of "consciousness" exhibits "parametric polymorphism", as explained in
http://www.cs.bham.ac.uk/research/projects/cogaff/misc/family-resemblance-vs-polymorphism.html
This implies that the question "Is X conscious?" without any further specification, is unanswerable, like "Is X efficient?" or "Is X good?".
If the question about the sheepdog is expanded to specify what sort of consciousness with what sorts of content is being asked about then I would argue that with some expansions, the answer would be "Yes it is" (e.g. in some circumstances it is conscious that the route it is following is now blocked, or that there is a new shortcut that provides a better route). As for what sorts of "qualia" that entails, I suspect our concept of "qualia" in addition to lacking precision, presupposes richer forms of consciousness than this sheepdog simulation has. In a different demo,by Dean Petters, the sheep also have a (simple) form of consciousness, e.g. of the proximity of the dog.
References
[*]Matthias S. Benkmann (2001)Motion Planning Using Random Networks





(Inspired by Luc Beaudoin's PhD work.)
Several of the theses in the Cognition and Affect project made use of the nursemaid scenariohttp://www.cs.bham.ac.uk/research/projects/cogaff/misc/nursemaid-scenario.html
This was originally proposed around 1986 by A.Sloman (while still at Sussex University) as a framework for investigating architectural issues in complex multi-functional intelligent agents with multiple, changing sources of motivation, embedded in rich and dynamic, only partly known environments.
Since about 1991, when he came to Birmingham, the scenario, modified in various ways at various times, has inspired much of the work in the Cognition and Affect project, starting with the PhD theses of Luc Beaudoin and later Ian Wright.
In 1994, while working towards his PhD, Ian Wright implemented some of the ideas developed by Luc Beaudoin in a version of the nursemaid scenario referred to as 'Minder Version 0'. The program was shown in a BBC2 Television interview with A.Sloman, broadcast on February 1997. Since then the program has had its 'cosmetics' improved by A.Sloman, and the new version is used for the movie demos below.
The movies show the 'minder' indicated by a capital 'M' looking after variable numbers of 'babies' labelled 'a', 'b', 'c', etc. whose charge state is indicated by an '*' when fully charged and a decreasing single digit number as the charge decreases. The babies move around at random, using up energy and reducing their charge level. There is a recharge point (represented as two curved arrows) to which M can carry babies when their charge gets dangerously low. They die if their charge gets to 0. At the top and bottom edges of the nursery are ditches and if babies get too close they risk falling in and dying. M notices when a baby's charge level is low, when a baby is near a ditch, and when a baby is dead, acquiring new motives in each case. Noticing that a baby is dead generates a motive to carry it to the 'disposal' location, marked with a skull and crossbones! A further motive can be triggered in M whenever there are three or more individuals in a room: that makes the 'room too crowded' and M acquires the motive to carry a baby to another room. M's motives are prioritised (e.g. how low a baby's charge-level is, how close it is to a ditch, etc., with disposal of dead babies as having lowest priority, followed by reducing crowding).
The nursery has several rooms and M's knowledge of the contents of the rooms is constantly updated by a camera that scans the rooms in turn. It is possible for M to act on information about what is happening in a room that is out of date because the camera has not refreshed M's view of the room.
Thus as babies move around and their energy levels change, M's motives keep changing and sometimes M's work on a motive has to be abandoned in favour of a new higher priority motive. M has very little intelligence, and completely lacks deliberative capabilities. Thus all its plans are stored reactive plans, activated by motive generators, and reactively executed or over-ridden. M also has very little knowledge about itself, and often behaves in stupid ways, e.g. attending to a distant baby before a nearby one. There is no learning. When there are only 5 or 6 babies M may be lucky and keep them alive for a long time, though sometimes even that situation proves too much. The more babies there are, the more harassed M becomes and because it has no way of filtering new motives, they all grab its attention and can cause it to behave in a far from optimal fashion. Later work by Ian Wright developed the suggestion, in Luc Beaudoin's thesis, of using a dynamically varying threshold for an attention filter. (A movie of his later program will be added to this site eventually.)
Here are several runs of the Minder program, the core of which is unchanged since 1994, though the graphics have been altered. (The original showed both the 'real' world and the world as perceived by the minder, and used only the editor buffer for textual output, whereas this version shows only the real world and uses graphical 'posters' in RCLIB to display changes in motivation.)
This program does not use SimAgent, as it is implemented directly in Pop-11. However the experiences and problems arising out of this work helped to define requirements both for the RCLIB package, and the SimAgent toolkit, both developed later. Ian Wright's implementation of Minder 1 for his thesis used the toolkit.
Videos of Ian Wright's Minder-0 program.
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder1.webm
(WEBM About 3.6 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder1.mpg
(MPG About 4 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder2.webm
(WEBM About 2.6 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder2.mpg
(MPG About 1.6 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder3.webm
(WEBM About 4.1 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder3.mpg
(MPG About 4.1 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder3.webm
(WEBM About 4.7 MB)
http://www.cs.bham.ac.uk/research/poplog/figs/simagent/minder3.mpg
(MPG About 4.7 MB)

The program produced by Ian Wright as part as his PhD work should be represented here. (When I get time.)

The Poplog 'RC_BLOCKS' package is used to produce the saved image called 'gblocks', demonstrated below. This makes use of a 'toy' demonstration program, assembled for AI teaching purposes by a collection of lecturers at Sussex University in the 1980s, designed to be extendable by students -- though not absolute beginners.
The package includes a core that makes use of the Pop-11 GRAMMAR library, used here only in input mode. (Other tutorials use it for generating sentences.) It also uses the Pop-11 2-D interactive graphics package RCLIB.
The package was inspired by the SHRDLU program presented in Terry Winograd's MIT PhD thesis (1971). More information about SHRDLU is available here:http://hci.stanford.edu/~winograd/shrdlu/
RC_BLOCKS is very much simpler than Winograd's program as it uses a very simple grammar and parser, but it does illustrate how a system can use the combination of syntactic, semantic, and 'world' knowledge in understanding potentially ambiguous sentences and also shows what some of the libraries that come with Poplog (and therefore with SimAgent) can do.
The two movies show how the package deals with only two different input sentences, combining knowledge of grammar and a lexicon along with a database of information about the current situation, in order to resolve ambiguities in input sentences.
The package can handle questions and instructions (constrained by a very simple grammar, vocabulary and ontology). However its current resources are much too simple for use in any practical robot, though the general ideas could be useful. The tools used can also be useful for rapid prototyping of a simple but usable natural language interface to a robot (or other machine).
Two formats are provided for each of the two movies, mpeg and webm. The latter is more likely to work on modern machines.
* Demo 1: "Put the blue block on the table on the big red one"
WEBM video (About 6.7 MB)
MPEG video (About 5.1 MB)
______________________________________________________________________
* Demo 2: "Put a big green block on a red block on a little blue block"
WEBM video (About 5.1 MB)
MPEG video (About 3.7 MB)
These two demonstrations use only the RCLIB subset of the SimAgent Toolkit, along with the GRAMMAR library and its semantic extension FACETS. They also show how the XVed editor can be used as part of an interface for textual interaction. There is no use of POPRULEBASE or SIM_AGENT, though extensions of the demonstration would benefit from their use. However, the Pop-11 DATABASE package is used.
The program corresponds to this tutorial, originally developed for teaching AI at Sussex University: http://www.cs.bham.ac.uk/research/poplog/teach/msblocks
All the code required to run this demo is included as 'open source' inPoplog, and makes use of theRCLIB 2-D graphics library in Poplog.
Additional information about the grammar library, the Pop-11 database package, and the matcher used in the grammar library, can be found in video tutorials available in:http://www.cs.bham.ac.uk/research/projects/poplog/cas-ai/video-tutorials.html

Last updated:
31 Aug 2014 (re-organised, including new table of contents);
28 May 2009; 17 Nov 2013; 27 Aug 2014;