In that case I suggest using a
figure environment straight-up and modify
algorithmic so that it provides the rules you're after (naturally,
algorithm formats the float using the
float package's ruled style). Placement of the caption below the algorithm is achieved by physically placing it below the
algorithmic environment.
\documentclass{article}
\usepackage{algorithmic}
\usepackage{letltxmacro}
\LetLtxMacro{\oldalgorithmic}{\algorithmic}
\LetLtxMacro{\endoldalgorithmic}{\endalgorithmic}
\renewenvironment{algorithmic}[1][0]{%
\hrulefill\par
\oldalgorithmic[#1]}
{\endoldalgorithmic\par
\vspace*{-.5\baselineskip}
\hrulefill\par
}
\begin{document}
\begin{figure}[ht]