hello everyone,
i’m working on the next release of DRP and was just curious if any of
you have any suggestions/bugs/feature requests?
thus far i have added
- the ability to load rules from files
- filters on a rule basis, so you can define a method which runs after
or before all rule methods for some rule
- a new syntax which will allow for much smarter display/navigation of
generated programs in the future
and am working on something like attributes in attribute grammars
although i’m not sure yet if it’ll get included.
and also will be trying to get inheritance to work properly where
inherited classes of an extended class not only inherit
rule methods but can redifine them and add new ones.
a sneak peak at the new version from the symbolic regression example:
def bin_op_print x, y
puts x, y
[x,y]
end
pre_rule_filter :bin_op, :bin_op_print
define_rules :require => ‘math_basic’ do # math_basic rules in file
loaded
max_depth 2..4
# using these rules from file, with current max_depth weight etc
bin_op :multiply, :subtract, :divide, :add
bin_op :exp do |x,y|
x**y
end
# note you can still have them anonymous but you are better off
naming them
# because then you can look at a stack trace and see something
meaningful
# plus i’ll be adding some tools for that purpose at some future
date
bin_op do |x,y| ... end
expr do
#puts "op(expr,expr)"
bin_op(expr, expr)
end
expr do
#puts "@input"
@input
end
expr do
#puts "map"
map -5..5, :i_lin
end
end
christophe wrote:
generated programs in the future
and am working on something like attributes in attribute grammars
although i’m not sure yet if it’ll get included.
and also will be trying to get inheritance to work properly where
inherited classes of an extended class not only inherit
rule methods but can redifine them and add new ones.
[snip]
Where does this project live?
–
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/
If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
Where does this project live?
http://drp.rubyforge.org
i see on your blog that you are interested in music
composition/synthesis.
that is one of my primary motivations (along with other interactive
design tasks), for the creation of this software. hope it is of some use
to you.
If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
funny
Do you have examples of Directed Programming in algorithmic composition?
sorry but none that i am willing to share at this point, but i will try
to include a sound synthesis example in the next release. probably using
csound and maybe one also with ruby’s midilib.
the very first (unreleased) versions of drp were written in the
supercollider sound synthesis language (which btw is ruby’s closest
living relative), so it is a major concern of mine, the other being
visual art. the lib is designed for ease of use and flexibility. it lets
you choose and evolve weights and maximum recursive depths for functions
on an individual basis assuming that you will want to tweak the
evolutionary process one way or the other and do so easily, i.e. it
encourages cheating whereas other more engineering oriented libs
generally frown upon or at the very least do not facilitate it. another
thing that i wanted to be able to do is combine independently evolved
components of a system, which you can do with drp since it makes no
assumptions about how you want to structure your evolutionary process.
it is really just a mapping layer from vectors of floats to programs.
Christophe M. wrote:
Do you have examples of Directed Programming in algorithmic composition?
–
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/
If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.