I have a concept, I call the Pandora Code - basically, it's a bit of programming that, once activated, bursts out into (as represented) an ever-evolving universe, ever shifting and changing. This is meant to represent the ability for this "code of thought" to be chaotic - not to where decisions don't have reason but, rather, so that ideas and orders can shift and change due to the robot's interaction with reality. In other words, it gives them free will. Also, due to its ever-changing nature, it is impossible (in theory) to hack or crack. In fact, any time in which someone does manage to hack into it and can be successful, the program will detect it, implode itself, and burst out, resetting the universe to the way it was but having completely different mechanisms which make up the fabric of that universe. To put it differently, code made of always-changeable fractals of code which do not completely destroy the memory or other parts of the program while still annihilating any chance of outside forces getting into it.

In other words, it's the one true 100% foolproof AI program.

Under that program, the merit of an AI robot would be based on themselves, not the "next best upgrade" - so, leadership among them would be determined by the individual - and their ability to reason and exist in society will be equal to our own.

--

As I said before, I'd prefer it if AI robots lived alongside us. This design is meant for the creation of a "partner race" specifically, so that humanity won't be so alone in its endeavors.