Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: GAs for modifying algorithms



thomas jourdan <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> TheMadScientist wrote:
> 
> > I made a set of classes in java, one for sine, negate, add, multiply,
> > average, power, etc. They are all subclasses of FuncTree so they can
> > be added to each others parameter lists to become part of the tree. An
> > example tree can represent: sin( (3.4 < x  ? 1:0) + 4 ). I have a
> > FuncTreeFactory class that can return any type of FuncTree if given an
> > int. That will let my AI (not finished) select almost any arbitrary
> > function. All trees return a float value. Its possible FuncTrees could
> > later be added for each part of the syntax of a programming language
> > so it could write real code, but its far from that now.
> > 
> 
> Hello,
> 
> I am searching for a similar code. But the function tree should return a 
> quarternion. And it should be possible to mutate an merge this function 
> trees. It's for an open source project written in java.
> 
> http://kandid.sourceforge.net/
> 
> thomas jourdan

I assume by quarternion you mean a complex number (a + b*sqrt(-1)) or
something like that. A Quarternion.java class could be made that
returns Quarternions (with the operation done 4 times) and has 4
FuncTrees.

FuncTrees can have their branches cut off and replaced for evolution,
or you could sometimes average the values instead:
FuncTree add = new Add();
add.addParam(tree1);
add.addParam(tree2);
Divide d = new Divide();
d.addParam(add);
d.addParam( new Num(2) );
//d.exec() returns (tree1.exec() + tree2.exec())/2;


Your image evolution program looks interesting.
You can use my classes for free if you include my name at the top of
them all. my email is (reversed, spaces removed) ud e.usc [EMAIL PROTECTED] ifyar fb
What is yours?



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.