\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{graphicx} %BIlder einbinden
\usepackage{amsmath} %erweiterte Mathe-Zeichen
\usepackage{amsfonts} %weitere fonts
\usepackage[utf8]{inputenc} %Umlaute & Co
\usepackage{hyperref} %Links
\usepackage{ifthen} %ifthenelse
\usepackage{enumerate}
\usepackage{listings}
\lstset{language=Python}
\usepackage{algpseudocode} %Pseudocode
\usepackage{dsfont} % schöne Zahlenräumezeichen
\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen
\usepackage{tikz} %TikZ ist kein Zeichenprogramm
\usetikzlibrary{trees,automata,arrows,shapes}
\pagestyle{empty}
\topmargin-50pt
\newcounter{aufgabe}
\def\tand{&}
\newcommand{\makeTableLine}[2][0]{%
\setcounter{aufgabe}{16}%TODO update
\whiledo{\value{aufgabe} < 19}%TODO update
{%
#2\tand\stepcounter{aufgabe}%
}
}
\newcommand{\aufgTable}[1]{
\def\spalten{\numexpr #1 + 1 \relax}
\begin{tabular}{|*{\spalten}{p{1cm}|}}
\makeTableLine[\spalten]{A\theaufgabe}$\Sigma$~~\\ \hline
\rule{0pt}{15pt}\makeTableLine[\spalten]{}\\
\end{tabular}
}
\def\header#1#2#3#4#5#6#7{\pagestyle{empty}
\begin{minipage}[t]{0.47\textwidth}
\begin{flushleft}
{\bf #4}\\
#5
\end{flushleft}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\begin{flushright}
#6 \vspace{0.5cm}\\
% Number of Columns Definition of Columns second empty line
% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm}
\aufgTable{#7}
\end{flushright}
\end{minipage}
\vspace{1cm}
\begin{center}
{\Large\bf Übungsblatt #1}
{(Abgabe #3)}
\end{center}
}
%counts the exercisenumber
\newcounter{n}
\setcounter{n}{18} %TODO update
%Kommando für Aufgaben
%\Aufgabe{AufgTitel}{Punktezahl}
\newcommand{\Aufgabe}[2]{\stepcounter{n}
\textbf{Aufgabe \arabic{n}: #1} (#2 Punkte)}
\begin{document}
%\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben}
\header{7}{}{2015-06-16}{Evolutionäre Algorithmen}{
\textit{Jan-Peter Hohloch}\\ \textit{Maximus Mutschler}
}{SS 15}{3}%TODO update
\vspace{0.5cm} \Aufgabe{Population-based incremental learning}{12}\\
\begin{enumerate}[(a)]
\item a
\end{enumerate}
\Aufgabe{ Bucked Brigade Algorithmus}{8}
$C_{bid}=0.1$\\
\begin{tabular}{|c|c|l|c|c|c|c|c|}
$t_0$ & Index & Classifier & Strength & Messages & Match & Bid & Reward \\
& 1 & 1\#101:01010 & 1000 & & & & \\
& 2 & 01\#1\#:01111 & 1000 & & E & 100 & \\
& 3 & 011\#1\#:11101 & 1000 & & E & 100 & \\
& 4 & 101\#\#:00010 & 1000 & & & & \\
& 5 & \#\#101:11101 & 1000 & & & & \\ \hline
Environment & & & & 01111 & & &
\end{tabular}\\
\begin{tabular}{|c|c|l|c|c|c|c|c|}
$t_1$ & Index & Classifier & Strength & Messages & Match & Bid & Reward \\
& 1 & 1\#101:01010 & 1000 & & 3 & 100& \\
& 2 & 01\#1\#:01111 & 900 & 01111 & 2 & 90& 180 \\
& 3 & 011\#1\#:11101 & 900 & 11101 & 2 & 90& 200 \\
& 4 & 101\#\#:00010 & 1000 & & & & \\
& 5 & \#\#101:11101 & 1000 & & 3 & 100& \\ \hline
Environment & & & & & & &
\end{tabular}\\
\begin{tabular}{|c|c|l|c|c|c|c|c|}
$t_2$ & Index & Classifier & Strength & Messages & Match & Bid & Reward \\
& 1 & 1\#101:01010 & 900 & 01010 & 3,5 & 90 & 50 \\
& 2 & 01\#1\#:01111 & 990 & 01111 & 1,2 & 99 & 150 \\
& 3 & 011\#1\#:11101 & 1010 & 11101 & 2 & 101 & 90 \\
& 4 & 101\#\#:00010 & 1000 & & & & \\
& 5 & \#\#101:11101 & 900 & 11101 & 3,5 & 90 & 90 \\ \hline
Environment & & & & & & &
\end{tabular}\\
\begin{tabular}{|c|c|l|c|c|c|c|c|}
$t_3$ & Index & Classifier & Strength & Messages & Match & Bid & Reward \\
& 1 & 1\#101:01010 & 940 & 01010 & 3,5 & 94 & 52 \\
& 2 & 01\#1\#:01111 & 1041 & 01111 & 1,2 & 104 & 151 \\
& 3 & 011\#1\#:11101 & 999 & 11101 & 2 & 99 & 92 \\
& 4 & 101\#\#:00010 & 1000 & & & & \\
& 5 & \#\#101:11101 & 900 & 11101 & 3,5 & 90 & 92 \\ \hline
Environment & & & & & & &
\end{tabular}\\
\begin{tabular}{|c|c|l|c|c|c|c|c|}
$t_4$ & Index & Classifier & Strength & Messages & Match & Bid & Reward \\
& 1 & 1\#101:01010 & 898 & 01010 & 3,5 & 90 & 55 \\
& 2 & 01\#1\#:01111 & 1088 & 01111 & 1,2 & 109 & 154 \\
& 3 & 011\#1\#:11101 & 992 & 11101 & 2 & 99 & 90 \\
& 4 & 101\#\#:00010 & 1000 & & & & \\
& 5 & \#\#101:11101 & 902 & 11101 & 3,5 & 90 & 90 \\ \hline
Environment & & & & & & &
\end{tabular}\\
\begin{tabular}{|c|c|l|c|c|c|c|c|}
$t_5$ & Index & Classifier & Strength\\
& 1 & 1\#101:01010 & 809 \\
& 2 & 01\#1\#:01111 & 1143 \\
& 3 & 011\#1\#:11101 & 983 \\
& 4 & 101\#\#:00010 & 1000 \\
& 5 & \#\#101:11101 & 902 \\ \hline
Environment & & &
\end{tabular}
\end{document}