I am new to TikZ and am trying to draw a tree with text only on the edge (action/line). I have managed to do it as seen below but I was hoping there was a more concise/legible way.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{figure}
\begin{center}
\tikzstyle{level 1}=[level distance=1cm, sibling distance=2.5cm]
\tikzstyle{level 2}=[level distance=1cm, sibling distance=2.5cm]
\tikzstyle{level 3}=[level distance=1cm, sibling distance=1cm]
\tikzstyle{level 4}=[level distance=1cm, sibling distance=2cm]
\tikzstyle{circleNode}=[circle,draw]
\tikzstyle{dotNode} = [circle, minimum width=3pt,fill, inner sep=0pt]
\begin{tikzpicture}
\node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
edge from parent
node[left]{j}
}
edge from parent
node[left]{$\tau$*}
}
edge from parent
node[left]{b}
}
edge from parent
node[left]{$\tau$*}
}
edge from parent
node[left]{b}
}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
child{
node [dotNode] {}
edge from parent
node[right]{k}
}
edge from parent
node[right]{$\tau$*}
}
edge from parent
node[right]{b}
}
edge from parent
node[right]{$\tau$*}
}
edge from parent
node[right]{b}
}
edge from parent
node[left]{$\tau$*}
}
edge from parent
node[left]{a}
}
edge from parent
node[left]{$\tau$*}
}
edge from parent
node[left]{a}
};
\end{tikzpicture}
\end{center}
\end{document}


autoandswap. That is a proper way to place the nodes. Also you could introduce ainsert pathstyle that insertsedge from parent node[<option>]{<content>}in a shorter form, e.g.[n={swap}{$\tau$}]. – Qrrbrbirlbel Jan 22 at 12:59[auto]and[auto, swap]instead of[left]and[right]? I'm still looking at resources on how to useinsert pathproperly as I've only found specific examples on different TikZ types, not on trees. – ET13 Jan 22 at 13:51