macro=; /****************************************************\ | | | This is a very simple search routine, which | | takes a tree (given as first argument) and | | starts TBR swapping from it. This saves a | | single tree. If implied weighting is on, | | or discrete characters are included, that | | should work ok. Note that the settings for | | landmark optimization (determined with the | | "lmark" command, see "help lmark;") are | | those at the time of calling the file. | | | \****************************************************/ if ( !argnumber ) quote * Give number of tree to begin swapping ; errmsg ; end set 3 %1 ; set 1 lmscore [ '3' ] + score [ '3' ] ; macfloat 6 ; report - ; set 2 1 ; tbrit '3' progress percswap 100 '2' moves, score '1' ; set 2 ++ ; set 0 lmscore [ '3' ] + score [ '3' ] ; if ( '0' < '1' ) progress= ; set 1 '0' ; resetswap ; end stop progress/ ; report=; quote Best tree found, score '1' ('2' rearrangements done).; proc/;