This is where you keep falling down.
It is pre-programmed, just not in the way you are thinking. An Artificial Intelligence is programmed with rules that allow it to learn. Not only is it capable of learning, it is able to do it in a heuristic fashion, and it can teach itself to think in new ways.
To a certain extent, this has already been done. The only question we need to answer is the "more intelligent than ourselves" part, for which we will need a common definition of intelligence.