My youngest is in college. My oldest is out of college. Today is the first day of my oldest working a "corporate" job. I hope the day was a good one. I did not pay for college for either of my children. I saved for them. When each child graduated from high school I turned over the savings. This money is all that had been gathered for their individual, continuing education.
I received a message from my oldest. The day had two and one half hours of meetings and beginning to learning the company's systems. I hope I have not lead my children a wrong path at the beginning of their lives, into debt right out of college and high school.
I asked that child to choose scripts based on the path that child wants to follow and not the simply accepting those scripts that society delivers, not blindly follow the sheep and the rest of the herd, to choose happiness and knowledge over debt.
My intent is to talk about what I know, what I've done, things that are interesting to me, and my travels.
Monday, September 10, 2012
Saturday, September 8, 2012
Traveling these few days
My goal for blogging is to add a new post each day. I've not met that yet. To complicate things I'm currently driving my youngest child to college, helping move in, etc. There are lots of things to do. We were able to get registered to the dorm last night, instead of today, so things are a bit ahead of schedule. I still plan to leave college and return to my home later this afternoon.
My vehicle is a 2006 Chevy Express 2500 (extended) cargo van. One of the tanks of fuel on the way to college averaged 18.7 MPG. I think that's pretty good for a 3/4 tonne van.
My vehicle is a 2006 Chevy Express 2500 (extended) cargo van. One of the tanks of fuel on the way to college averaged 18.7 MPG. I think that's pretty good for a 3/4 tonne van.
Tuesday, September 4, 2012
Common Phrases People Say
I think everyone has one or more "pet peeves". One of my pet peeves is the use of language. I mean the English language here. I don't know any other human languages. There are a few phrases that I don't like, phrases that either are semantically null, are derogation to the speaker, or have drifted their meaning over time (I prefer the original, non-drifted meaning).
Phrases I don't like include:
Phrases I don't like include:
- "no problem": If it was no problem for the speaker, then the speaker's actions have no worth.
- "talk to you tomorrow": I don't want to be talked "to". I want to be talked "with".
- "mad" (i.e. are you mad at me?): The original meaning of "mad" is "crazy". I am not mad at someone, though I may be angry at or with them.
Monday, September 3, 2012
Eating Frugally
At one time I lost a lot of weight. Around sixty pounds. Though I was doing a lot of bicycling at the time, I think a lot of my success was due to counting the calories I consumed, stopping consumption of sodas, and eating with a different pattern.
I began the habit of eating breakfast (two packets of instant oatmeal, 320 calories), eating mostly what I want for lunch and guessing its about 1000 calories, and eating nothing until the next breakfast. I try to have eighteen hours between "lunch" and "breakfast".
To keep up with hydration and hunger, I would drink water with just a little grape juice for flavor.
I've had a change of situation since then, including a surgery. I've gained forty pounds back. I plan for my situation to change in the summer of 2013. I'll get back to eating a way that I think is more healthy for me.
I'm also thinking about introducing "juicing" into my diet. This place seems to have good prices. I've watched some videos on YouTube! of juicing. The Omega 8006 seems the juicer for me. I also watched the film Fat, Sick, and Nearly Died. The idea seems very interesting.
Last night playing cards I had carrots. A good start. Today I had some Pringles. I suppose I'm back to the beginning again. :)
I plan on moving into my van. The juicer I'm looking at, the Omega 8006, requires 150 watts. This is low enough that a combination of solar panel and battery should be able to run the juicer several times each day. This idea, if I follow it, will provide me with many servings of fruits and vegetables every day. Maybe I can move to a vegetarian, or mostly, diet.
I began the habit of eating breakfast (two packets of instant oatmeal, 320 calories), eating mostly what I want for lunch and guessing its about 1000 calories, and eating nothing until the next breakfast. I try to have eighteen hours between "lunch" and "breakfast".
To keep up with hydration and hunger, I would drink water with just a little grape juice for flavor.
I've had a change of situation since then, including a surgery. I've gained forty pounds back. I plan for my situation to change in the summer of 2013. I'll get back to eating a way that I think is more healthy for me.
I'm also thinking about introducing "juicing" into my diet. This place seems to have good prices. I've watched some videos on YouTube! of juicing. The Omega 8006 seems the juicer for me. I also watched the film Fat, Sick, and Nearly Died. The idea seems very interesting.
Last night playing cards I had carrots. A good start. Today I had some Pringles. I suppose I'm back to the beginning again. :)
I plan on moving into my van. The juicer I'm looking at, the Omega 8006, requires 150 watts. This is low enough that a combination of solar panel and battery should be able to run the juicer several times each day. This idea, if I follow it, will provide me with many servings of fruits and vegetables every day. Maybe I can move to a vegetarian, or mostly, diet.
Saturday, September 1, 2012
Genetic Programming Ideas
I am fascinated by what I think can be accomplished using genetic programming techniques. One of the areas that intrigues me is the idea of creating a semantic database, a database of words and words combined into phrases. Each word and phrase would be rated a semantic value. This value would be subjective. I don't know any object way a semantic value could be assigned.
Anyway, once past that hurdle, create an objective function that knows how to string words into sentences, paragraphs, and speeches. Devise a function whose inputs are I want a speech that has these values:
patriotism: 83
sacrifice: 79
some other country: -100
economy: 50
some profession: -20
Anyway, once past that hurdle, create an objective function that knows how to string words into sentences, paragraphs, and speeches. Devise a function whose inputs are I want a speech that has these values:
patriotism: 83
sacrifice: 79
some other country: -100
economy: 50
some profession: -20
- The positive values are good.
- The negative values are bad.
- This system is an automated speech writer.
- This system could be extended to harvest current news items from places like CNN.
- This system could be designed to watch news stories, increasing their emotional impact as more stories are harvested, and to decay that emotional impact over time.
- This system could include emotional current stories like hurricanes, earthquakes, mass shootings, or other emotional content.
- The database could have custom news stories or phrases manually entered to make sure they are available to the objective function, possibly with a custom semantic value to make sure the item is injected into the speech.
Friday, August 31, 2012
Genetic Programming Details - Part 3
After a run through the population evaluating each individual the adjusted fitness is used to create the next population. A common approach is to sort the population by fitness size, copy over the top ten percent of the population to the new population (the hundred highest scoring individuals in a population of 1000), then generate the remaining population (900 if the population is 1000) using a tournament method. In the tournament five (or seven or some small number) of individuals is chosen at random. Based on the relative fitness of the individual, that individual is more likely to win the tournament. Using whole numbers, if the five individuals had fitness values of 2, 4, 6, 8 10, the sum of these fitness scores is 30, the individual with a fitness score of 10 has a 10 / 30 or 1/3 chance of winning the tournament.
Once you have a tournament winner, generate a random number to see if that individual will be crossed with another individual (also selected by tournament), mutated, or left unchanged.
Fill the remaining population this way (900 individuals in this example). When the population is complete take another run through the population evaluating the fitness of each individual. Repeat these steps until the maximum number of generations is reached or a "perfect" individual is found.
Once you have a tournament winner, generate a random number to see if that individual will be crossed with another individual (also selected by tournament), mutated, or left unchanged.
Fill the remaining population this way (900 individuals in this example). When the population is complete take another run through the population evaluating the fitness of each individual. Repeat these steps until the maximum number of generations is reached or a "perfect" individual is found.
Thursday, August 30, 2012
Genetic Programming Details - Part 2
The genetic programming system is created by first deciding what terminal values and what operators you will use given your problem. Next write the objective function. The objective function accepts an individual then evaluates that individual over your data set. This data set could be internal, trying to find an individual that returns the closest approximation to the square root of two, or your data set could be external.
If the data set is external, like planetary orbital locations, your objective function reads the data and evaluates the data with respect to the data set. When evaluating the individual your objective function must compute some number that shows the relative "goodness" or "badness" of this individual with respect to the data function. With the square root of two problem this value might be the absolute difference between the evaluated result of the individual with the fixed value of square root of two (1.414). For a problem like planetary orbital data this value could be the absolute difference of each evaluation of the individual and the observed position.
Depending on the magnitude of the values you're working with, somethings this difference is squared to make the summed difference between individuals greater and the "rightness" of the individual more pronounced with respect to other individuals in the population.
Once the objective function is written, then you decide with what frequency you want crossover and mutation to happen within your population. Crossover percentages are normally high, around 70%. I don't have a citation for that number at the moment. Mutation percentages are low, around 3%.
A genetic programming sequence of events when running is:
For a given problem, how do you know what is the perfect score? Researcher and author John Koza proposed that the objective function in some way sum up the individual's score into what is called the "raw score". This raw score is then converted into a value where one (1) is perfect and zero bad. The formula used is: adjusted score = 1 / (1 + raw score). In this framework the raw score approaches zero as the fitness of the individual increases. If the individual is perfect and has a raw score of zero the equation is: adjusted score = 1 / (1 + 0), = 1 / 1 = 1. That's great. If the individual has a bad fit and a large raw score the equation is more like: adjusted score = 1 / (1 + big number) = 1 / big number = tiny number.
I think John Koza's idea for adjusted scores is really useful.
If the data set is external, like planetary orbital locations, your objective function reads the data and evaluates the data with respect to the data set. When evaluating the individual your objective function must compute some number that shows the relative "goodness" or "badness" of this individual with respect to the data function. With the square root of two problem this value might be the absolute difference between the evaluated result of the individual with the fixed value of square root of two (1.414). For a problem like planetary orbital data this value could be the absolute difference of each evaluation of the individual and the observed position.
Depending on the magnitude of the values you're working with, somethings this difference is squared to make the summed difference between individuals greater and the "rightness" of the individual more pronounced with respect to other individuals in the population.
Once the objective function is written, then you decide with what frequency you want crossover and mutation to happen within your population. Crossover percentages are normally high, around 70%. I don't have a citation for that number at the moment. Mutation percentages are low, around 3%.
A genetic programming sequence of events when running is:
- randomize the individuals of a population given the sets of terminal values and operators
- evaluate every individual using the objective function
- sort the "correctness" of each individual
- randomly go through the population deciding which individuals will have crossover and which individuals will be mutated
- repeat the above steps until either the maximum number of generations of the population is reached or until an individual is found for which the objective function returns a perfect score
For a given problem, how do you know what is the perfect score? Researcher and author John Koza proposed that the objective function in some way sum up the individual's score into what is called the "raw score". This raw score is then converted into a value where one (1) is perfect and zero bad. The formula used is: adjusted score = 1 / (1 + raw score). In this framework the raw score approaches zero as the fitness of the individual increases. If the individual is perfect and has a raw score of zero the equation is: adjusted score = 1 / (1 + 0), = 1 / 1 = 1. That's great. If the individual has a bad fit and a large raw score the equation is more like: adjusted score = 1 / (1 + big number) = 1 / big number = tiny number.
I think John Koza's idea for adjusted scores is really useful.
Wednesday, August 29, 2012
Genetic Programming Details - Part 1
The simple idea behind genetic programming is to randomize a bunch of stuff, send that stuff through the objective function, and to evaluate how each thing does. First a few terms.
Population:
The collection of all individuals that are combined and tested for this problem.
Population Size:
The maximum number of individuals for this problem.
Generations:
Each time all individuals are tested for the problem.
Individual:
A randomized arrangement of terminal values and operators.
Terminal value:
Typically these are literal values. The values could be integers from -9 to 9, or real values from 0.0 to 9.9, or what fits your problem.
Operator:
If working on a numerical problem this could be add (+), subtract (-), multiply (*), divide (/), modulus (%), Bessel functions, Jacobian functions, or whatever fits your problem.
Crossover:
This idea takes two individuals and combines them into a third and forth, unique individuals. If one individual is ABCDEF and a second is 123456. One way to randomly combine these to choose a random number, say 4 since these individuals are each of length 6. Trade material from these two individuals into new individuals ABCD56 and 1234EF.
Mutation:
This idea is to create a random and small change in an individual to see how the change. If the individual is ABCDEF and a random number is chosen, say 4, the mutated individual could then be changed to ABCD7F.
These are the basic steps. When combined near magic will happen. More in the next post.
Mike
Population:
The collection of all individuals that are combined and tested for this problem.
Population Size:
The maximum number of individuals for this problem.
Generations:
Each time all individuals are tested for the problem.
Individual:
A randomized arrangement of terminal values and operators.
Terminal value:
Typically these are literal values. The values could be integers from -9 to 9, or real values from 0.0 to 9.9, or what fits your problem.
Operator:
If working on a numerical problem this could be add (+), subtract (-), multiply (*), divide (/), modulus (%), Bessel functions, Jacobian functions, or whatever fits your problem.
Crossover:
This idea takes two individuals and combines them into a third and forth, unique individuals. If one individual is ABCDEF and a second is 123456. One way to randomly combine these to choose a random number, say 4 since these individuals are each of length 6. Trade material from these two individuals into new individuals ABCD56 and 1234EF.
Mutation:
This idea is to create a random and small change in an individual to see how the change. If the individual is ABCDEF and a random number is chosen, say 4, the mutated individual could then be changed to ABCD7F.
These are the basic steps. When combined near magic will happen. More in the next post.
Mike
Tuesday, August 28, 2012
Simplified Genetic Programming Introduction
While at the start up and learning more about stock markets I tried to supply my own contributions to the endeavor. Being a computer person I tried to find a computer solution to the problem. I realize not all problems have computer solutions. This is just data, I should be able to find a solution.
Naive I was.
I quickly learned about genetic programming. I find this niche of Artificial Intelligence fascinating.
The idea behind genetic programming is similar to the idea behind genetic algorithms, however where you have an equation that you are attempting to find a near-optimal solution for in genetic algorithms, genetic programming creates the equation for you.
Computers understand mathematics and numbers best. That's where we'll start. Like genetic algorithms, the object function in genetic programming is where you will spend all your time. An objective function can be made to handle anything, if you can simulate it. As a first example we'll discuss an approximation for the square root of 2 (about 1.414). Each genetic programming system is allowed to use operators and terminal values. For this small test we will allow the use of the numbers '1' through '9' as terminal values, and the operators '+', '-', '*', and '/'. The objective function will evaluate each individual in the population and return the absolute value of the difference between the evaluated individual and the square root of 2.
When I originally performed this experiment I was surprised to learn that "7 / 5" is a close approximation.
An experiment I have read about discuss feeding planetary orbital data to a more sophisticated genetic programming system. The system evolved a form of Kepler's Laws of Planetary Motion. As I mentioned above computers are best at numbers, but that's not the only approach you can use for the objective function. One experiment used an objective function that tested individuals of a population for the specifics of an antenna design. The parameters included dimensions of the antenna, electrical power usage of the antenna, and how many decibels gain. This experiment recreated an antenna design by two fellows from Japan in the 1940s.
Researcher and author John Koza has described genetic programming as invention machine. I think he's right. John Koza performed experiments where genetic programming systems that investigate molecules navigating organic molecular pathways. In the most recent book by him I read where he and his group have submitted two electronic amplifier designs to the United States Patent Office that have never been seen previously by humans.
It's exciting stuff to me. This has been a very brief introduction to genetic programming. I hope you find it as fascinating as I do.
Below are links to the genetic programming systems I have used. The PERL is simple to setup and for learning, but is not as robust as the others. I modified lil-gp to run in a parallel system across ten linux boxes for a large (for me) application. The most flexible is ECJ. I was surprised by how fast ECJ runs. The ECJ community and Sean Luke are extremely helpful.
PERL:
GPerl.pm (can't find the link)
lil-gp:
http://garage.cse.msu.edu/software/lil-gp/overview.html
http://www.genetic-programming.com/c2003lilgpwebpagedarren.html
http://garage.cse.msu.edu/software/lil-gp/
ECJ:
http://cs.gmu.edu/~eclab/projects/ecj/
Researchers and Authors:
John Koza
Lee Spector
Bill Langdon
Naive I was.
I quickly learned about genetic programming. I find this niche of Artificial Intelligence fascinating.
The idea behind genetic programming is similar to the idea behind genetic algorithms, however where you have an equation that you are attempting to find a near-optimal solution for in genetic algorithms, genetic programming creates the equation for you.
Computers understand mathematics and numbers best. That's where we'll start. Like genetic algorithms, the object function in genetic programming is where you will spend all your time. An objective function can be made to handle anything, if you can simulate it. As a first example we'll discuss an approximation for the square root of 2 (about 1.414). Each genetic programming system is allowed to use operators and terminal values. For this small test we will allow the use of the numbers '1' through '9' as terminal values, and the operators '+', '-', '*', and '/'. The objective function will evaluate each individual in the population and return the absolute value of the difference between the evaluated individual and the square root of 2.
When I originally performed this experiment I was surprised to learn that "7 / 5" is a close approximation.
An experiment I have read about discuss feeding planetary orbital data to a more sophisticated genetic programming system. The system evolved a form of Kepler's Laws of Planetary Motion. As I mentioned above computers are best at numbers, but that's not the only approach you can use for the objective function. One experiment used an objective function that tested individuals of a population for the specifics of an antenna design. The parameters included dimensions of the antenna, electrical power usage of the antenna, and how many decibels gain. This experiment recreated an antenna design by two fellows from Japan in the 1940s.
Researcher and author John Koza has described genetic programming as invention machine. I think he's right. John Koza performed experiments where genetic programming systems that investigate molecules navigating organic molecular pathways. In the most recent book by him I read where he and his group have submitted two electronic amplifier designs to the United States Patent Office that have never been seen previously by humans.
It's exciting stuff to me. This has been a very brief introduction to genetic programming. I hope you find it as fascinating as I do.
Below are links to the genetic programming systems I have used. The PERL is simple to setup and for learning, but is not as robust as the others. I modified lil-gp to run in a parallel system across ten linux boxes for a large (for me) application. The most flexible is ECJ. I was surprised by how fast ECJ runs. The ECJ community and Sean Luke are extremely helpful.
PERL:
GPerl.pm (can't find the link)
lil-gp:
http://garage.cse.msu.edu/software/lil-gp/overview.html
http://www.genetic-programming.com/c2003lilgpwebpagedarren.html
http://garage.cse.msu.edu/software/lil-gp/
ECJ:
http://cs.gmu.edu/~eclab/projects/ecj/
Researchers and Authors:
John Koza
Lee Spector
Bill Langdon
Sunday, August 26, 2012
Artificial Intelligence
I have had several jobs over many years. The only time I was laid off I happened to meet someone in a book store and we discussed the stock markets. At the time I was researching what I could do with the markets to better provide for my family. After being laid off I joined this person in a start up.
The start up didn't succeed, but I learned about the markets and about Artificial Intelligence. What I knew of before joining the startup there are three levels of Artificial Intelligence:
The start up didn't succeed, but I learned about the markets and about Artificial Intelligence. What I knew of before joining the startup there are three levels of Artificial Intelligence:
- neural networks
- fuzzy logic
- genetic algorithms
Neural networks want to artificially organize in hardware or in software simulated neurons. These neurons receive some determined input that could be the value of a sensor or a calculated value. These neurons calculate their inputs and feed those calculated values to the next level of neurons. The idea is that all the values are processed and converted into a value that can be used to decide some action.
Fuzzy logic is interesting that several input values are used to modify an output value. I think of it as the arm of the human body reaching to grasp an object. The human brain adjust the shoulder a little, the elbow a little, the wrist and fingers a little, while the eye supplies feedback about where the hand is located in relation to the object attempting to be grasped. The eye is one input to the brain and the brain adjust several output values (one input and multiple outputs, the opposite of what I described above) to pick up an item.
One classic problem for fuzzy logic is feeding a fuzzy logic system the temperature, if it's sunny or cloudy, the humidity, if it's windy, and attempts to determine if someone would play under those conditions. It's an interesting system.
The third field of artificial intelligence I knew of is genetic algorithms. I think of genetic algorithms in this way. If you have an equation with N variables (many), a brute force of this problem space is very expensive. Genetic algorithms attempts to find a near optimal solution in a short amount of time. A genetic algorithm randomly generates values for each of the variables, then slices and dices these values to find an individual that works well in the equation.
A genetic algorithm relies on an object function. This object function accepts an individual in the genetic population. Each individual has all the random values for testing in the object function. There are several genetic algorithm frameworks. The time setting up one of these systems is spent in the object function. If you can design and test an appropriate object function for your problem, the genetic algorithm is very powerful.
A genetic algorithm works if you have an equation. What if you don't have an equation? There is a sub-field of genetic algorithms called genetic programming. That's for next time.
Saturday, August 25, 2012
Stocks
The stock markets are a form of legal gambling. I'm looking at using stock markets analysis as a revenue stream for when I travel. In 2001 I was part of a start up that dealt with futures analysis. The start up did not generate any profits, but I did learn a lot from the efforts. I learned about a specific branch of Artificial Intelligence (that I will discuss in a future post), I learned that stocks can move only three ways, and that many people want to get rich.
Stocks can only move three directions. Stocks can move up, sideways, or down. The idea of predicting what a stock will do is very difficult. Attempting to determine that a stock will be exactly $114.57 on Tuesday seems folly. It seems much easier to decide if a stock will go up, down, or not move at all.
If you grant that the stock markets are a form of legalized gambling, you must be aware of any issues the "player" might have with the exercise. Browsing the Internet and in my personal email I have seen claims for a massive income. These sums present to the reader that income can be had easily equal to years of labor without the required time and effortlessly. This idea seems quite wrong to me and very stressful. If the person would choose to be satisfied with $500 per day rather than "trying to make a killing" there would be less stress and easier to accomplish goals.
If the idea of a $500 day is followed, this gain can be accomplished by purchasing 5000 shares of a stock and waiting for that stock to raise $0.10. To try and put this into numbers:
- 5000 shares x $5.00 / share stock = $25,000 investment
- watch this stock intently for movement
- when this stock moves $0.10
- the stock now has a value of $25,500
- sell the stock
- the resulting values are $25,000 investment, stock increase of $.0.10, current value of $25,500, sell the stock realizes a $500 profit
- realistically you must pay your investment house the transaction fees, some houses want $14 per side
- your final profit is $500 - $28 for $476 net profit
If this idea works three times per month, you have a gross revenue of $1,500. This is near the poverty level with only three hours work per month. I choose not to work with futures because of the volatility. I prefer over the counter stocks. I'm focusing on NASDAQ listed stocks and all less than $10 per share to limit my investment accounts. I choose to only buy long rather than sell short. If the stock goes away from me I still have the investment at a loss. If I sell short I could lose the entire investment.
Stocks can only move three directions. Stocks can move up, sideways, or down. The idea of predicting what a stock will do is very difficult. Attempting to determine that a stock will be exactly $114.57 on Tuesday seems folly. It seems much easier to decide if a stock will go up, down, or not move at all.
If you grant that the stock markets are a form of legalized gambling, you must be aware of any issues the "player" might have with the exercise. Browsing the Internet and in my personal email I have seen claims for a massive income. These sums present to the reader that income can be had easily equal to years of labor without the required time and effortlessly. This idea seems quite wrong to me and very stressful. If the person would choose to be satisfied with $500 per day rather than "trying to make a killing" there would be less stress and easier to accomplish goals.
If the idea of a $500 day is followed, this gain can be accomplished by purchasing 5000 shares of a stock and waiting for that stock to raise $0.10. To try and put this into numbers:
- 5000 shares x $5.00 / share stock = $25,000 investment
- watch this stock intently for movement
- when this stock moves $0.10
- the stock now has a value of $25,500
- sell the stock
- the resulting values are $25,000 investment, stock increase of $.0.10, current value of $25,500, sell the stock realizes a $500 profit
- realistically you must pay your investment house the transaction fees, some houses want $14 per side
- your final profit is $500 - $28 for $476 net profit
If this idea works three times per month, you have a gross revenue of $1,500. This is near the poverty level with only three hours work per month. I choose not to work with futures because of the volatility. I prefer over the counter stocks. I'm focusing on NASDAQ listed stocks and all less than $10 per share to limit my investment accounts. I choose to only buy long rather than sell short. If the stock goes away from me I still have the investment at a loss. If I sell short I could lose the entire investment.
Friday, August 24, 2012
Introduction
I intend to quit my job in the summer of 2013. Once I have quit my job I will travel the United States. I have lived in this country all my life, but have witnessed very little. I have worked long and hard hours, not being with my family and children. I am now divorced and my children are out or almost out of college.
Now it's me and my dog. I will travel in a van that I will convert between now (late August) and July 2013. I have a list of places I want to visit. These places are just way points and not destinations.
This blog will document my efforts, journeys, adventures, stories, and items that I use.
Now it's me and my dog. I will travel in a van that I will convert between now (late August) and July 2013. I have a list of places I want to visit. These places are just way points and not destinations.
This blog will document my efforts, journeys, adventures, stories, and items that I use.
Subscribe to:
Comments (Atom)