Jump to content
xisto Community
Sign in to follow this  
fughain

Genetic Algorithm How to use Genetic Algorithm

Recommended Posts

In the name of GodHave you ever heard of Genetic algotithm? You might think it must be a very complicated theorem in biological issues! But i want to let you know that it's not like what you think.Genetic algorithm is a mathematical theroem that is usually applied to solve both constrianed and unconstrianed optimization problems,specially when dealling with functions that are discrete, highly nonlinear or stochastical.It's called 'Genetic Algorithm' because it works in the same way that biological evolution does in the nature.Well, i agree that it's abit hard to understand how genetic algorithm works,but if you are to solve some optimization problem, you dont have to have detailed information about the topic.You might be surprised if i tell you that there are many engineers ( specially electrical and mechanical engineers) that widely manipulate genetic algorithm to solve their problems while not having really much information about the algorithm itself(you'd better know there is such a thing about neural networks and artificial intelligence too).Now you may ask what should one do to use the algorithm.My suggestion is to start using MATLAB® software that is produced by mathworks,Inc.The software usually includes a package that consists of MATLAB®, MATLAB® Compiler and other MATLAB family products, Simulink®, Real-Time Workshop®, and other Simulink family products.Comprehensive information is provided there(in MATLAB help) that you can start with.But if you are not patiant enough to install the software and read the document yourself, i can give you some information about how you can use this ability of the software.First you have to write a program that can take the independent variables of your function(inputs of the function you want to minimize, maximize or optimize anyway) and output one single dependent variable as the output.You can wirte this program in any kind of editor you might desire,but MATLAB's editor will be the best one and easiest to use.MATLAB's compiler is really similar to C language's compiler,but just a little bit different,but its really easier to use.So if you know programming in C, dont worry about this matter,just go over the information provided at the help and be sure that you will start programming in MATLAB very soon.When you are done with writing the program,then you have two choices for the next step.You can either use the GUI(graphical user interface) provided for this purpose, namley 'gatool' or call it programmatically using MATLAB command line and calling the fucntion 'ga'.In both options you should feed them(the function or the GUI) the objective function(the fucntion that you had written)and some other information like initial values for independent parameters of the function.Then the result will be the point(s) where your function fites the best and the value of the function in this/these point(s).As you might agree,it's not that hard to use such a great optimization algorithm,Genetic algorithm,to solve your related problems if you start using MATLAB or other similar softwares.If you dont think so,just take note of effectivness of this approach and compare it to other ones.And remember!You dont have to really understand the way the algorithm works, you just have to know how to USE it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.