Skip to content

Instantly share code, notes, and snippets.

@garaemon
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save garaemon/ed1f19f4d6f3451da5f9 to your computer and use it in GitHub Desktop.

Select an option

Save garaemon/ed1f19f4d6f3451da5f9 to your computer and use it in GitHub Desktop.
footstep algorithm
\begin{algorithm}
\caption{3-D Footstep Planning with A*}
\begin{algorithmic}
\STATE $O \Leftarrow <S>$
\STATE $C \Leftarrow \emptyset$
\WHILE{$O$}
\STATE $N \Leftarrow pop(O)$
\IF{$N$ is $G$}
\RETURN $path(N)$
\ENDIF
%% \STATE $succ \Leftarrow expand(N)$
%% \FOR{$n$ in $succ$}
%% \IF{$n$ not in $C$}
%% \STATE $O \Leftarrow n + O$
%% \ENDIF
%% \ENDFOR
\STATE $succ \Leftarrow \emptyset$
\FOR{$n$ in $expand(N)$}
\STATE $succ \Leftarrow project(n)$
\ENDFOR
\STATE $C \Leftarrow N + C$
\ENDWHILE
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Footstep Planning with A*}
\begin{algorithmic}
\STATE $O \Leftarrow <S>$
\STATE $C \Leftarrow \emptyset$
\WHILE{$O$}
\STATE $N \Leftarrow pop(O)$
\IF{$N$ is $G$}
\RETURN $path(N)$
\ENDIF
\STATE $succ \Leftarrow expand(N)$
\FOR{$n$ in $succ$}
\IF{$n$ not in $C$}
\STATE $O \Leftarrow n + O$
\ENDIF
\ENDFOR
%% \STATE $succ \Leftarrow \emptyset$
%% \FOR{$n$ in $expand(N)$}
%% \STATE $succ \Leftarrow project(n)$
%% \ENDFOR
\STATE $C \Leftarrow N + C$
\ENDWHILE
\end{algorithmic}
\end{algorithm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment