mfdesigner Posted March 12, 2015 Share Posted March 12, 2015 Consider the following setup. A population of 500 individuals, each with a chromosome of randomly generated printable characters, is subjected to (1) random selective breeding (chromosome crossover), (2) survival of the fittest, and (3) adaptation by learning, while freely evolve in a simulated environment. At each generation, the fitness of an individual is evaluated as the distance between its chromosome and a target string: "The very essence of instinct is that it's followed independently of reason." The adaptation stage uses a simple hill-climbing algorithm to advance each character of the chromosome. This simulation is performed for 100 generations. At the end of each generation, the fitness score and chromosome of the highest ranked individual (the fittest) are displayed. Click this link to watch this evolution in action (click the play button at the bottom right to enter runtime mode): The jsGAUL droplet is a direct port of the Genetic Algorithm Utility Library in C++. Steve drmop 1 Quote Link to comment Share on other sites More sharing options...
Maril Posted March 17, 2015 Share Posted March 17, 2015 Hi It sounds really interesting, but the page doesn't load for me. I'm on Firefox, I've tried Chrome and it's pretty much the same. Not quite, it doesn't load in a different way, but it still doesn't load. Anyway, can you give us an example of what this might be used for in real life? Like for making a game? Quote Link to comment Share on other sites More sharing options...
mfdesigner Posted March 19, 2015 Author Share Posted March 19, 2015 If you have problem loading, try hitting reload a few times.... eventually it will cache everything and start to run locally. One of the most prevalent use of GA is to train a Neural Network. Let's say you have a mouse avatar in a maze. Let's assign a 8x8 grid around the mouse, that's 64 boxes, each can take on a value 1 (occupied) or 0 (empty). Take this 64 inputs and feed them to a back-propagation neural network and also give it the desired ourputs (run away to go toward). Basically the 64 boxes serve as sensors of the immediate surrounding of the mouse. Train the neural net with all possible input and output combinations and the result is a smart mouse that can solve the maze by itself. Alternatively, you can use evolution(Genetic Algorithm) to train the neural net. smart ones are allowed to reproduce and dumb ones die out. The training is conducted offline. Once trained, the neural net is saved as a set of connection weights and can be applied to game object at run time. We have ported over the Fast Artificial Neural Network (FANN) C++ library into Javascript as well. This link demonstrate how to train a neural net to learn an XOR function. A more comprehensive example as described above is in the work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.