According to Genesis 3:1, God created the serpent to be crafty and gave the serpent the ability to use the given intelligence. That means there should not be the disobedient intelligence that will act against God: how is it possible that serpent(intelligence) could act against God's self?
Crafty is not necessarily bad.
Behold, I send you forth as sheep in the midst of wolves: be ye therefore wise as serpents, and harmless as doves. Matthew 10:16 (KJV)
It is the use of God-given talents against God's will that makes it sin.
God also has perfect foreknowledge, so He did know exactly what would occur.