Skip to content
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

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Standard Genetic Algorithm #1079

wants to merge 27 commits into from

Conversation

amidgol
Copy link
Contributor

@amidgol amidgol commented Sep 17, 2024

No description provided.

core/src/main/kotlin/org/evomaster/core/EMConfig.kt Outdated Show resolved Hide resolved
core/src/main/kotlin/org/evomaster/core/EMConfig.kt Outdated Show resolved Hide resolved
core/src/main/kotlin/org/evomaster/core/EMConfig.kt Outdated Show resolved Hide resolved
}

"add" -> if (n < config.maxSearchSuiteSize) {
ff.calculateCoverage(sampler.sample(), modifiedSpec = null)?.run {
Copy link
Collaborator

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)
Copy link
Collaborator

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> {
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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 {
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants