#N canvas 296 90 634 474 12;
#X obj 94 223 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 94 308 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 173 307 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 226 309 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X msg 94 330 1;
#X msg 173 332 2;
#X msg 226 333 3;
#X obj 173 368 s state;
#X obj 94 134 bng 20 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 124 135 r state;
#X obj 266 225 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 266 310 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 336 312 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 389 315 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X msg 266 333 1;
#X msg 336 338 2;
#X msg 389 339 3;
#X obj 336 368 s state;
#X obj 430 226 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 430 311 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 503 310 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X obj 556 313 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1
-1;
#X msg 430 334 1;
#X msg 503 335 2;
#X msg 556 336 3;
#X obj 503 370 s state;
#X msg 305 135 \; state 1;
#X obj 94 171 f 1;
#X obj 94 251 random 100;
#X obj 94 280 moses 30;
#X obj 173 281 moses 60;
#X obj 266 252 random 100;
#X obj 266 282 moses 10;
#X obj 336 283 moses 60;
#X obj 430 253 random 100;
#X obj 430 282 moses 70;
#X obj 503 282 moses 80;
#X floatatom 154 159 3 0 0 0 - - -;
#X text 259 142 reset;
#X text 57 135 STEP;
#X text 45 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 text 88 426 updated for Pd version 0.35;
#X obj 94 197 select 1 2 3, f 37;
#X connect 0 0 28 0;
#X connect 1 0 4 0;
#X connect 2 0 5 0;
#X connect 3 0 6 0;
#X connect 4 0 7 0;
#X connect 5 0 7 0;
#X connect 6 0 7 0;
#X connect 8 0 27 0;
#X connect 9 0 27 1;
#X connect 9 0 37 0;
#X connect 10 0 31 0;
#X connect 11 0 14 0;
#X connect 12 0 15 0;
#X connect 13 0 16 0;
#X connect 14 0 17 0;
#X connect 15 0 17 0;
#X connect 16 0 17 0;
#X connect 18 0 34 0;
#X connect 19 0 22 0;
#X connect 20 0 23 0;
#X connect 21 0 24 0;
#X connect 22 0 25 0;
#X connect 23 0 25 0;
#X connect 24 0 25 0;
#X connect 27 0 42 0;
#X connect 28 0 29 0;
#X connect 29 0 1 0;
#X connect 29 1 30 0;
#X connect 30 0 2 0;
#X connect 30 1 3 0;
#X connect 31 0 32 0;
#X connect 32 0 11 0;
#X connect 32 1 33 0;
#X connect 33 0 12 0;
#X connect 33 1 13 0;
#X connect 34 0 35 0;
#X connect 35 0 19 0;
#X connect 35 1 36 0;
#X connect 36 0 20 0;
#X connect 36 1 21 0;
#X connect 42 0 0 0;
#X connect 42 1 10 0;
#X connect 42 2 18 0;
