Jump to content

oTakhi Platform: Genetic Algorithm Utility Library


mfdesigner
 Share

Recommended Posts

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):


 


gaul.png


 


The jsGAUL droplet is a direct port of the Genetic Algorithm Utility Library in C++.


 


Steve


Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...