page idea [Theo Verelst] (Apr 14 03) First we define the domain of the initial state variable State-Of-Dutch-Politics, abbreviated sodp domain, and initialize the state variable: set dsodp {better bad worse {the worst}} set sodp bad As a very simplistic choice of input variable, we take it to reflect the election winner, assuming there is one, and that this quantizeable and qualifiable, and for now define the [finite state machine] input domain, and a few quasi random transitions: set electd {cu vvd cp cda d66 pvda grl} set next_sodp(bad,d66) better set next_sodp(bad,pvda) worse set next_sodp(bad,cp) undefined The last definition is a final state, it has to be defined in the domain of the state transition functions, but it is not defined in the domain of that function, so the machine cannot continue ticking from there on according to its definition. To make sure we get a good result, or to make sure we only 'try' valid options without working the whole machinery, and without a catch construct being needed and to stay within mathematically and programmingwise acceptable and neat ways, we could introduce a query function, which returns the possible state transitions from a certain state, maybe with some weighing of options: proc get_options {try state} { global sodpd next_sodp electd if next } ---- I'm trying to think of something along the lines of an american army training drill song, but nothing good enough crossed my mind yet. Something like: saddam's bagdad's mighty strong, nothing a few tomahawks couldn'd solve hugh habba habba habba, (Quuuiiieeet !!!!)