tgla.zip 
Author Message
 tgla.zip

Quote:

> The Great Logo Adventure is now out of print.   However, Jim's site has a
> freebie "as is" download.

> Check it out!
> :-)  edwin

Thanks Edwin,
And specially, thanks Jim.

You might have noticed I am a little
obsessed with shuffling algorithms,
and this one immediately caught my
eye:

TO SHUFFLE :DECK
MAKE "X []
REPEAT COUNT :DECK ~
[CHECK MAKE "DECK BUTFIRST :DECK]
REPEAT (RANDOM 4) ~
[MAKE "X LPUT FIRST :X BUTFIRST :X]
OP :X
END

TO CHECK
IFELSE (RANDOM 3) = 1 ~
[MAKE "X FPUT FIRST :DECK :X] ~
[MAKE "X LPUT FIRST :DECK :X]
END

0 and 1 tend to be together:

show iota 10
[0 1 2 3 4 5 6 7 8 9]

show  shuffle iota 10
[3 4 5 6 7 8 9 0 1 2]
show  shuffle iota 10
[3 2 0 1 4 5 6 8 9 7]
show  shuffle iota 10
[9 8 2 0 1 3 4 5 6 7]
show  shuffle iota 10
[1 2 3 4 5 7 8 9 6 0]
show  shuffle iota 10
[7 3 2 1 0 4 5 6 8 9]
show  shuffle iota 10
[1 0 2 3 5 6 7 8 9 4]
show  shuffle iota 10
[7 5 4 2 0 1 3 6 8 9]
show  shuffle iota 10
[9 7 5 2 0 1 3 4 6 8]
show  shuffle iota 10
[3 4 5 6 7 8 9 2 1 0]
show  shuffle iota 10
[0 1 3 4 5 6 7 8 9 2]

Daniel

To unsubscribe from this group, send an email to:

LogoForum messages are archived at:
http://www.*-*-*.com/

Your use of Yahoo! Groups is subject to http://www.*-*-*.com/



Sat, 15 May 2004 21:20:45 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. tgla.zip

2. REQ: P3007.ZIP P3007X.ZIP F3007.ZIP PATCH.EXE Clarion for DOS update patches

3. ZIP: Are there any generally avail unzip zip classes

4. toolset.zip and scenev21.zip updated

5. New release of MEMVAR.ZIP (was: MEMVAR.ZIP)

6. There are two files rbxxx.zip and rbsrc.zip where

7. PLI-32 Alpha 3.10 (Single message ZIP file (30K)) - pli-32.zip (0/1)

8. PLI-32 Alpha 3.10 (Single message ZIP file (30K)) - pli-32.zip (1/1)

9. PLI-32 For NT, alpha 3.10 (ZIP File: 378K] - pli-32.zip (10/10)

10. PLI-32 For NT, alpha 3.10 (ZIP File: 378K] - pli-32.zip (06/10)

11. PLI-32 For NT, alpha 3.10 (ZIP File: 378K] - pli-32.zip (05/10)

12. PLI-32 For NT, alpha 3.10 (ZIP File: 378K] - pli-32.zip (09/10)

 

 
Powered by phpBB® Forum Software