Before I tell you more about this program, let’s rewind back to the beginning of it. When I was a small curious boy, I would walk up to many people and ask them questions every day. “Pa, what created human?” He never answered it. I think he wasn’t religious enough to believe that God did it. “Mom, did God create human?” I asked. “Yes, son. Buddha created this world and human. Now go play outside. Mom is busy.” It didn’t surprise me a bit, as most people had given me the same answers. “But then who created God?” Some replied he created himself. My cousin a few months older than me said “you silly, another God created him.” My grandma gave it her best shot: “Gods live eternally. They always exist before and after.” So by then I just didn’t know who to believe. All the answers only led to more questions. I was kind of waiting for someone to give me one ultimate answer. It hasn’t happened.
In grade twelve, I was introduced to the Darwin’s Theory of Evolution, that it could answer some of those questions, not entirely, but rationally better and with mathematics and fossils to back it up. From some molecules evolving to a single-cell bacterium, from some bacteria evolving to a complex organism, from ape to human, evolutionary process is the self-inducing force behind it all. Now I personally believe that evolution plays a vital role in making everything as we know it—maybe I’m right or maybe I’m wrong but I’m now more satisfied more than ever.
So powerful it is, yet the law behind Evolution is simple: Only the fittest survives and dominates, and they then breed and create better offspring. That’s simple right? In other words, a smarter, stronger person will beat the stupid, weaker one and gets the girl. No doubt about that. After he gets the girl, they *bleep* and give birth to some children. And the process repeats. If my children are better than yours, mines will get the girls, the scholarships, the pay rises, the promotions, etc. Yeah, the fittest survives again. In the wild, the work of evolution is no different. Bigger lions kill the smaller lions to get the females, territories and foods. In stock or forex trading, it is also no different. The more experienced trader wins the money that the less experienced loses. Evolution works the same way everywhere. In a nutshell, evolution is just a way of the nature, but it somehow forces something to be better, or else suffer.
Anyway, this software I created is for solving optimization problems quickly and painlessly. To optimize something, you want find the best inputs that produces the best output. It’s the same way a cook finds the scale of ingredients to make the most delicious disc. Typically, a person finds it by trials and errors. You cook it too sweet this time. You’ll decrease the sugar next times until it tastes just right. But if you’re a math genius, you’ll go through all the wacko numbers, integral, derivation, graphs and then come up with the best inputs—e.g. x = 1.56 gram and y = 40 gram. If you’re an analyst, you’ll create some scenarios and pick the best one. But if you’re a lazy software programmer as I am, you’ll resort to creating a software program that does the jobs for you. Right! Like this software program of mine for solving optimization problems quickly, painlessly and almost automatically.
There are many ways to create such software, just pick an optimization algorithm from the many existing ones and write it in code. Ant colony algorithm, for example, simulates some ants finding the nearest route to the food; hence the best input to result in best output. Simulated annealing algorithm uses the analogy of the cooling of metal to find best inputs. But what took my breath away was the ‘Genetic Algorithm’ which simulates the evolution of genes. Gene evolution take years and generations to see small changes. With
today’s computing power, however, you can fast forward the process to
just a matter of days or minutes depending on the difficulty of problem, the number of variables and
the amount of data. By simulating gene evolution, my program has the very same power to filter out bad inputs (as artificial genes), and breed more of the best inputs at the same time. 'Parameter Optimizer', the software I created as my first shot, is literally breeding digital data. The offspring are better digital data. Scary or funny? You tell me. Although Parameter Optimizer lacks many features of a good optimizer, it can solve some basic problems like the following one.
I hope I can find time to create an advanced optimizer and publish it.
Optimization Problem: There are 50 grape vine trees in a vineyard. Each tree produces 8,000 grapes. For each additional grape vine tree planted in the vineyard, the output per tree drops by 1 grape. How many trees should be added to the existing vineyard in order to maximize the total output of grapes?
Answer: If you want to go ahead solving this problem, then don't peek the answer before you do. To solve the problem, I simply write the equation: total output of grapes = 50 * (8000 - x0) + x0 * (8000 - x0), where x0 is the number of additional grape vine trees to be planted. I use the default settings of Genetic Algorithm. Now I simply click "Start" and the program finds the best answer in 10 seconds. It says I should plant about 3,975 additional grape vine trees, and then the vineyard will produce about 16,200,625 grapes which is the maximum. No college math needed. Now how cool is that?!