Video Tutorials: CAS-AI (original) (raw)

DISCLAIMER

THIS IS NOT AN OFFICIAL DOCUMENT OF THE UNIVERSITY OF BIRMINGHAM OR THE SCHOOL OF COMPUTER SCIENCE.
NEITHER THE UNIVERSITY NOR THE SCHOOL HAS ENDORSED THE OPINIONS EXPRESSED HERE.


Available at:http://www.youtube.com/watch?v=y1syZ-Sl8ZY
Jump to CONTENTS List

Available at:http://www.youtube.com/watch?v=j0oaK59SSM0
This is a sequel to my previous tutorial (pop-espeak).
The code examples in this video can be found here:
http://www.cs.bham.ac.uk/research/projects/poplog/teach/haiku-examples.txt
There are many more examples of the kinds of things that can be done in Pop11 (especially "thinky programming" examples) in this file
http://www.cs.bham.ac.uk/research/projects/poplog/examples/
People who are not familiar with the idea of a grammar, as used here, may find this short tutorial by 'drewmfisher' on the idea of a grammar useful:
https://www.youtube.com/channel/UCZ3sx1PFJ6ImyqwC9RRb8JA
Anyone familiar with search engines may be able to find additional introductory presentations on grammars. A 'teach' file that can be used with pop11 in Poplog is here:
http://www.cs.bham.ac.uk/research/projects/poplog/teach/grammar
This is part of a planned series of video tutorials introducing some of the features of Pop-11, an AI programming language (part of the Poplog system).
More information about the language and its environment, and ways in which AI programming is relevant to science and philosophy as well as engineering, can be found here
http://www.cs.bham.ac.uk/research/projects/poplog/examples
http://www.cs.bham.ac.uk/research/projects/poplog/cas-ai/
I am not an expert pod-caster, so there will be many flaws. I hope to learn from experience and from feedback from users.
I am contributing this as part of the UK ComputingAtSchool (CAS) initiative, described here:
www.computingatschool.org.uk
Uploaded: 15 Nov 2011;
Modified 11 Dec 2011; 14 Oct 2015
Jump to CONTENTS List

Available at:http://www.youtube.com/watch?v=9TAQoRpvLFE
This is a sequel to my previous tutorial (pop-espeak2.ogv)
This is part of a planned series of video tutorials introducing some of the features of Pop-11, an AI programming language (part of the Poplog system).
Unlike the previous tutorials this one makes use of Poprulebase, an extension to Pop11 designed for construction of rule-based systems and used in the SimAgent toolkit.
This tutorial does not claim to show how to model what goes on in the mind of a child learning about numbers but does aim to show how one's scientific understanding of the nature of the process can be enhanced by trying to build models of various aspects of the competences. This could help to guide both experimental and modelling research investigating how the learning and development processes occur in children. It could also be a precursor to the design of future robots with human-like intelligence (still a very long way to go). The tutorial uses some of the ideas in Chapter 8 of "The Computer Revolution in Philosophy" (1978).http://www.cs.bham.ac.uk/research/projects/cogaff/crp/chap8.html
"On learning about numbers: Problems and Speculations" The chapter (like the whole book) is on-line.
I also believe that using computers to model some of the processes by which animals reason and human children acquire and extend their mathematical knowledge and competence is relevant to Philosophy of mathematics as illustrated in these talks:http://www.cs.bham.ac.uk/research/projects/cogaff/talks/
The demo uses a text file including comments and code, end ends with some suggestions for project work extending the demo in various ways. The text file is available online here:http://www.cs.bham.ac.uk/research/projects/poplog/teach/number-rulebase.txt
Since this video was made several of the rules in that file have had comments added to the code.
The video was unscripted and there are at least two mistakes in portions of the presentation relating the program's demonstrated behaviour to the code. One mistake was to use a version of the code that included an unnecessary local variable. Another mistake was to choose the wrong rule to illustrate how one of the replies had been generated, because there are a number of slightly different rules.
More information about the Pop11 language and its environment, and ways in which AI programming is relevant to science and philosophy as well as engineering, can be found herehttp://www.cs.bham.ac.uk/research/projects/poplog/cas-ai/
The original tutorial recordings are hosted here (in .ogv format):http://www.cs.bham.ac.uk/research/projects/cogaff/tutorials
I am not an expert pod-caster, so there will be many flaws. I hope to learn from experience and from feedback from users.
I am contributing this as part of the UK ComputingAtSchool (CAS) initiative, described here:www.computingatschool.org.uk
Uploaded: 25 Nov 2011
Jump to CONTENTS List

Available at:http://www.youtube.com/watch?v=jsCINKXK6ek
This tutorial makes use of a pop11 teach file available herehttp://www.cs.bham.ac.uk/research/projects/poplog/teach/random_walkto demonstrate some features of the 2-D graphical libraries available in Pop11, as well as the use of the Poplog editor Ved as an interactive learning, programming, testing and demonstration tool.
The tutorial introduces a small subset of the RCLIB extension to Pop11, providing a 'Relative Coordinates' graphical package, which allows the frame of reference to be altered (e.g. moved, stretched or rotated) so that the same graphical command has different effects. However that feature is not demonstrated here.
Instead the tutorial shows how an existing library program can be used to draw very simple faces with different expressions (e.g. happy, sad) and different colours, simply using circular blobs. The details, which are not explained or demonstrated in the tutorial can all be found in the file:http://www.cs.bham.ac.uk/research/projects/poplog/teach/faces
A learner trying various parameters for the face-drawing procedures should be able to work out what the parameters do, as part of learning how coordinates work.
After that introduction the tutorial shows how Pop11 and its graphical command rc_drawby(X, Y), which draws to a location specified relative to the previous location, can be used to explore different sorts of random walk. For example, this command randomly selects one element from a four-element list of pairs of coordinates to be given to rc_draw_by:
rc_drawby( explode( oneof( [ [20 20] [-20 20] [-20 -20] [20 -20] ] ) ) );
The key features of a random walk are demonstrated manually, and then put together in a little procedure that allows various kinds of random walk to be demonstrated and displayed graphically. This shows how, by playing with such a program, a learner can begin to get an intuitive feeling for the ways in which random walks can vary.
The tutorial ends by mentioning that the program can be extended to collect different sorts of statistics about the random walks, which could be used as input for the Pop11RC_GRAPHPLOTlibrary, which draws graphs of mathematical functions or, of empirical data.
So although Pop11 was designed for teaching and research in Artificial Intelligence (and cognitive science) it can also be used as a tool for doing research in mathematics, especially gaining an intuitive understanding of some features of a mathematical domain.
The talk was unscripted and may have a number of errors. One that I've noticed is that on more than one occasion I referred to a delay as one second rather than one hundredth of a second (the unit for the syssleep function).
There may be problems of synchronisation of voice and video because the recording was done with some compression, to save file space and download time. I use 'recordmydesktop' on linux (Fedora 15) on a desktop PC. Youtube kindly converts the .ogv format to flash. The original version is available, with other .ogv files, here:http://www.cs.bham.ac.uk/research/projects/cogaff/tutorials/
Please email comments and suggestions to mehttp://www.cs.bham.ac.uk/~axs/
Originally Uploaded: 1 Dec 2011. Revised version: 6 May 2012
Jump to CONTENTS List

Old Version (installed Dec 2011)
Available at:http://youtu.be/RvpK7RgWmoE
This is one of a collection of tutorials demonstrating Pop11, a language with some of the features of Lisp, Scheme, and Prolog, developed for teaching and research in AI and Cognitive Science.
This unscripted tutorial turned out longer than intended. It is based on this file, showing the program text demonstrated in the tutorialhttp://www.cs.bham.ac.uk/research/projects/poplog/teach/match_sorted
Most people think of pattern matching as an operation performed on strings (e.g. 'grep' in unix/linux). The matching here is on structures, including lists of items, lists of lists, etc. So the functions of matching in this context can be thought of as searching in and extracting information from a database of knowledge rather than finding and manipulating bits of text.
Because the tutorial was unscripted there are some bloopers -- e.g. where I temporarily switched my brain into the wrong context -- e.g. attempting to trace "matches" in an example that used "doesmatch", not "matches".
The tutorial presents a fairly standard recursive algorithm for checking whether a list of numbers is sorted, then shows how that can be replaced by a non-recursive definition using the pop11 pattern matcher, which allows you to specify a sort of abstract picture of what is not allowed in a sorted list. The pop11 matcher compares that picture with an input list, and if it matches, the list is not sorted.
This naive use of the matcher is shown to work, but with considerable inefficiency. So a Pop11 library is compiled which allows, instead of the format
DATUM matches PATTERN
the format
DATUM doesmatch PATTERN where CONDITION
Using the second format, the pictorial specification of what a non-sorted list is like is somewhat clearer and its use is also much more efficient, since the search for an unsorted fragment of the list is more controlled.
The tutorial then shows how the procedure can be generalised to test a variety of types of list, including lists with mixed types of components (e.g. words and numbers) by allowing the test for unordered elements instead of being frozen in the code to be passed as a second parameter to the procedure. Then by using the same procedure with different 'unordered' tests we can produce a variety of tests for different kinds of ordering, all using the same generic procedure.
Finally the tutorial shows how the generic procedure can be partially applied to different specific tests (forming Pop11 closures) to create different procedures, testing for different things.
In retrospect I think the example may be confusing for some viewers because the task of checking whether a list satisfies a condition (e.g. containing numbers in ascending order) requires using a test that indicates a failure to satisfy that condition, e.g. a test for an adjacent pair of numbers being in descending order. That implies that a true result for the test implies a false result for the main procedure. This complexity is a consequence of the example shown being for something being true of ALL parts of a list, which is equivalent to non-existence of ANY part of the list for which it is not true. Some human brains find this hard to grasp.
The process of generalisation or abstraction from a few examples of testing a list, then creating a new "generic" version of the test, by abstraction, which can then be instantiated to produce new examples, illustrates the ability of humans to learn different competences, then discover that those competences share some structure, and then use the shared structure with additional parameters to cope with novel situations.
That is a common process in mathematical discovery and in becoming more competent at programming. It is often confused with metaphorical thinking (which requires continued reference to the original examples, whereas abstraction does not).
I think it is an example of the notion of "Representational Redescription" presented by Annette Karmiloff-Smith in her 1992 book "Beyond modularity". Implementing representational redescription in a program is an ambitious task for Artificial Intelligence. This tutorial does not go into that.
Uploaded: 3 Dec 2011
Jump to CONTENTS List

Available at:http://www.youtube.com/watch?v=xfGv9xfqDxU
About 7.5 minutes.
Originally this was a 19 minute demo, illustrating some features of Pop11, then going on to present the Riverworld tutorial. Instead that is now done in a separate video http://youtu.be/RrT9DUyg88M. This tutorial has been shrunk to the first 7.5 minutes of the original.
This video is now a (mostly unscripted) tutorial presentation of some of the arithmetical and list processing facilities in Pop11, and the interactive mode of developing and testing programs, using the poplog editor as a development tool.
A feature of this and other pop11 tutorials is that it can be used on very low cost interfaces, since it uses only a textual display to paint schematic one-dimensional pictures of the state of the world as it changes.
Among the many tutorial files teaching aspects of Pop11 and AI that are included in the Poplog system, one that has been found very useful for teaching absolute beginners some of the key ideas of programming, including sequences of instructions, grouping of instructions into named procedures, procedures with input parameters, and the use of error messages is the TEACH RIVER file,log/t based on an earlier version by Max Clowes around 1978, now online here:http://www.cs.bham.ac.uk/research/projects/poplog/teach/river
The mechanisms used in that file are built on lower level abilities of pop11 including list processing mechanisms. This teach file is an introduction to a small subset of the more primitive mechanisms in pop11.
This video is an unscripted tutorial presentation of some of the arithmetical and list processing facilities and the interactive mode of developing and testing programs, using the poplog editor as a development tool.
A feature of this tutorial is that it can be used on very low cost interfaces, since it uses only a textual display to paint schematic one-dimensional pictures of the state of the world as it changes.
Aaron Sloman
http://www.cs.bham.ac.uk/~axs/
School of Computer Science,
University of Birmingham, UK
Uploaded: 11 Dec 2011, Modified: 10 Jan 2012
Jump to CONTENTS List

Jump to CONTENTS List


About 9.5 minutes.
Available at: http://youtu.be/Athf7cFbk3E
Most of the tutorials on this web site make use of the Poplog editor Ved, or its multi-window version XVed, to demonstrate features of AI programming, testing of programs, searching for documentation, editing program code, etc. This short video (just over 9 minutes) illustrates uses of Xved and Ved that invoke some of Pop11's 2-D graphics capabilities, including handling multiple text windows, using (user definable) graphical menus, and running programs that invoke graphical displays. It was originally intended as an introduction to a longer tutorial on the uses of the editor. However, it made the tutorial too long, so I separated this from the main tutorial which is the video that will be uploaded after this (Essentials of Ved, the Poplog Editor at: http://youtu.be/h8zv_un5k3k) andthe Ved Keys tutorial, below.
The video quality of this tutorial is very poor for some reason. So I may replace it later.
The next tutorial, will show the Ved editor being used in single window mode, and will present the most commonly used keyboard commands for getting things done.
The poplog system, used for this tutorial is described with examples of teaching materials here:http://www.cs.bham.ac.uk/research/projects/poplog/examples/
NOTE: because these tutorials are unscripted, they include errors and moments of confusion!
Uploaded: 16 Dec 2011
Jump to CONTENTS List

About 47 minutes.
Available at: http://youtu.be/h8zv_un5k3k
The previous tutorial (http://youtu.be/Athf7cFbk3E( rapidly ran through some of the things that can be done with the Poplog editor XVed, using its 2-D graphical capabilities. including use of multiple windows and mouse drive menu panels. This tutorial goes to the opposite extreme to show how Ved can be used not only without 2-D graphics, but also without any function keys, so that it has to be driven only by normal alphanumeric keyboard keys, along with CTRL, ESC, RETURN, and Backspace.
This situation can arise when either there is something wrong with a keyboard, or the keyboard is small and lacks function keys (e.g. on a laptop), or the use of the function keys is not available to Ved because they are 'grabbed' by the operating system or graphical desktop interface.
In such a situation it is possible to drive Ved and do normal programming, development, testing, and reading of documentation, using only a minimal set of keyboard keys, namely all the alphanumeric keys plus the CTRL and ESC keys.
This tutorial explains how to move the Ved cursor around, how to delete text, how to mark portions of a file, how to mark and compile portions of a file, and how to switch between different files, while using nothing but the minimal set of keyboard keys. There are other help files that explain additional actions that can be performed using the keyboard, and without a mouse or 2-D graphical facilities.
The 'teach file' used for this tutorial is available as part of poplog, and also available online here:
http://www.cs.bham.ac.uk/research/projects/poplog/teach/essentialkeys
NOTE: because these tutorials are unscripted, they include some minor errors and moments of confusion!
For additional tutorials seehttp://www.cs.bham.ac.uk/research/projects/poplog/cas-ai/vid.html
Uploaded: 16 Dec 2011
Jump to CONTENTS List

About 35 minutes.
Available at:http://youtu.be/vXpjnqzTZIU
The previous tutorial demonstrated some of the things that can be done with the Poplog editor Ved/XVed without using any function keys, only normal keyboard keys and the ESC and CTRL keys. This tutorial goes beyond that to show how many of the operations can be performed more economically using function keys on a standard PC keyboard.
The keyboard layout is shown in this diagram
vedkeys
Near the end of the tutorial I tried to demonstrate the use of the numeric keypad to compile a marked range, but forgot to precede the key with ESC. So instead of compiling the whole range it compiled only the last line of the marked range, and reported a syntax error, because it found the 'endrepeat' syntax word without first finding the 'repeat'. If I had pressed ESC first, the demonstration would have worked, as you can confirm if you have poplog. (The correct behaviour is demonstrated in the next tutorialhttp://youtu.be/giEhHIN8z6I)
In fact, as shown in the demo, the marked range can be compiled using CTRL D, which is probably more convenient for most people than ESC followed by keypad '*' key.
Uploaded: 21 Dec 2011
Jump to CONTENTS List

About 9 minutes.
Available at:http://youtu.be/giEhHIN8z6I
In the previous tutorial, while demonstrating the use of numeric keypad keys in the poplog editor, I attempted to demonstrate the use of the '*' key on the keypad to compile a number of lines of Pop-11 code, which had previously been marked, using the Mark Start and Mark End function keys.
Unfortunately I forgot to press the ESC key before pressing the '*' key, so instead of compiling a range it attempted to compile only one line, and that line had 'endrepeat', which is not legal Pop11 unless preceded by 'repeat'. The result was an error message which, at the time, mystified me. See the last few minutes of this videohttp://youtu.be/vXpjnqzTZIU
Later I realised what I should have done, and so this tutorial is a supplement to the previous one, partly repeating the previous one and also correcting the mistake at the end of the previous one.
Uploaded: 21 Dec 2011