The algorithm works like this:
The first <order> characters of the input are immediately
output. Then, an infinite loop starts, each loop generating a
single character of output. For each of these loops, the program
examines the last <order> characters of the output. It then
scans the entire input file for occurences of this string. Each
time it finds one, it looks to see what character follows it.
Each of these characters is thrown into a set. After all the
eligible succeeding characters are collected in this fashion, one
is selected from the set at random. The infinite loops repeats.
TRAV tries to format its own source_texts, inserting newlines
into the output whenever it seems right. source_text format of
the input file is ignored (newsource_texts are converted into
spaces).
If TRAV ever gets to a point where there are NO eligible
successors, it hops back to the very top of the input table and
restarts the whole spiel.
Copyright © 1996 Computer Studi/o All rights reserved