\ifx\sevenrm\undefined
  \font\sevenrm=cmr7 scaled \magstep0
\fi

\newread\MyStyle
\openin\MyStyle=src2latex.s2t
\ifeof\MyStyle
  \closein\MyStyle
\else
  \input src2latex.s2t
  \closein\MyStyle
\fi

\ifx\gtfam\undefined
  \ifx\dm\undefined
    \ifx\tendm\undefined
      \def\mc{\null}
    \else
      \def\mc{\tendm}
    \fi
  \else
    \def\mc{\dm}
  \fi
  \ifx\dg\undefined
    \ifx\tendg\undefined
      \def\gt{\null}
    \else
      \def\gt{\tendg}
    \fi
  \else
    \def\gt{\dg}
  \fi
\fi
\ifx\sc\undefined
  \def\sc{\null}
\fi

\tt\mc 

\noindent
function{\tt\mc \kern0.500em}[{\tt\mc \kern0.500em}fitnesswert,{\tt\mc \kern0.500em}idealwert,{\tt\mc \kern0.500em}aussenlaenge,{\tt\mc \kern0.500em}wabenanzahl,{\tt\mc \kern0.500em}fitnessquotient{\tt\mc \kern0.500em}]{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}fitness({\tt\mc \kern0.500em}zustandsraum{\tt\mc \kern0.500em})

\noindent
{}{\tt\%}FITNESS{\tt\mc \kern0.500em}Berechnet{\tt\mc \kern0.500em}den{\tt\mc \kern0.500em}Fitnesswert{\tt\mc \kern0.500em}für{\tt\mc \kern0.500em}eine{\tt\mc \kern0.500em}beliebige{\tt\mc \kern0.500em}Wabenstruktur

\noindent
{}{\tt\%}{\tt\mc \kern1.500em}Kriterien{\tt\mc \kern0.500em}zur{\tt\mc \kern0.500em}Berechnung{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}Fitness{\tt\mc \kern0.500em}können{\tt\mc \kern0.500em}stark{\tt\mc \kern0.500em}variieren.

\noindent
{}{\tt\%}{\tt\mc \kern1.500em}Erste{\tt\mc \kern0.500em}Ideen:{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}Kompaktheit{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}Struktur:{\tt\mc \kern0.500em}man{\tt\mc \kern0.500em}berechnet{\tt\mc \kern0.500em}die

\noindent
{}{\tt\%}{\tt\mc \kern8.500em}Gesamtlänge{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}Außenkanten{\tt\mc \kern0.500em}und{\tt\mc \kern0.500em}teilt{\tt\mc \kern0.500em}sie{\tt\mc \kern0.500em}durch{\tt\mc \kern0.500em}die

\noindent
{}{\tt\%}{\tt\mc \kern8.500em}Anzahl{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}bebauten{\tt\mc \kern0.500em}Zellen.{\tt\mc \kern0.500em}Je{\tt\mc \kern0.500em}höher{\tt\mc \kern0.500em}dieser{\tt\mc \kern0.500em}Wert,{\tt\mc \kern0.500em}desto

\noindent
{}{\tt\%}{\tt\mc \kern8.500em}kompakter{\tt\mc \kern0.500em}die{\tt\mc \kern0.500em}Struktur{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}Idealfall:{\tt\mc \kern0.500em}Kreisform

\noindent
{}{\tt\%}{\tt\mc \kern8.000em}{\tt -}{\tt\mc \kern0.500em}Geschlossenheit:{\tt\mc \kern0.500em}Löcher{\tt\mc \kern0.500em}in{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}Struktur{\tt\mc \kern0.500em}müssen{\tt\mc \kern0.500em}zur

\noindent
{}{\tt\%}{\tt\mc \kern9.000em}Abwertung{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}Fitness{\tt\mc \kern0.500em}führen

\noindent
{}\hfill

\noindent
{}global{\tt\mc \kern0.500em}Knotenzahl;

\noindent
{}\hfill

\noindent
{}zellenflaeche{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}({\tt\mc \kern0.500em}3{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}2{\tt\mc \kern0.500em}){\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}sqrt({\tt\mc \kern0.500em}3{\tt\mc \kern0.500em});

\noindent
{}\hfill

\noindent
{}bebautezellen{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}find(zustandsraum(4,:));

\noindent
{}\hfill

\noindent
{}wabenanzahl{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}length(bebautezellen);{\tt\mc \kern0.500em}

\noindent
{}\hfill

\noindent
{}aussenlaenge{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}0;{\tt\mc \kern0.500em}

\noindent
{}for{\tt\mc \kern0.500em}zellindex=1:wabenanzahl

\noindent
{}{\tt\mc \kern2.000em}nachbarliste{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}nachbarn(bebautezellen(zellindex));

\noindent
{}{\tt\mc \kern2.000em}for{\tt\mc \kern0.500em}zindex=1:6

\noindent
{}{\tt\mc \kern4.000em}if{\tt\mc \kern0.500em}(nachbarliste(zindex){\tt\mc \kern0.500em}{\tt <}{\tt\mc \kern0.500em}1){\tt\mc \kern0.500em}{\tt |}{\tt |}{\tt\mc \kern0.500em}(nachbarliste(zindex){\tt\mc \kern0.500em}{\tt >}{\tt\mc \kern0.500em}Knotenzahl)

\noindent
{}{\tt\mc \kern6.000em}bebauung{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}0;

\noindent
{}{\tt\mc \kern4.000em}else

\noindent
{}{\tt\mc \kern6.000em}bebauung{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}zustandsraum(4,nachbarliste(zindex));

\noindent
{}{\tt\mc \kern4.000em}end

\noindent
{}{\tt\mc \kern4.000em}if{\tt\mc \kern0.500em}bebauung{\tt\mc \kern0.500em}=={\tt\mc \kern0.500em}0

\noindent
{}{\tt\mc \kern6.000em}aussenlaenge{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}aussenlaenge{\tt\mc \kern0.500em}+{\tt\mc \kern0.500em}1;

\noindent
{}{\tt\mc \kern4.000em}end

\noindent
{}{\tt\mc \kern2.000em}end

\noindent
{}end

\noindent
{}\hfill

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}Kantenlänge{\tt\mc \kern0.500em}des{\tt\mc \kern0.500em}Sechsecks{\tt\mc \kern0.500em}ist{\tt\mc \kern0.500em}1

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}Nimmt{\tt\mc \kern0.500em}man{\tt\mc \kern0.500em}als{\tt\mc \kern0.500em}Fitnesswert{\tt\mc \kern0.500em}das{\tt\mc \kern0.500em}Verhältnis{\tt\mc \kern0.500em}von{\tt\mc \kern0.500em}Fläche{\tt\mc \kern0.500em}zu{\tt\mc \kern0.500em}Umfang{\tt\mc \kern0.500em}der

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}Struktur{\tt\mc \kern0.500em}(möglichst{\tt\mc \kern0.500em}groß),{\tt\mc \kern0.500em}so{\tt\mc \kern0.500em}ergibt{\tt\mc \kern0.500em}sich{\tt\mc \kern0.500em}der{\tt\mc \kern0.500em}Idealwert{\tt\mc \kern0.500em}für{\tt\mc \kern0.500em}die{\tt\mc \kern0.500em}Fitness

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}bei{\tt\mc \kern0.500em}einer{\tt\mc \kern0.500em}Kreisform:

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}Fläche{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}Radius{\tt\mc \kern0.500em}{\tt\char'136}{\tt\mc \kern0.500em}2{\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}pi

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}Umfang{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}2{\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}Radius{\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}pi

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}Fläche{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}(Umfang{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}2{\tt *}pi){\tt\mc \kern0.500em}{\tt\char'136}2{\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}pi{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}({\tt\mc \kern0.500em}Umfang{\tt\char'136}2{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}4{\tt *}pi{\tt\mc \kern0.500em})

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}Fläche{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}Umfang{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}Umfang{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}4{\tt *}pi

\noindent
{}\hfill

\noindent
{}idealwert{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}aussenlaenge{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}({\tt\mc \kern0.500em}4{\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}pi{\tt\mc \kern0.500em});

\noindent
{}fitnesswert{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}(wabenanzahl{\tt\mc \kern0.500em}{\tt *}{\tt\mc \kern0.500em}zellenflaeche){\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}aussenlaenge;

\noindent
{}\hfill

\noindent
{}{\tt\%}{\tt\mc \kern0.500em}differenz{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}abs(idealwert{\tt\mc \kern0.500em}{\tt -}{\tt\mc \kern0.500em}fitnesswert);

\noindent
{}fitnessquotient{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}fitnesswert{\tt\mc \kern0.500em}{\tt /}{\tt\mc \kern0.500em}idealwert;

\noindent
{}\hfill

\noindent
{}end

\noindent
{}\hfill

\noindent
{}

\rm\mc
