• Genetic Algorithms
    74 replies, posted
[QUOTE=Dr Magnusson;27303500]-Snip-[/QUOTE] My point is, if you have a program which goes "Is it X yet? No. Is it X yet? No. Is it X yet? YES" isnt really what you should be aiming for. Instead you should be putting your "things" through a series of tests, and determining how well it does, and then breeding your population based on how well theyve done Your garrysmod thing sounds interesting, has it produced any output to which actually correlates to minges?
Genetic algorithm just describes the way. Of course the practical application is quite questionable if you already know the solution, but nevertheless you can write a genetic algorithm to form a solution identical to a given one in multiple steps/generations.
[QUOTE=Smashmaster;27295619]My exceedingly simple algorithm: Input organism. Make single copy of input. Randomize copy a bit. Test copy against input. Output whichever is better. Negative evolution can't occur. After each generation, the new copy will always be either better or the same. The test is the crux of the algorithm, though. It's what determines what you're looking for and what you want the end product to be.[/QUOTE] But that can stagnate. If improving the organism requires multiple mutations from the current state, you might never get there because it'll always rank the short-term improvement over the long-term improvement and leave no trace of the organism that could improve over multiple generations. It's better to keep a large pool of organisms.
[QUOTE=ThePuska;27304449]But that can stagnate. If improving the organism requires multiple mutations from the current state, you might never get there because it'll always rank the short-term improvement over the long-term improvement and leave no trace of the organism that could improve over multiple generations. It's better to keep a large pool of organisms.[/QUOTE] It's almost essential really. A single generations mutation in real terms is going to count for pretty much nothing in survival. It takes multiple generations before a mutation is even noticeable in a lot of cases.
[QUOTE=ThePuska;27304449]But that can stagnate. If improving the organism requires multiple mutations from the current state, you might never get there because it'll always rank the short-term improvement over the long-term improvement and leave no trace of the organism that could improve over multiple generations. It's better to keep a large pool of organisms.[/QUOTE] I sort of agree, but it really depends on the test you use. If it's something very simple, my algorithm works fine. But for testing survivability of AI and complicated organisms, you're right. I'll think of a different algorithm.
I don't understand what's going on. Did I miss somebody spread misinformation? Genetic algorithms, their purpose and implementation seem pretty straightforward to me. What're you people on about?
Okay, my basic idea for this one is that there's a larger pool of organisms, and organisms get more than one turn to prove their effectiveness. 1. Input seed organism. 2. Make 31 copies of organism. 3. Randomize each copy a little. 4. Test every organism. 5. Kill worst 24. 6. Breed best pairs with each other. (top 2 would breed, next 2 would breed, etc.) 7. Each breeding pair would make 3 children. Each child would get a random combination of their parents DNA, plus a little genetic mutation. 8. Go to 4. Organisms that are consistently outperforming everyone else could potentially survive for infinite generations. [editline]9th January 2011[/editline] [QUOTE=Jookia;27306709]I don't understand what's going on. Did I miss somebody spread misinformation? Genetic algorithms, their purpose and implementation seem pretty straightforward to me. What're you people on about?[/QUOTE] The title of the thread is a misnomer. We're really talking about evolutionary computation in general.
With a pool size of 100 organisms you can create 4950 combinations by simply breeding them together (assuming there's only one way to breed together two organisms). If your breeding algorithm is good enough, this massive diversity from simple breeding means that you probably don't need to randomize them ever again. And remember that you're not constricted to just two parents: if you can combine two organisms into one, you probably can do the same for five. For a pool size of 100 organisms, this would mean 75 million combinations. [editline]9th January 2011[/editline] Well, the diversity is explosive so you'll have to snip the pool at some point, which obviously causes loss of genetic material and eventually leads to stagnation. But you don't need to introduce randomness every generation and you don't need to randomize every organism.
No new genetic material leads to stagnation. You do need the randomness.
Page 2 doesnt appear to work.. Edit: Hmm. now its gone.
5 Way breeding? :ohdear:
The best breeding :smug:
[QUOTE=Darwin226;27309729]The best breeding :smug:[/QUOTE] I thought that was inbreeding?
Anyone seen "Twins"?
I'm thinking about to try and write a test program using box2d, building a simple ragdoll out of boxes and making him walk. Should be a good start :)
I have made a game of life. [img]http://dl.dropbox.com/u/2951174/GameOfLife/previewV1_2.png[/img] [url]http://www.facepunch.com/threads/1033540-Game-of-Life-Now-with-100-more-C-!?highlight=[/url]
I think I'll make a game of life too.
How is that genetic algorithm related?
[QUOTE=s0ul0r;27367656]How is that genetic algorithm related?[/QUOTE] While it doesn't use a genetic algorithm itself, it is sort of related in that it uses cellular automation which is a technique used for artificial life, the other one of course being neural networks. It's still in the same general field of AI and aLife.
These are just cells following simple rules, genetic algorithms or neural networks depend on mutation or randomisation.
[QUOTE=s0ul0r;27367760]These are just cells following simple rules, genetic algorithms or neural networks depend on mutation or randomisation.[/QUOTE] Which is why I didn't say "game of life uses genetic algorithms!" It's still in the same field. Game of life could easily be adapted to have mutating cells etc.
I wonder what the game of life would like like with mutation oO what would the fitness be measured in?
It would be interesting to see some form of genetic algorithm that uses game of life for it's gene (using a specified area of the grid for it's gene, and is updated every tick). Or maybe even using game of life for the weights of a neural net.
I remember BlkDucky made a game of life that implements viruses in WAYWO 14. [url=http://www.facepunch.com/threads/1028402-What-are-you-working-on-V14?p=26574193&viewfull=1#post26574193]link[/url]
[QUOTE=s0ul0r;27367760]These are just cells following simple rules, genetic algorithms or neural networks depend on mutation or randomisation.[/QUOTE] Those simple rules are Turing complete, so it's not that far from it.
My tutor at university went on a long rant about why neural networks are stupid (although GAs are only used to train them). I still find genetic algorithms very interesting though.
[QUOTE=Randdalf;27387859]My tutor at university went on a long rant about why neural networks are stupid (although GAs are only used to train them). I still find genetic algorithms very interesting though.[/QUOTE] Neural networks ARE stupid. Not stupid as in the concept of them, but stupid as in you need a lot of them to do anything remotely interesting and they can forget how to do things if they don't do it for a while.
I remember reading [url=http://thedailywtf.com/Articles/No,_We_Need_a_Neural_Network.aspx]this[/url] which is a pretty good example when not to use a genetic algorithm. :v:
[QUOTE=noctune9;27390833]I remember reading [url=http://thedailywtf.com/Articles/No,_We_Need_a_Neural_Network.aspx]this[/url] which is a pretty good example when not to use a genetic algorithm. :v:[/QUOTE] Where is the misinformation that Genetic Algorithms == Neural Networks coming from?
[QUOTE=mmavipc;27398217]Where is the misinformation that Genetic Algorithms == Neural Networks coming from?[/QUOTE] I'm not saying that, but how is training a neural network not using a genetic algorithm? It's all a bunch numbers being mutated, bred, assigned fitness, etc.
Sorry, you need to Log In to post a reply to this thread.