Ray Deep Self-awareness algorithm