wood burning stoves 2.0*
The moose likes Java in General and the fly likes Genetic Algorithm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Genetic Algorithm " Watch "Genetic Algorithm " New topic
Author

Genetic Algorithm

Sheila Jorge
Greenhorn

Joined: Oct 24, 2011
Posts: 16
Hi all,

I want write Genetic algorithm for OBST . I need implement two main method ,Crossover and mutation.

I know what is crossover and mutation and what they do but i can't implement them for OBST.

in my code i have two tuple ( different configuration of Nodes) . I want crossover these two tuple and create two new tuple and return them.

every node has probability and value.

I don't have any idea .can you help me please?!!!

Regards
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11475
    
  16

Folks around here love to help, but you have to make it possible for them to do so. Asking broad, general, or vague questions usually don't get much of a response. Asking focused, specific, and detailed questions with examples of what you are trying, what you are expecting to see, and what you actually see tend to get good responses.

You also have to realize that many folks have no idea what "Genetic algorithm", OBST, Crossover and Mutations means.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18978
    
  40

fred rosenberger wrote:You also have to realize that many folks have no idea what "Genetic algorithm", OBST, Crossover and Mutations means.


As a wild guess, I would say that it is related to genes -- like in Gattaca, Blade Runner, etc....

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Sheila Jorge
Greenhorn

Joined: Oct 24, 2011
Posts: 16
fred rosenberger wrote:Folks around here love to help, but you have to make it possible for them to do so. Asking broad, general, or vague questions usually don't get much of a response. Asking focused, specific, and detailed questions with examples of what you are trying, what you are expecting to see, and what you actually see tend to get good responses.

You also have to realize that many folks have no idea what "Genetic algorithm", OBST, Crossover and Mutations means.



OBST is Binary search tree.I want the minimum cost of trees. Cost is (probability * depth) .every node in tree has a certain depth if it be root it's depth is 0.
I can't explain Crossover and mutation here,it is long.please search them or use this link :webpage
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8196
    
  23

Sheila Jorge wrote:OBST is Binary search tree.I want the minimum cost of trees. Cost is (probability * depth) .every node in tree has a certain depth if it be root it's depth is 0.

I still don't see a question. What exactly do you want us to help with?

I can't explain Crossover and mutation here,it is long.please search them or use this link :webpage

At first glance, it seems quite involved, so you're going to have to provide a lot more information before anyone here is likely to be able to help.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Victor M. Pereira
Ranch Hand

Joined: Mar 02, 2012
Posts: 50
so your using genetic algorithms to generate an optimized OBST? And if that's the case why Genetic algortihms? Isn't it better to use AVL Tree or am I misunderstanding the subject?

And what are you currently doing for crossover and mutation?


regards,
Victor M. Pereira
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
in my code i have two tuple ( different configuration of Nodes) . I want crossover these two tuple and create two new tuple and return them.


If your present representation of the problem does not lend itself to genetic algorithm optimization, I would say it is time to back off and rethink your representation of the problem.

A LOT of work on genetic algorithms in Java exists, going all the way back to Java 1.02 - perhaps looking into how others have represented problems for GA treatment will inspire you.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Genetic Algorithm