How to apply genetic algorithm on lists of strings?

1 view (last 30 days)
I have the following scenario:
An input of n lists, where each list has k tokens/strings in it. Each list has its own respective cost of execution (which is known for this initial input). My interest is to apply genetic-algorithm using Matlab to generate a new input, i.e., next n lists with improved costs. Use this input to find the actual costs (out side of the Matlab). Repeat the procedure using Matlab and so on.
OR in steps it goes like this:
Given: An input of n lists of k tokens/strings (along with n costs of executions).
To Do: apply genetic-algorithm using Matlab to generate a new input (next n lists).
Such that: the new input has improved costs of execution.
Known: Use of the new input to find the actual costs (out side of the Matlab).
Repeat from To Do
My questions are:
What will be the fitness function?
What options for 'ga' will be used?
I have seen several examples of using GA with integers, vectors and others but I have no idea of how will it be applied to the lists or if I say vectors of vectors of strings.
Is really possible, or if something is wrong with my approach?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!