In order to think, you need something to think about. In the context of Eden, this means that you must be able to gather data before being able to use it. This introduces issues of learning, navigation, and so on, which I don't want to complicate matters with. I'm therefore going to start with an example that has very little to do with Eden.
Please look at the rules below, in figure 1.
resolve [r]. stm [ mp, hot ]. stm_predicates all. computer_hacker => rich. management_consultant => rich. mp => rich. hairdresser => poor. teacher => poor. toilet_cleaner => poor. poor => near. rich => far. near, hot => costa_del_sol, done. near, cold => aberdeen, done. far, hot => egypt, done. far, cold => switzerland, done. done => exec([forward]), exec([wait]).
Figure Where to go for holiday.
In this program, we have the statement
stm_predicates all. Like
resolve statement, this is something that programmers call a
declaration - a statement that isn't itself obeyed as the
program runs, but that alters the way other symbols are interpreted or
other statements are executed. The declaration
tells Eden that all the names in rules refer to symbols in STM and not
to perceptual predicates or motor commands. Actually, there is one
exception to this: this is
exec which is always taken as obeying
The initial contents of STM is given by the symbols after
What do these symbols mean? The production system does not care, and
would work equally well if they were all meaningless names. However,
you can see that they have something to do with choosing holidays. The
idea is that you start the STM off by telling it what your job is, and
whether you like hot or cold weather. The job must be one of
toilet_cleaner. The weather must be either
cold. The production system then runs a few rules, and eventually
comes up with the name of a country or resort, which it puts into STM.
It then obeys the bug-actions
You can test the production system for yourself by doing
eps( holidays, psworld0 ).
psworld0is set up so that the bug is standing just in front of a quicksand. Once it has reached a conclusion, the rules make it obey the
waitactions. These cause it to move onto the quicksand and turn left: as described in the table of objects in How to run Eden, this kills it! That's really just a nasty trick for ending the life once a country has been chosen.
How do the rules work? I hope this is clear from my original discussion
of production systems. If not, you can follow it in Eden by looking at
the view window. This time, the diagnostics are quite long, so you will
almost certainly want to scroll through them with the editor, or to
print the window. How to do this was described in the Editing the
view window section in my editor handout. Briefly, you type the Eden
v, and then give the editing command ENTER
ctcprint RETURN. This will print the window on the printer on the
first floor of CTC. To help with following the rules, the figure below,
figure 2, shows successive snapshots of the bug's
STM. Next to each fact is an annotation showing when it was added. The
number before the point identifies the production-system cycle; the
number after it shows when during that cycle.
hot (0.2) mp (0.1) rich (1.1) hot (0.2) mp (0.1) far (2.1) rich (1.1) hot (0.2) mp (0.1) done (3.2) egypt (3.1) far (2.1) rich (1.1) hot (0.2) mp (0.1)
Figure The holiday-bug's STM.
If you want to experiment with changing these rules, or the initial contents of STM, you may, provided you know how to edit and run your own programs. For instructions on how to do this, see my handout on Editing your own programs.