How to make an AI?

This should get you started.