#N canvas 446 48 642 550 12;
#X obj 158 449 s state;
#X obj 87 167 bng 35 250 50 0 empty empty Next -53 18 0 20 #dfdfdf #000000 #000000;
#X obj 326 449 s state;
#X obj 498 449 s state;
#X obj 87 312 random 100;
#X obj 87 345 moses 30;
#X obj 158 345 moses 60;
#X obj 256 312 random 100;
#X obj 256 345 moses 10;
#X obj 326 345 moses 60;
#X obj 425 312 random 100;
#X obj 425 345 moses 70;
#X obj 498 345 moses 80;
#X floatatom 133 196 4 1 3 0 - - - 0;
#X text 393 504 updated for Pd version 0.35;
#X obj 87 280 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 256 280 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 425 280 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 87 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 158 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 211 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 256 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 326 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 379 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 425 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 498 378 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 551 376 bng 19 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 133 144 r state;
#X obj 133 170 hradio 19 1 0 3 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0;
#X obj 87 223 float 0;
#X obj 87 249 select 0 1 2, f 73;
#X msg 87 409 0;
#X msg 158 409 1;
#X msg 211 409 2;
#X msg 256 409 0;
#X msg 326 409 1;
#X msg 379 409 2;
#X msg 425 409 0;
#X msg 498 409 1;
#X msg 551 407 2;
#X text 196 170 <-- set another state;
#X text 75 25 Here is how to construct a simple \, three-valued Markov chain using [random]. Each time you click on the "Next" bang 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 "2" \, the next state will be "0" at 70% of the time \, state "1" at 10% and state "2" at 20%., f 69;
#X text 111 281 state 0;
#X text 280 281 state 1;
#X text 450 280 state 2;
#X connect 1 0 29 0;
#X connect 4 0 5 0;
#X connect 5 0 18 0;
#X connect 5 1 6 0;
#X connect 6 0 19 0;
#X connect 6 1 20 0;
#X connect 7 0 8 0;
#X connect 8 0 21 0;
#X connect 8 1 9 0;
#X connect 9 0 22 0;
#X connect 9 1 23 0;
#X connect 10 0 11 0;
#X connect 11 0 24 0;
#X connect 11 1 12 0;
#X connect 12 0 25 0;
#X connect 12 1 26 0;
#X connect 13 0 29 1;
#X connect 15 0 4 0;
#X connect 16 0 7 0;
#X connect 17 0 10 0;
#X connect 18 0 31 0;
#X connect 19 0 32 0;
#X connect 20 0 33 0;
#X connect 21 0 34 0;
#X connect 22 0 35 0;
#X connect 23 0 36 0;
#X connect 24 0 37 0;
#X connect 25 0 38 0;
#X connect 26 0 39 0;
#X connect 27 0 28 0;
#X connect 28 0 13 0;
#X connect 29 0 30 0;
#X connect 30 0 15 0;
#X connect 30 1 16 0;
#X connect 30 2 17 0;
#X connect 31 0 0 0;
#X connect 32 0 0 0;
#X connect 33 0 0 0;
#X connect 34 0 2 0;
#X connect 35 0 2 0;
#X connect 36 0 2 0;
#X connect 37 0 3 0;
#X connect 38 0 3 0;
#X connect 39 0 3 0;
