Self-aware machine