Software implementation for action and gesture communication generation based on interaction histories for the iCub platform, and integration into the iCub cognitive architecture (by HERTS)