One of the things A.s.a. H. does is learn behavior trees. It was designed to, among other things, learn hierarchically structured "sequences of sequences."*
* R. Jones, A hierarchical architecture for software agents, Part 1, Part 2, and Part 3, 14 November 2003, http://groups.google.com/group/sci.cognitive and Transactions of the Kansas Academy of Science, vol. 109, no. 3/4, pg. 159, 2006.