#N canvas 601 88 634 474 12;
#X obj 94 228 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X msg 94 339 1;
#X msg 165 339 2;
#X msg 218 339 3;
#X obj 165 373 s state;
#X obj 94 134 bng 20 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 132 135 r state;
#X msg 263 339 1;
#X msg 333 339 2;
#X msg 386 339 3;
#X obj 333 373 s state;
#X msg 432 339 1;
#X msg 505 339 2;
#X msg 558 339 3;
#X obj 505 373 s state;
#X msg 305 135 \; state 1;
#X obj 94 171 f 1;
#X obj 94 256 random 100;
#X obj 94 285 moses 30;
#X obj 165 285 moses 60;
#X obj 263 256 random 100;
#X obj 263 285 moses 10;
#X obj 333 285 moses 60;
#X obj 432 256 random 100;
#X obj 432 285 moses 70;
#X obj 505 285 moses 80;
#X floatatom 132 170 3 0 0 0 - - - 0;
#X text 259 142 reset;
#X text 57 135 STEP;
#X text 88 431 updated for Pd version 0.35;
#X obj 94 197 select 1 2 3, f 73;
#X obj 263 228 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 432 228 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 94 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 165 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 218 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 263 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 333 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 386 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 432 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 505 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X obj 558 313 bng 17 250 50 0 empty empty empty 20 8 0 8 #dfdfdf #000000
#000000;
#X text 58 16 Here is how to construct a simple \, three-valued Markov
chain using [random]. Each time you click on "step" the previous output
("state") determines which of three random networks to invoke \, each
having a different probability distribution for the next value of "state."
For instance if the state was 3 \, the next state will be 1 70% of
the time \, state 2 10% \, and state 3 20%., f 70;
#X connect 0 0 17 0;
#X connect 1 0 4 0;
#X connect 2 0 4 0;
#X connect 3 0 4 0;
#X connect 5 0 16 0;
#X connect 6 0 16 1;
#X connect 6 0 26 0;
#X connect 7 0 10 0;
#X connect 8 0 10 0;
#X connect 9 0 10 0;
#X connect 11 0 14 0;
#X connect 12 0 14 0;
#X connect 13 0 14 0;
#X connect 16 0 30 0;
#X connect 17 0 18 0;
#X connect 18 0 33 0;
#X connect 18 1 19 0;
#X connect 19 0 34 0;
#X connect 19 1 35 0;
#X connect 20 0 21 0;
#X connect 21 0 36 0;
#X connect 21 1 22 0;
#X connect 22 0 37 0;
#X connect 22 1 38 0;
#X connect 23 0 24 0;
#X connect 24 0 39 0;
#X connect 24 1 25 0;
#X connect 25 0 40 0;
#X connect 25 1 41 0;
#X connect 30 0 0 0;
#X connect 30 1 31 0;
#X connect 30 2 32 0;
#X connect 31 0 20 0;
#X connect 32 0 23 0;
#X connect 33 0 1 0;
#X connect 34 0 2 0;
#X connect 35 0 3 0;
#X connect 36 0 7 0;
#X connect 37 0 8 0;
#X connect 38 0 9 0;
#X connect 39 0 11 0;
#X connect 40 0 12 0;
#X connect 41 0 13 0;
