both i think,first for AI to pick a right way to shoot,and this shooting algorithm requires physics about terrain,actually need Math and Physics i guess?
So.. you need help with Physics or AI? or both?
and because is's a 2d game,it may also need some graphics algorithm to run parabola on pixels and effective?
so many things involved...
Learn about one thing at a time.
Step 0: showing a window, accepting keyboard output, and shutting down properly.
Step 1: displaying moving sprites.
Step 2: displaying animations of projectiles (according to physical models).
Step 3: collision handling and explosions.
Step 4: destroying terrain.
Step 5: falling terrain.
Step 6: worms and pickup items, supported by terrain.
Step 7: walking and falling worms (player-controlled).
Step 8: a full game for human players, without AI (hotseat).
Step 9: AI-controlled worms who do anything player-controlled worms can do, with pluggable AI modules. This is a game architecture task, not an AI task; the first AI modules should be simple demos (e.g. walk in a random direction as far as possible then shoot a random weapon in a random direction).
Only at this point you should begin to worry about what AI behaviour is fun; you might discover, for example, that lobbing a cannonball on a perfect parabolic trajectory is too effective because there are too many open spaces and the player needs several attempts before hitting, resulting in frustrating mortality (this is what happens in Scorched Earth against the best AI).
Golf is completely different from Worms clones because if the AI opponent has a great shot the consequence is a slightly more challenging score to compete against, not immediate and unfair defeat.
Regarding AI, I recommend planning with straightforward strategies that the players can recognize: shooting obstacles until there is a clear path to shoot an objective, walking to safe places, erecting walls and walkways, digging a relatively safe pit and taking advantage of wind to shoot vertically out of it, etc.