Reflection and introspection for humanized intelligent agents