Assume we are using a genetic algorithm, we want the perfect strategy in a game of 'Go'
'go' has way too many ways to play it for a computer to calculate (just consider it too many to be practical to solve)
1. the perfect strategy beats all other strategies
2. If you learn from experience alone, you may only be equiped to handle experiences you have been exposed to
3. Selection is made by the ability to handle experiences
4. ability to handle experience depends on genes
5. which genes have survived, depends on what events or experiences has lead to that point
6. genes represent past experience (3,4,5)
7. if you only learn by experiences, you must be exposed to all experiences to become perfect (1,6)
8. to become perfect more than experience is needed OR nearly all experiences must be encountered.
(assumed there was too many experiences)
9. more than experience is needed (8+assumption)
10. genes are not enough OR genes must represent more than experience (edit) OR perfection is impossible, maximizing is necessary
Saturday, September 19, 2009
Friday, September 18, 2009
Balance and perfection
Basic genetic algorithms are very simple in my opinion. However, it has become apparent that the way they are tested and selected can determine how well the outcome is. Naturally, one might think that simply choosing the best based on how it faces against the rest of the population, or some standard.
The problem with choosing one standard for the program to beat, is that the single standard may not be as good as it can get. Perhaps there are other scenarios that the algorithms will not be able to handle that were never presented.
To fix this problem I decided to make the population play against each other, that way they are exposed to many strategies.... but there is a much more interesting problem with this
If the population fight against itself, there is the possibility it will keep going until something reaches the perfect algorithm, and then the gene pool is dominated by it.
However, there is a much much much more probable scenario.
Perhaps the system will improve consistently, but only until the system reaches Balance. what if it gets to the point where all the algorithms seem to do equally well as each other, not exactly, but enough to significantly stall the process. for instance, some strategies may develop that are counters to other organisms strategies, but these strategies are all intertwined in some simple or not so simple order. These strategies will always beat each other out and play out in the same way. An equilibrium will be established, nothing will truly improve as one cannot say which of these strategies are truly 'better'
There has to be a way to shake up the balance, perhaps my random idea will be enough, but I must consider the probable fact that it will not. What can make the balance fall apart without abandoning strategies completely?
The problem with choosing one standard for the program to beat, is that the single standard may not be as good as it can get. Perhaps there are other scenarios that the algorithms will not be able to handle that were never presented.
To fix this problem I decided to make the population play against each other, that way they are exposed to many strategies.... but there is a much more interesting problem with this
If the population fight against itself, there is the possibility it will keep going until something reaches the perfect algorithm, and then the gene pool is dominated by it.
However, there is a much much much more probable scenario.
Perhaps the system will improve consistently, but only until the system reaches Balance. what if it gets to the point where all the algorithms seem to do equally well as each other, not exactly, but enough to significantly stall the process. for instance, some strategies may develop that are counters to other organisms strategies, but these strategies are all intertwined in some simple or not so simple order. These strategies will always beat each other out and play out in the same way. An equilibrium will be established, nothing will truly improve as one cannot say which of these strategies are truly 'better'
There has to be a way to shake up the balance, perhaps my random idea will be enough, but I must consider the probable fact that it will not. What can make the balance fall apart without abandoning strategies completely?
Thursday, September 17, 2009
how neatly done!
Typical genetic algorithm:
specific traits are chosen very carefully, as the computer scientist approaches the problem. A specific string of binary numbers is chosen to represent his creation. These numbers will mutate to perform the task at hand. In order for this scientist to do so, he must test how well each binary code will do in the given scenario, so that the scientist may more carefully decide which one is correct.
There is tedious calculation, each may be given multiple scenarios, then ranked on how well each binary code performs. They use advanced math to decide how each one should be chosen, and how many children each binary string should have, or whether they should die.
Then when the scientist runs this program, something happens. There is a 'super subject' but not in a good way. This subject is not getting better, but it's gene's are dominating the gene pool. This super subject is not as perfect as we would like, so much more mathematical calibration must be done.
Well, what if the scientist did something else....
A lot of times in real life, some things that happen seemingly randomly give us an advantage. While over time the strongest survive, some of the weaker ones survive and keep traits that may become useful. We need the weak and the strong, and some way to choose between them.
Well, what if they competed against each other, and we recorded how many times they win. However, not all of them will necessarily get to play the same amount, each one is randomly chosen as a pair to fight, then on to the next pair. There are a lot of pairings, and yes it is a bit random, but those who are better over time will succeed....
let's see what happens!!!
specific traits are chosen very carefully, as the computer scientist approaches the problem. A specific string of binary numbers is chosen to represent his creation. These numbers will mutate to perform the task at hand. In order for this scientist to do so, he must test how well each binary code will do in the given scenario, so that the scientist may more carefully decide which one is correct.
There is tedious calculation, each may be given multiple scenarios, then ranked on how well each binary code performs. They use advanced math to decide how each one should be chosen, and how many children each binary string should have, or whether they should die.
Then when the scientist runs this program, something happens. There is a 'super subject' but not in a good way. This subject is not getting better, but it's gene's are dominating the gene pool. This super subject is not as perfect as we would like, so much more mathematical calibration must be done.
Well, what if the scientist did something else....
A lot of times in real life, some things that happen seemingly randomly give us an advantage. While over time the strongest survive, some of the weaker ones survive and keep traits that may become useful. We need the weak and the strong, and some way to choose between them.
Well, what if they competed against each other, and we recorded how many times they win. However, not all of them will necessarily get to play the same amount, each one is randomly chosen as a pair to fight, then on to the next pair. There are a lot of pairings, and yes it is a bit random, but those who are better over time will succeed....
let's see what happens!!!
Thursday, September 10, 2009
no, i did not read this over before i posted it
I have reason to believe my first version of this program I am making will completely fail. Why??
Well this first version will be missing at least one key aspect of logic/math
mathematics within logic:
currently, the program may only consider a variable, and its relationship with another varible. not the variable minus 1 compared to the other variable, or the variable minus some other variable compared to a variable.... it's strictly variable to variable comparison. This is a problem because:
Imagine we're playing a 'game':
I give you three numbers, A, B, and C.
I want you to tell me whether or not A minus B is greater than C
the logic you would do is as follows
if(A-B > C)
Say "yes"
However my program cannot do that, it cannot subtract A-B and compare it to C
Now imagine you are intelectually limited to variable by variable comparison
There's no way to determine for certain whether or not A -B is greater than C, the closest you can get is:
if(A > B and A > C)
say "yes"
However, there are numerous counterexamples, so you would not be correct 100% of the time. (example A=5 C=2, B=2, 5-2 is not greater than 2)
What's the solution??
well.... I have half of an idea... I think i can do it... implementing it may turn my own head upsidedown
independent calculators:
These calculators will take multiple variables, they can be any particular variables that the neuron may decide, and do math ONLY with those numbers. Not any other input, just the variables given. However, how these will be implemented may be another story. I may find that each part of the if statement, I may need to make an object that is an independent calculator. Then the question may become-- should these independent calculators only be within the neuron, or should the entire brain have access to these calculators?
I think yes, with all neurons able to call on independent calculators, they may find that the calculators will become to represent rules in whichever game it is trying to learn. These rules may end up being used to solve different games it may try to learn.
Why is this so hard?????
first off, they are one more thing to mutate. I already have to mutate how the brain works, then how each neuron works, now I need to worry about mutating these guys.
The neuron also needs to recognize that these calculators exist, then mutate what they choose to put in the calculators.
Well this first version will be missing at least one key aspect of logic/math
mathematics within logic:
currently, the program may only consider a variable, and its relationship with another varible. not the variable minus 1 compared to the other variable, or the variable minus some other variable compared to a variable.... it's strictly variable to variable comparison. This is a problem because:
Imagine we're playing a 'game':
I give you three numbers, A, B, and C.
I want you to tell me whether or not A minus B is greater than C
the logic you would do is as follows
if(A-B > C)
Say "yes"
However my program cannot do that, it cannot subtract A-B and compare it to C
Now imagine you are intelectually limited to variable by variable comparison
There's no way to determine for certain whether or not A -B is greater than C, the closest you can get is:
if(A > B and A > C)
say "yes"
However, there are numerous counterexamples, so you would not be correct 100% of the time. (example A=5 C=2, B=2, 5-2 is not greater than 2)
What's the solution??
well.... I have half of an idea... I think i can do it... implementing it may turn my own head upsidedown
independent calculators:
These calculators will take multiple variables, they can be any particular variables that the neuron may decide, and do math ONLY with those numbers. Not any other input, just the variables given. However, how these will be implemented may be another story. I may find that each part of the if statement, I may need to make an object that is an independent calculator. Then the question may become-- should these independent calculators only be within the neuron, or should the entire brain have access to these calculators?
I think yes, with all neurons able to call on independent calculators, they may find that the calculators will become to represent rules in whichever game it is trying to learn. These rules may end up being used to solve different games it may try to learn.
Why is this so hard?????
first off, they are one more thing to mutate. I already have to mutate how the brain works, then how each neuron works, now I need to worry about mutating these guys.
The neuron also needs to recognize that these calculators exist, then mutate what they choose to put in the calculators.
Thursday, August 27, 2009
Ahh yes it is tommorrow
Okay, so assuming the first program works well, I will naturally want to make it better
What I have made with the little 'neurons' communicating will now come in handy. They are very flexible objects, they can make connections based on their own logic, and if the first project works, it will be able to do this really well for one game.
Now, what if I wanted my program to learn 2 different games?
The second step of this project will be to allow the program to learn 2 games, by re-using some of the same neurons!! This is something that to my understanding is something a genetic algorithm cant do. Can one genetic algorithm learn to play different games, yes, but they cant do it with the same gene! (again, to my understanding).
There is a challenge to this, all input is different for each game, and these neurons are only set in to take a specific input. The problem is, how does it assign variables to spots that are missing? Well, the program is going to need to mutate to find this out (for now). It will be able to call on a neuron that uses a different game's logic, and will assign it variables randomly. Further progressions would be to have a logic for assigning these variables.... how I am not sure yet but I do already have a few ideas.... which I will write about another time...
What I have made with the little 'neurons' communicating will now come in handy. They are very flexible objects, they can make connections based on their own logic, and if the first project works, it will be able to do this really well for one game.
Now, what if I wanted my program to learn 2 different games?
The second step of this project will be to allow the program to learn 2 games, by re-using some of the same neurons!! This is something that to my understanding is something a genetic algorithm cant do. Can one genetic algorithm learn to play different games, yes, but they cant do it with the same gene! (again, to my understanding).
There is a challenge to this, all input is different for each game, and these neurons are only set in to take a specific input. The problem is, how does it assign variables to spots that are missing? Well, the program is going to need to mutate to find this out (for now). It will be able to call on a neuron that uses a different game's logic, and will assign it variables randomly. Further progressions would be to have a logic for assigning these variables.... how I am not sure yet but I do already have a few ideas.... which I will write about another time...
Wednesday, August 26, 2009
okay updates WILL come more frequently!!!
For the past few days I have been contemplating what my little program may be able to do, and how to improve it.
Here's the game plan
The first program I will write, will be able use logic and math combined to have a final outcome. The logic will be solid once the mutated being is created, this is not to say that it will react the same way in a given situation (as it may consider a random variable), but that it will always consider the same variables.
This program may be capable of creating logic in a algorithm differently than any way I have researched. There are different 'neurons' each with their own set of logic that is set to take in certain input, either from other 'neurons' or the input given. (all input is in form of numbers). This may allow a few neurons to concentrate on what strategy is best, it may also condense information to a more usable form before the initial processing. the condensing of information will allow faster processing, however the only way for me to ensure that this can happen is if i not only select which algorithms are best on the ability to solve the problem, but also its efficiency. Efficiency of algorithms does not seem to come in play in other methods of genetic algorithms, as they always have the same efficiency the way it is set up.
Tommorow... What I want the next program to be able to develope to.... much closer to something may be able to think like us...
I would like anybody reading this to keep in mind I am being very theoretical here-- really more like experimental with what the actual capabilities of the program will be. I am assuming if I give the program near infinite flexibility, as well as the ability to be selected on efficiency, it will evolve into something that can effectively solve multiple problems, just like we came about. If nothing else this will be fun, after all I am very young :-)
Here's the game plan
The first program I will write, will be able use logic and math combined to have a final outcome. The logic will be solid once the mutated being is created, this is not to say that it will react the same way in a given situation (as it may consider a random variable), but that it will always consider the same variables.
This program may be capable of creating logic in a algorithm differently than any way I have researched. There are different 'neurons' each with their own set of logic that is set to take in certain input, either from other 'neurons' or the input given. (all input is in form of numbers). This may allow a few neurons to concentrate on what strategy is best, it may also condense information to a more usable form before the initial processing. the condensing of information will allow faster processing, however the only way for me to ensure that this can happen is if i not only select which algorithms are best on the ability to solve the problem, but also its efficiency. Efficiency of algorithms does not seem to come in play in other methods of genetic algorithms, as they always have the same efficiency the way it is set up.
Tommorow... What I want the next program to be able to develope to.... much closer to something may be able to think like us...
I would like anybody reading this to keep in mind I am being very theoretical here-- really more like experimental with what the actual capabilities of the program will be. I am assuming if I give the program near infinite flexibility, as well as the ability to be selected on efficiency, it will evolve into something that can effectively solve multiple problems, just like we came about. If nothing else this will be fun, after all I am very young :-)
Tuesday, July 14, 2009
Since the last time
It has been a short while since I posted last, and as such I have a lot of changes to what I plan on doing.
My previous idea with the hierarchy of voting, has been nearly forgotten, maybe I'll try it out if this doesn't work.
However If my newer Idea works, it has the potential of not only beating people at one game, but many with the same algorithm
This idea does not only use math, but a heck of a lot more logic. For every piece of math done, there will be an option for a logical requirement to do that math... So it will work something like this
Each 'logic machine' will get an array of variables
vars[]
then a stream of logic and math will follow, this will be encoded somewhat, but just for the sake of making it easier to understand.
if(vars[1]>vars[0])
finalVar = 1 // could be subtracting, adding, multipliing, adding a variable
'finalVar' will be what the algorithm returns to whatever gave them the vars.
with this, things get interesting
the algorithms can give each other their calculations. How they do that is in my head and still needs perfection... and hey if this really ends up working out (on the off chance) I gotta keep part of it secret!!
My previous idea with the hierarchy of voting, has been nearly forgotten, maybe I'll try it out if this doesn't work.
However If my newer Idea works, it has the potential of not only beating people at one game, but many with the same algorithm
This idea does not only use math, but a heck of a lot more logic. For every piece of math done, there will be an option for a logical requirement to do that math... So it will work something like this
Each 'logic machine' will get an array of variables
vars[]
then a stream of logic and math will follow, this will be encoded somewhat, but just for the sake of making it easier to understand.
if(vars[1]>vars[0])
finalVar = 1 // could be subtracting, adding, multipliing, adding a variable
'finalVar' will be what the algorithm returns to whatever gave them the vars.
with this, things get interesting
the algorithms can give each other their calculations. How they do that is in my head and still needs perfection... and hey if this really ends up working out (on the off chance) I gotta keep part of it secret!!
Subscribe to:
Posts (Atom)