|context> => |context: global context> age |Fred> => |29> bah |*> #=> |fish> |soup> foo |*> #=> |bah> foo2 |*> #=> |bah 2> foo3 |*> #=> |bahish> |bah 3> save-direction (*) #=> path |home> +=> |__self> learn-spelling |*> #=> spell |__self> => ssplit |_self> learn-spelling-2 (*) #=> spell |__self> => ssplit |_self> pairs (*,*) #=> 3|__self1> + 5|__self2> if-reach-home |*> #=> lay |scent> => |no> type |walk> => |op: random> if-find-food |*> #=> lay |scent> => |yes> type |walk> => |op: return-home> swap-context |*> #=> |context> => |context: testing> learn |rule> => |value> |context> => previous |context> learn |rule 2> => |value 2> random-walk |*> #=> if-find-scent-change-heading |__self> -- blur heading: heading |ops> => normalize ( 0.1 turn-left^2 + 0.25 turn-left + 15 + 0.25 turn-right + 0.1 turn-right^2 ) heading |ops> -- try a direction: try |direction> => clean weighted-pick-elt heading |ops> -- if valid direction, step, else turn right: process-if if(do-you-know apply( try |direction>, |__self>), |valid step>, |not valid step>) random-walk-2 |*> #=> if-find-scent-change-heading |__self> -- -- blur heading: heading |ops> => normalize ( 0.1 turn-left^2 + 0.25 turn-left + 15 + 0.25 turn-right + 0.1 turn-right^2 ) heading |ops> -- -- try a direction: try |direction> => clean weighted-pick-elt heading |ops> -- -- if valid direction, step, else turn right: process-if if(do-you-know apply( try |direction>, |__self>), |valid step>, |not valid step>) bah2 |*> #=> |line 1> |line 2> |line 3> bah3 |*> #=> |line 4> |line 5>