simplifying algebraic expressions

Mark Westwood markc.westwood at gmail.com
Tue Jun 26 13:22:23 CEST 2007


Hi David

It seems that all you are asking for are the capabilities of
Mathematica or Maple or some other CAS.  A quick Google reveals that
there is a CAS written in Python, called SAGE.  That might be a good
place to start; but I'll admit that I know nothing about it.

I'm with Robin Becker on this one, if GP is good enough for your
problem, then the answers it produces should be good enough.  Set the
fitness criteria in favour of shorter rather than longer expressions
and let you system run a little longer.  Not only do you avoid having
to integrate into your system a novel library, you avoid a world of
pain trying to decide whether or not x**2 is 'simpler' than x*x, (is
x**4 'simpler' than (x**2)*(x**2) ?) and making sure that you don't
define any circular simplification rules.

If you don't like the computer algebra approach, you could google for
'program transformation' and follow some of the links.

Good luck !

Mark Westwood

On 26 Jun, 12:06, DavidM <nos... at nowhere.com> wrote:
> On Tue, 26 Jun 2007 11:11:39 +0100, Robin Becker wrote:
> > I have seen this sort of evolution strategy in the past and it's very wrong to
> > attempt to simplify outside the genetic framework. The implication is that you
> > know better than the overall fitness requirement. The additional expressions and
> > redundancies allow for extra mutation and combination possibilities which is a
> > good thing for the whole population. If you must, add the requirement to the
> > target ie give extra fitness points to organisms which perform efficiently.
>
> I'm sorry, but there's something important I forgot to mention - I only
> want to do the simplification *after* a winning successful organism has
> evolved and satisfied the fitness function.





More information about the Python-list mailing list