Information Technology Reference
In-Depth Information
create a script that automatically generates input/output
patterns according to a simple rule. Finally, we will
embellish the network with a testing process, some ad-
ditional statistics, and a custom control panel. We will
also keep a record of all the actions we take in the
interface, producing corresponding script code that, if
run, would recreate the simulation just as we had made
it. However, we will not rely on this script to actu-
ally save our project (we can just save the final product
as a project file), so you need not be concerned about
making mistakes during project construction. Instead,
we will use this script code to learn how to program in
PDP++, by examining the script versions of the actions
that you took. Many complex tasks can be efficiently
automated by a little bit of appropriate script code, so it
can really pay off to invest a little bit of effort learning
the script language.
In this case, if you were going to be having multiple
projects open at the same time, you could create groups
to keep more related projects together. Because we typi-
cally just have one project at a time, this is not so useful
here, but it will be later. Most of the time, the simu-
lator just ignores this group structure, so it is just for
your convenience. However, sometimes it is important,
as we will see below. For technical reasons, sometimes
these groups are called _MGroup and sometimes just
_Group — they are both essentially the same thing,
except that the _MGroup has the ability to produce a
graphical menu of the objects in the group. Thus, when-
ever you are creating things from a menu, the relevant
group type will be _MGroup .
Just press Ok to create the project.
You should see a project window appear. The project
window is the central hub for everything that happens
in the simulation. The menus along the top allow you
to create and manage all the objects that belong in a
project. Every major window has an Object menu at
the very left, which has actions that apply to the par-
ticular object that the window corresponds to (i.e., the
project in this case). This allows you to Save , Load ,
and Close the object, among other things.
The menus in the project window are arranged in the
order you should typically use them, from left to right,
when creating a new project. Many times (including
this one), you can skip right to the .network window,
since the .defaults are usually appropriate, and the
objects you create in the network (units, etc.) will auto-
matically create their corresponding initial .specs .
The “project view” area below the menus in the
project window will progressively build up a graphical
representation of the overall structure of your project. It
will have little colored icons for each network, environ-
ment, process, and log created, and will enable you to
manipulate and link these objects together in a graphi-
cal, interactive way.
B.2
Constructing a Basic Simulation
B.2.1
Creating a Project
Let's start by going to the tutorial directory.
This directory should be empty, but it provides a
place to save the files you create during this tutorial for
later reference.
Now, start leabra++ with no additional arguments.
You will see the PDP++ Root window. The
.projects menu within this window allows you to
manipulate projects — we want to create a new one.
Select .projects/New/Project .
This will bring up the new object dialog ,which
shows up whenever you create any new object in
PDP++. It allows you to select how many objects to
create (often just 1), and which type of object to create
— this should correspond to the type of object you se-
lected in the menu just before the dialog came up (i.e.,
Project in this case), but you might want to change it
(in this case there is only one type of project, so don't).
If you do click on the Of Type: button (i.e.,
Project in this case), you will see that there is al-
ways some type of Group type at the bottom of the
list. This reflects a powerful feature of PDP++, which
enables you to create arbitrary groupings of objects to
organize them in ways that make sense to you as a user.
B.2.2
Recording a Script
Because we want to record all of our actions in a
script, we will violate the general left-to-right rule of the
project menus (already!) and start with the .scripts
menu at the far right side of the project window.
Search WWH ::




Custom Search