The idea is to pick items at random from a set.
Once an item has been picked it should have a chance to be picked
again but a little bit less likely.
I am not sure how to best do this but I have a simple example here
to demonstrate what I mean.
a=.i.10
b=.10#10
c=.b#a
d=.+/b
e=.?d
f=.e{c
SEL_sel_=.i.0
SEL_sel_=.SEL_sel_,f
b=.b- f=a
c=.b#a
d=.+/b
e=.?d
f=.e{c
SEL_sel_=.SEL_sel_,f
b=.b- f=a
c=.b#a
d=.+/b
e=.?d
f=.e{c
SEL_sel_=.SEL_sel_,f
b=.b- f=a
c=.b#a
d=.+/b
e=.?d
f=.e{c
SEL_sel_=.SEL_sel_,f
SEL_sel_
b
SEL_sel_ collects all the picked items
b gives how many of each items are of each
--
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði
Po Box 127,801 Selfoss ,
t-póst: [email protected]
gsm: +3546985532
sími: +3544781286
http://groups.google.com/group/J-Programming
Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
góður kennari getur stigið á tær án þess að glansinn fari af skónum
/|_ .-----------------------------------.
,' .\ / | Með léttri lund verður |
,--' _,' | Dagurinn í dag |
/ / | Enn betri en gærdagurinn |
( -. | `-----------------------------------'
| ) | (\_ _/)
(`-. '--.) (='.'=) ♖♘♗♕♔♙
`. )----' (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm