I'm going to let the computer figure it out
The problem with code written 16 years ago is that sometimes you can't figure it out - even when you're the one who wrote it. On top of that, most programmers will look at code they wrote so many years ago and gag at how bad it is. I'm having that problem with my Formula Tree code.
I'm sure if I wanted to bother I could reverse engineer my own code and figure out where I was going with it. But I decided that I'm going to take a different approach. I'm going to use Genetic Programming to finish the code. Yes, I'm going to let the computer figure it out.
There are several reasons:
* I'm more interested in working on GP than finishing the Formula Tree code - this way I can combine the two.
* Every thought I've had for resolving the parentheses problem doesn't seem very elegant.
* The application is perfect for Genetic Programming.
Think about it. What does the program need to do? Simple: take a formula as an input along with a variable to solve. Then produce another formula as an output. It's a simple transformation problem where the input and expected output can be listed along side each other in a table.
I will grant that the solution won't be very simple. It will probably require some tree manipulation. But I could help the process along by giving each Genetic Program access to a special library for manipulating trees. I could even make it so that the input to the program is a tree, as well as the expected output. That way the GP can operate at a more abstract level. I don't have to wait for it to evolve tree manipulation primitives to get started.
I'm sure if I wanted to bother I could reverse engineer my own code and figure out where I was going with it. But I decided that I'm going to take a different approach. I'm going to use Genetic Programming to finish the code. Yes, I'm going to let the computer figure it out.
There are several reasons:
* I'm more interested in working on GP than finishing the Formula Tree code - this way I can combine the two.
* Every thought I've had for resolving the parentheses problem doesn't seem very elegant.
* The application is perfect for Genetic Programming.
Think about it. What does the program need to do? Simple: take a formula as an input along with a variable to solve. Then produce another formula as an output. It's a simple transformation problem where the input and expected output can be listed along side each other in a table.
I will grant that the solution won't be very simple. It will probably require some tree manipulation. But I could help the process along by giving each Genetic Program access to a special library for manipulating trees. I could even make it so that the input to the program is a tree, as well as the expected output. That way the GP can operate at a more abstract level. I don't have to wait for it to evolve tree manipulation primitives to get started.
0 Comments:
Post a Comment
<< Home