Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Put this in your preamble
- \usepackage{algorithm, algpseudocode}
- % ----
- % Put this in the desired chapter
- \begin{algorithm}
- \caption{(1+1) Evolutionary Algorithm}
- \label{alg:1-1EA}
- \begin{algorithmic}[1]
- \State $p_m \gets 1/n$ \Comment{Set probability of mutation}\tabularnewline
- \State Choose randomly an initial bit string $x \in \{0,1\}^n$
- \While{Stopping criteria not satisfied}
- \State Compute $x'$ by flipping independently each bit $x_i$ with probability $p_m$
- \State Replace $x$ by $x'$ iff $f(x') \geq f(x)$
- \EndWhile
- \end{algorithmic}
- \end{algorithm}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement