Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to find an good data - representation for a genetic (evolutionary) algorithm, but I just can't imagine one
    primarykey
    data
    text
    <p><strong>Disclaimer</strong></p> <p>First of all, this is for homework, so don't ask why it's so contrived, it is this way and it can only be this way. (I get a lot of "how about if you change something"), sorry ... I can't.</p> <p>Also I must use evolutionary algorithms, that means parents have children, they can mutate / recombine, form new generations and eventually lead to a solution.</p> <p><strong>/Disclaimer</strong></p> <p>I have <code>n*2</code> words of length n. I have to make a <code>n^2</code> matrix containing all these words. The words can be gibberish, but they have to be able to <strong>fit</strong> in this matrix (it's a requirement on the user's part).</p> <p>Thus <code>AGE,AGO,BEG,CAB,CAD,DOG</code> will give me this result (1 out of at least 2 possible):</p> <pre><code>C A B A G E D O G </code></pre> <p>I have to use an evolutionary algorithm. Thus I need to find a way to code my information into a chromosome.</p> <p><strong>What I did come up with:</strong></p> <p>Each word has to appear, has a start position in the matrix, and an orientation (left-right or up-down). Thus I have <code>[Word][Orientation][StartPosition]</code> where start position is <code>[0][0]</code> / <code>[0][1]</code> / <code>[1][0]</code> etc (left column and top line). But it has restrictions, I need to validate that the orientation fits the start position.</p> <p><strong>Problems:</strong></p> <p>A chromosome has to be a <em>possible</em> solution whereas this is only part of a solution.</p> <p>Since my solution has to be a matrix containing all the words in such a way as to "fit" the chromosome also has to somehow represent the entire matrix. But that hits several problems. I can only have one word from one starting position in one orientation (except the first two words, they share the same start position with different orientations). I can't see this working as a valid way of attempting an evolutionary algorithm. I just can't see any of the phases working, especially mutation / recombination.</p> <p>Am I thinking of it entirely wrong ? If so ... why ? and how could I attempt to code my data in such a way as to let me go trough all the phases (reproduction, mutation / recombination, natural selection ... be able to calculate a fitness and start a new generation) without having tons of garbage data (having a word appear twice, lose a word, have a word on a wrong orientation compared to it's start position) ?</p> <p><strong>EDIT</strong></p> <p>I shall be using this representation to implement many other nature-inspired algorithms, thus I need a "good" data representation. Nothing makeshift that could hurt me later.</p> <p>I honestly can't think of a good way though. Because I have a lot of limitation (maybe I have been thinking on this too long and I can't get past them, and they maybe aren't really there). I would really like a binary representation, but that seems impossible. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload