Facebook did not shut down AI bots for changing their code.
Facebook was testing the use of AI as chat bots for support and stuff like that. They shut down the bots because they had formed a more efficient way to communicate, while diverting from the language they were supposed to be training in. NOT because they were "getting too smart" or anything shady like that.
AI will eventually get there, but we're not quite there yet. :)