Combining Production Rules using Reinforcement Learning
this writeup by Kenan Deen solves the Tower of Hanoi problem with reinforcement learning and Markoff decision processes.


Tower of Hanoi – Reinforcement Learning


there is some other research on using genetic programming in "solving" (successfully playing) video games. these approaches do find "subroutines" that can be regarded as subgoals. for example, in playing pacman, an algorithm might have a subroutine/ subgoal that eats ghosts if they are blue, otherwise, run away from them. the sample algorithms are sometimes encoded as LISP-like trees. see eg


Evolving diverse Ms. Pac-Man playing agents using genetic programming / Lucas. 
possibly the earliest case of this technique for solving pacman was reported by Koza in 1992 in the book Genetic Programming: on the programming of computers by means of natural selection