How can I place the arrowhead in the center of an edge?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\usepackage{tkz-graph}
\usetikzlibrary{decorations.markings}
\tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {\arrow{>}}},postaction={decorate}}}
\begin{document}
\begin{tikzpicture}[shorten >=1pt,node distance=4cm,on grid,auto]
\node[state] (s_0) {$s_0$};
\node[state] (s_1) [right=of s_0] {$s_1$};
\path[->]
(s_0) edge node {0} (s_1)
(s_1) edge [bend right=45] node [above] {1} (s_0)
;
\end{tikzpicture}
\end{document}
There are several excellent answers given for \draw, such as Tikz: Arrowheads in the center but applying the same mechanism to \path gives an error: "I cannot decorate an empty path'

tikzpictureoptions the following option:every loop/.style={}, this way, the loops will have no end arrows but only those->-you have defined in the middle. – AboAmmar Mar 14 '17 at 23:29