AI will have to evolve through stages, like humans did, [....]
but the machine in this story did quickly evolve through the correlating stages of self-referential complexity, within its' virtual identification with and meditation about everything, then it surpassed the common stages.
humans can evolve rather quickly, too, when they give up on identification with / full dedication to surface-structures of stages (activities and concrete identities in a world-space that's correlating with a stage)
when you're about to relinquish information from old culture, you process it through subjectivity first, become aware of doing so, so the subject becomes the new perceived domain of your guiding reality. you continue to manifest culture, but as a perspective you live in it to a lesser degree, than you live in the creativity of your subject. in that sense you go past culture for ever. another way to put it: you become construct-aware, thus you become the experience of being the designer. you don't get rid of constructs. evolution transcends and includes, but the peak perspective changes for ever.
"In the previous stage[s] [of being culturally creative], the person is consciously identified with multiple aspects of his or her inner life, and authenticity is defined as the ability to be true to these many parts of self. At the ego-aware-paradoxical stage, however, the person develops the ability to periodically enter a witnessing stance. As a result, "the ego becomes transparent to itself". With more frequent access to the witnessing perspective, the person recognizes for the first time that the ego constructs and filters experience in every waking moment." A Guide to Integral Psychotherapy: Complexity, Integration, and Spirituality
"Turquoise ego development [stages are color coded, thus the label turquoise] falls around what [Suzanne] Cook-Greuter dubs unitive or ego aware. The individual is no longer restricted to their own individual ego. There is a spaciousness that allows them to effortlessly glide between multiple perspectives and states of consciousness. To quote Cook-Greuter: “Though [individuals] at the Unitive stage are aware of themselves as separate and unique embodiments, they also identify with all other living beings. The separation of self from others is experienced as an illusion…”  The experience of an individual's I-am-ness is recognized and felt as the same I-am-ness that exists within every other living creature; an I am-ness that smiles softly back in bliss every time it is recognized and acknowledged." The Infinite Ladder
there are [at least] two common definitions of the word ego, that need to be differentiated. ego as that which creates a sense of separation and correlating motivations around fear and anger, preservation of a false-self, preservation of a state of consciousness. and the sense of self (i am ness), which is an aspect of having a comprehension of self, a perspective, orientation. the former dissolves though becoming seen through, through seeing through a new orientation of perspective is established, so the states of consciousness, that were maintained by the false self principle, become redundant for the core need of maintaining orientation. the latter more broad ego definition - 'self comprehension & orientation' grows during development, including more and more perspectives into it's repertoire. you start as your body (i am hungry), you identify with your family or tribe (i am american, or human), you identify with your internal possibilities (i am a sentient being), you identify with the such-ness of spirit (i am that i am), you identify with the fullness of the world of form (non-duality). each of these stages includes the aspects of all former stages. so, wether "ego" grows into infinity or "disappears" depends on the definition of the word.