Added learning mode

Implemented learning mode on stacks controller