Hiya,
I can't say I'm an expert on AI, but I think you could first calculate the distance between the tanks. This is easier when both tanks are on equal height.
Then, you could do some testing with how much strength the projectile is shot. So, start off with x amount of strength. I think you can also use a bullet behavior for the projectile, it has gravity.
So basically say: if distance between playertank and enemytank is exactly 100, it will fire with 20 gravity. If distance is 200, fire with e.g. 10 gravity, and try to apply enough gravity to the projectile bullet to exactly hit the other tank. I *think* if you can find the extremes you will be able to set the other gravity calculations for the projectile that are in between.
With extremes I mean maximum possible distance between tanks and minimum.
Then, you could apply a randomization to the gravity of the enemytank. So it won't always exactly hit you the first x tries. You could gradually decrease the AI randomization value with each turn; enemytank is learning and will aim better and better.
Now this approach might take a lot of manual programming, I'm sure there's a way of automating although I can't tell you how on the spot.
Also, with each turn, you can have a variable randomly (rounded) calculated to calculate odds. These odds with each turn will decide if the enemy will move, left, right, how many pixels. You can apply randomization to this as well.
I'm just thinking about this as I type, hopefully it'll give you some ideas.