-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard Genetic Algorithm #1079
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
"add" -> if (n < config.maxSearchSuiteSize) { | ||
ff.calculateCoverage(sampler.sample(), modifiedSpec = null)?.run { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what??? why are you computing fitness as part of an add
mutation?
val i = randomness.nextInt(n) | ||
val ind = wts.suite[i] | ||
|
||
getMutatator().mutateAndSave(ind, archive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this computing the fitness?
} | ||
} | ||
|
||
protected fun selection(): WtsEvalIndividual<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what kind of selection is this? need to docs. it looks like a tournament selection with size 2.
if that is the case, we already have a tournamentSize
in config, and code implemented for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tournamentSelection added to AbstractGeneticAlgorithm. tournamentSize is read from the config.
|
||
private fun xover(x: WtsEvalIndividual<T>, y: WtsEvalIndividual<T>) { | ||
|
||
val nx = x.suite.size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we already have similar code in WTS implementation? in that case, code should be re-used, and needed refactoring done to avoid code duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently moved to AbstractGeneticAlgorithm. The duplication will be taken care of either when refactoring WTS or implementing MonotonicGA.
@@ -19,7 +19,7 @@ import org.evomaster.core.search.service.SearchAlgorithm | |||
* of search algorithms, and not really something to | |||
* use regularly in EvoMaster | |||
*/ | |||
class WtsAlgorithm<T> : SearchAlgorithm<T>() where T : Individual { | |||
open class WtsAlgorithm<T> : SearchAlgorithm<T>() where T : Individual { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have we clarified the difference between StandardGA and WTS? let's discuss it in meeting, with pseudo-code from paper
No description provided.