I suspect that the gunship was simply programmed to shoot the closest hostile entity, which happened to be the player's rockets. This kind of emergent behavior is actually quite common in gameplay programming. In any case, machine learning was not involved in the development of Half-Life.
I want to know more about this.
was it just preprogrammed ability/method that was unlocked after a time or was there some sort of machine learning?