Given a sequence of tasks, we solve one task after another in the given order.
The solver of the
-th task
will be a program
stored such that it occupies successive addresses somewhere between 1 and
.
The solver of the
st task will start at address 1.
The solver of the
-th task
will either start
at the start address of the solver of the
-th task, or right after its end address.
To find a universal solver for all tasks in a given task sequence, do:
1.
Initialize current time limit
.
2.
Spend at most
on a variant of
LSEARCH that searches for a program
solving task
and starting
at the start address
of the most
recent successful code (1 if there is none).
That is, the problem-solving program
either must be equal to
or must have
as a prefix.
If solution found, go to 5.
3.
Spend at most
on LSEARCH for a fresh
program that starts at the first writeable address
and solves all tasks
.
If solution found, go to 5.
4. Set
, and go to 2.
5.
Let the top non-writeable address
point to the end of the
just discovered
problem-solving program.