First of all I should to decide which strategy was in basement of bot.
Right now I could to choice few ways: algorithmic and neural network. In google you will find a lot of information, but I suggest to look at next open source projects (especially on their Issues, because a lot of discussions)